Skip to content

Commit 0a0d236

Browse files
committed
Merge branch 'main' of github.com:coder/coder into spike/9015-stop-inserting-provisioners
2 parents 6507644 + fb3616c commit 0a0d236

File tree

1,741 files changed

+60595
-39717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,741 files changed

+60595
-39717
lines changed

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# If you would like `git blame` to ignore commits from this file, run...
2+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
3+
4+
# chore: format code with semicolons when using prettier (#9555)
5+
988c9af0153561397686c119da9d1336d2433fdd

.github/actions/setup-sqlc/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ runs:
77
- name: Setup sqlc
88
uses: sqlc-dev/setup-sqlc@v3
99
with:
10-
sqlc-version: "1.19.1"
10+
sqlc-version: "1.20.0"

.github/dependabot.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ updates:
88
timezone: "America/Chicago"
99
labels: []
1010
commit-message:
11-
prefix: "chore"
11+
prefix: "ci"
1212
ignore:
1313
# These actions deliver the latest versions by updating the major
1414
# release tag, so ignore minor and patch versions
@@ -117,11 +117,6 @@ updates:
117117
- "@eslint*"
118118
- "@typescript-eslint/eslint-plugin"
119119
- "@typescript-eslint/parser"
120-
jest:
121-
patterns:
122-
- "jest*"
123-
- "@swc/jest"
124-
- "@types/jest"
125120

126121
- package-ecosystem: "npm"
127122
directory: "/offlinedocs/"
@@ -146,20 +141,6 @@ updates:
146141
- version-update:semver-major
147142

148143
# Update dogfood.
149-
- package-ecosystem: "docker"
150-
directory: "/dogfood/"
151-
schedule:
152-
interval: "weekly"
153-
time: "06:00"
154-
timezone: "America/Chicago"
155-
commit-message:
156-
prefix: "chore"
157-
labels: []
158-
groups:
159-
dogfood-docker:
160-
patterns:
161-
- "*"
162-
163144
- package-ecosystem: "terraform"
164145
directory: "/dogfood/"
165146
schedule:

.github/workflows/ci.yaml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
138138
# Check for any typos
139139
- name: Check for typos
140-
uses: crate-ci/typos@v1.16.2
140+
uses: crate-ci/typos@v1.16.10
141141
with:
142142
config: .github/workflows/typos.toml
143143

@@ -188,16 +188,13 @@ jobs:
188188
189189
- name: Install Protoc
190190
run: |
191-
# protoc must be in lockstep with our dogfood Dockerfile or the
192-
# version in the comments will differ. This is also defined in
193-
# security.yaml
194-
set -x
195-
cd dogfood
196-
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
197-
protoc_path=/usr/local/bin/protoc
198-
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
199-
chmod +x $protoc_path
200-
protoc --version
191+
mkdir -p /tmp/proto
192+
pushd /tmp/proto
193+
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip
194+
unzip protoc.zip
195+
cp -r ./bin/* /usr/local/bin
196+
cp -r ./include /usr/local/bin/include
197+
popd
201198
202199
- name: make gen
203200
run: "make --output-sync -j -B gen"
@@ -532,14 +529,32 @@ jobs:
532529
- name: Setup Terraform
533530
uses: ./.github/actions/setup-tf
534531

532+
- name: go install tools
533+
run: |
534+
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
535+
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
536+
go install golang.org/x/tools/cmd/goimports@latest
537+
go install github.com/mikefarah/yq/v4@v4.30.6
538+
go install github.com/golang/mock/mockgen@v1.6.0
539+
540+
- name: Install Protoc
541+
run: |
542+
mkdir -p /tmp/proto
543+
pushd /tmp/proto
544+
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip
545+
unzip protoc.zip
546+
cp -r ./bin/* /usr/local/bin
547+
cp -r ./include /usr/local/bin/include
548+
popd
549+
535550
- name: Build
536551
run: |
537552
make -B site/out/index.html
538553
539554
- run: pnpm playwright:install
540555
working-directory: site
541556

542-
- run: pnpm playwright:test
557+
- run: pnpm playwright:test --workers 1
543558
env:
544559
DEBUG: pw:api
545560
working-directory: site
@@ -552,6 +567,14 @@ jobs:
552567
path: ./site/test-results/**/*.webm
553568
retention-days: 7
554569

570+
- name: Upload pprof dumps
571+
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
572+
uses: actions/upload-artifact@v3
573+
with:
574+
name: debug-pprof-dumps
575+
path: ./site/test-results/**/debug-pprof-*.txt
576+
retention-days: 7
577+
555578
chromatic:
556579
# REMARK: this is only used to build storybook and deploy it to Chromatic.
557580
runs-on: ubuntu-latest
@@ -586,6 +609,7 @@ jobs:
586609
# https://www.chromatic.com/docs/github-actions#forked-repositories
587610
projectToken: 695c25b6cb65
588611
workingDir: "./site"
612+
storybookBaseDir: "./site"
589613
# Prevent excessive build runs on minor version changes
590614
skip: "@(renovate/**|dependabot/**)"
591615
# Run TurboSnap to trace file dependencies to related stories
@@ -611,6 +635,7 @@ jobs:
611635
buildScriptName: "storybook:build"
612636
projectToken: 695c25b6cb65
613637
workingDir: "./site"
638+
storybookBaseDir: "./site"
614639
# Run TurboSnap to trace file dependencies to related stories
615640
# and tell chromatic to only take snapshots of relevent stories
616641
onlyChanged: true
@@ -640,9 +665,7 @@ jobs:
640665
go install github.com/golang/mock/mockgen@v1.6.0
641666
642667
- name: Setup sqlc
643-
uses: sqlc-dev/setup-sqlc@v3
644-
with:
645-
sqlc-version: "1.19.1"
668+
uses: ./.github/actions/setup-sqlc
646669

647670
- name: Format
648671
run: |

.github/workflows/contrib.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
path-to-document: "https://github.com/coder/cla/blob/main/README.md"
4747
# branch should not be protected
4848
branch: "main"
49-
allowlist: dependabot*
49+
# Some users have signed a corporate CLA with Coder so are exempt from signing our community one.
50+
allowlist: "coryb,aaronlehmann,dependabot*"
5051

5152
release-labels:
5253
runs-on: ubuntu-latest

.github/workflows/dogfood.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ on:
55
branches:
66
- main
77
paths:
8+
- "flake.nix"
9+
- "flake.lock"
810
- "dogfood/**"
911
- ".github/workflows/dogfood.yaml"
1012
# Uncomment these lines when testing with CI.
1113
# pull_request:
1214
# paths:
15+
# - "flake.nix"
16+
# - "flake.lock"
1317
# - "dogfood/**"
1418
# - ".github/workflows/dogfood.yaml"
1519
workflow_dispatch:
@@ -18,6 +22,9 @@ jobs:
1822
deploy_image:
1923
runs-on: buildjet-4vcpu-ubuntu-2204
2024
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
2128
- name: Get branch name
2229
id: branch-name
2330
uses: tj-actions/branch-names@v6.5
@@ -30,27 +37,24 @@ jobs:
3037
tag=${tag//\//--}
3138
echo "tag=${tag}" >> $GITHUB_OUTPUT
3239
33-
- name: Set up QEMU
34-
uses: docker/setup-qemu-action@v2
40+
- name: Install Nix
41+
uses: DeterminateSystems/nix-installer-action@v4
3542

36-
- name: Set up Docker Buildx
37-
uses: docker/setup-buildx-action@v2
43+
- name: Run the Magic Nix Cache
44+
uses: DeterminateSystems/magic-nix-cache-action@v2
45+
46+
- run: nix build .#devEnvImage && ./result | docker load
3847

3948
- name: Login to DockerHub
4049
uses: docker/login-action@v2
4150
with:
4251
username: ${{ secrets.DOCKERHUB_USERNAME }}
4352
password: ${{ secrets.DOCKERHUB_PASSWORD }}
4453

45-
- name: Build and push
46-
uses: docker/build-push-action@v4
47-
with:
48-
context: "{{defaultContext}}:dogfood"
49-
pull: true
50-
push: true
51-
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
52-
cache-from: type=registry,ref=codercom/oss-dogfood:latest
53-
cache-to: type=inline
54+
- name: Tag and Push
55+
run: |
56+
docker tag codercom/oss-dogfood:latest codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }}
57+
docker push codercom/oss-dogfood -a
5458
5559
deploy_template:
5660
needs: deploy_image

.github/workflows/pr-cleanup.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cleanup PR deployment and image
1+
name: pr-cleanup
22
on:
33
pull_request:
44
types: closed
@@ -35,14 +35,14 @@ jobs:
3535

3636
- name: Set up kubeconfig
3737
run: |
38-
set -euxo pipefail
38+
set -euo pipefail
3939
mkdir -p ~/.kube
4040
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG }}" > ~/.kube/config
4141
export KUBECONFIG=~/.kube/config
4242
4343
- name: Delete helm release
4444
run: |
45-
set -euxo pipefail
45+
set -euo pipefail
4646
helm delete --namespace "pr${{ steps.pr_number.outputs.PR_NUMBER }}" "pr${{ steps.pr_number.outputs.PR_NUMBER }}" || echo "helm release not found"
4747
4848
- name: "Remove PR namespace"
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: "Remove DNS records"
5353
run: |
54-
set -euxo pipefail
54+
set -euo pipefail
5555
# Get identifier for the record
5656
record_id=$(curl -X GET "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records?name=%2A.pr${{ steps.pr_number.outputs.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}" \
5757
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \

0 commit comments

Comments
 (0)