Skip to content

Commit bf3789c

Browse files
author
Yixin Hao
committed
Merge tag 'v0.22.0' into immoral-v0.17.0
Release v0.22.0
2 parents 6610e06 + 3ff2ae1 commit bf3789c

File tree

956 files changed

+47799
-23747
lines changed

Some content is hidden

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

956 files changed

+47799
-23747
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
uses: actions/checkout@v3
3636

3737
# Install Go!
38-
- uses: actions/setup-go@v3
38+
- uses: actions/setup-go@v4
3939
with:
4040
go-version: "~1.20"
4141

4242
# Check for any typos!
4343
- name: Check for typos
44-
uses: crate-ci/typos@v1.13.14
44+
uses: crate-ci/typos@v1.14.3
4545
with:
4646
config: .github/workflows/typos.toml
4747
- name: Fix the typos
@@ -150,7 +150,7 @@ jobs:
150150
- name: Install node_modules
151151
run: ./scripts/yarn_install.sh
152152

153-
- uses: actions/setup-go@v3
153+
- uses: actions/setup-go@v4
154154
with:
155155
go-version: "~1.20"
156156

@@ -174,7 +174,7 @@ jobs:
174174

175175
- name: Install sqlc
176176
run: |
177-
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.16.0/sqlc_1.16.0_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
177+
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.17.2/sqlc_1.17.2_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
178178
- name: Install protoc-gen-go
179179
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
180180
- name: Install protoc-gen-go-drpc
@@ -250,18 +250,15 @@ jobs:
250250
steps:
251251
- uses: actions/checkout@v3
252252

253-
- uses: actions/setup-go@v3
253+
- uses: actions/setup-go@v4
254254
with:
255255
go-version: "~1.20"
256256

257-
# Sadly the new "set output" syntax (of writing env vars to
258-
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
259-
# deprecated syntax here.
260257
- name: Echo Go Cache Paths
261258
id: go-cache-paths
262259
run: |
263-
echo "::set-output name=GOCACHE::$(go env GOCACHE)"
264-
echo "::set-output name=GOMODCACHE::$(go env GOMODCACHE)"
260+
echo "GOCACHE=$(go env GOCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
261+
echo "GOMODCACHE=$(go env GOMODCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
265262
266263
- name: Go Build Cache
267264
uses: actions/cache@v3
@@ -276,7 +273,7 @@ jobs:
276273
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
277274

278275
- name: Install gotestsum
279-
uses: jaxxstorm/action-install-gh-release@v1.9.0
276+
uses: jaxxstorm/action-install-gh-release@v1.10.0
280277
env:
281278
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
282279
with:
@@ -302,7 +299,14 @@ jobs:
302299
echo "cover=false" >> $GITHUB_OUTPUT
303300
fi
304301
305-
gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS
302+
gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" --packages="./..." -- -parallel=8 -timeout=7m -short -failfast $COVERAGE_FLAGS
303+
304+
- name: Print test stats
305+
if: success() || failure()
306+
run: |
307+
# Artifacts are not available after rerunning a job,
308+
# so we need to print the test stats to the log.
309+
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
306310
307311
- uses: actions/upload-artifact@v3
308312
if: success() || failure()
@@ -333,7 +337,7 @@ jobs:
333337
steps:
334338
- uses: actions/checkout@v3
335339

336-
- uses: actions/setup-go@v3
340+
- uses: actions/setup-go@v4
337341
with:
338342
go-version: "~1.20"
339343

@@ -356,7 +360,7 @@ jobs:
356360
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
357361

358362
- name: Install gotestsum
359-
uses: jaxxstorm/action-install-gh-release@v1.9.0
363+
uses: jaxxstorm/action-install-gh-release@v1.10.0
360364
env:
361365
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
362366
with:
@@ -372,6 +376,13 @@ jobs:
372376
run: |
373377
make test-postgres
374378
379+
- name: Print test stats
380+
if: success() || failure()
381+
run: |
382+
# Artifacts are not available after rerunning a job,
383+
# so we need to print the test stats to the log.
384+
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
385+
375386
- uses: actions/upload-artifact@v3
376387
if: success() || failure()
377388
with:
@@ -416,7 +427,7 @@ jobs:
416427
- name: Set up Google Cloud SDK
417428
uses: google-github-actions/setup-gcloud@v1
418429

419-
- uses: actions/setup-go@v3
430+
- uses: actions/setup-go@v4
420431
with:
421432
go-version: "~1.20"
422433

@@ -512,7 +523,7 @@ jobs:
512523
- name: Install node_modules
513524
run: ./scripts/yarn_install.sh
514525

515-
- run: yarn test:ci
526+
- run: yarn test:ci --max-workers ${{ steps.cpu-cores.outputs.count }}
516527
working-directory: site
517528

518529
- uses: codecov/codecov-action@v3
@@ -545,7 +556,7 @@ jobs:
545556
.eslintcache
546557
key: js-${{ runner.os }}-e2e-${{ hashFiles('**/yarn.lock') }}
547558

548-
- uses: actions/setup-go@v3
559+
- uses: actions/setup-go@v4
549560
with:
550561
go-version: "~1.20"
551562

.github/workflows/release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
username: ${{ github.actor }}
9191
password: ${{ secrets.GITHUB_TOKEN }}
9292

93-
- uses: actions/setup-go@v3
93+
- uses: actions/setup-go@v4
9494
with:
9595
go-version: "~1.20"
9696

@@ -302,6 +302,7 @@ jobs:
302302
helm repo index build/helm --url https://helm.coder.com/v2 --merge build/helm/index.yaml
303303
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/coder_helm_${version}.tgz gs://helm.coder.com/v2
304304
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
305+
gsutil -h "Cache-Control:no-cache,max-age=0" cp helm/artifacthub-repo.yml gs://helm.coder.com/v2
305306
306307
- name: Upload artifacts to actions (if dry-run)
307308
if: ${{ inputs.dry_run }}

.github/workflows/security.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
languages: go, javascript
3131

3232
- name: Setup Go
33-
uses: actions/setup-go@v3
33+
uses: actions/setup-go@v4
3434
with:
3535
go-version: "~1.20"
3636

@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
fetch-depth: 0
7373

74-
- uses: actions/setup-go@v3
74+
- uses: actions/setup-go@v4
7575
with:
7676
go-version: "~1.20"
7777

@@ -97,6 +97,9 @@ jobs:
9797
restore-keys: |
9898
js-${{ runner.os }}-
9999
100+
- name: Install sqlc
101+
run: |
102+
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.17.2/sqlc_1.17.2_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
100103
- name: Install yq
101104
run: go run github.com/mikefarah/yq/v4@v4.30.6
102105
- name: Install protoc-gen-go
@@ -137,7 +140,7 @@ jobs:
137140
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT
138141
139142
- name: Run Trivy vulnerability scanner
140-
uses: aquasecurity/trivy-action@8bd2f9fbda2109502356ff8a6a89da55b1ead252
143+
uses: aquasecurity/trivy-action@1f0aa582c8c8f5f7639610d6d38baddfea4fdcee
141144
with:
142145
image-ref: ${{ steps.build.outputs.image }}
143146
format: sarif

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
issues: write
1212
pull-requests: write
1313
steps:
14-
- uses: actions/stale@v7.0.0
14+
- uses: actions/stale@v8.0.0
1515
with:
1616
stale-issue-label: "stale"
1717
stale-pr-label: "stale"

.github/workflows/typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ extend-exclude = [
2424
# These files contain base64 strings that confuse the detector
2525
"**XService**.ts",
2626
"**identity.go",
27+
"scripts/ci-report/testdata/**",
2728
]

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
**/*.swp
77
gotests.coverage
88
gotests.xml
9-
gotestsum.json
9+
gotests_stats.json
10+
gotests.json
1011
node_modules/
1112
vendor/
1213
yarn-error.log
@@ -27,9 +28,10 @@ site/test-results/*
2728
site/e2e/test-results/*
2829
site/e2e/states/*.json
2930
site/playwright-report/*
31+
site/.swc
3032

31-
# Make target for updating golden files.
32-
cli/testdata/.gen-golden
33+
# Make target for updating golden files (any dir).
34+
.gen-golden
3335

3436
# Build
3537
/build/

.prettierignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
**/*.swp
1010
gotests.coverage
1111
gotests.xml
12-
gotestsum.json
12+
gotests_stats.json
13+
gotests.json
1314
node_modules/
1415
vendor/
1516
yarn-error.log
@@ -30,9 +31,10 @@ site/test-results/*
3031
site/e2e/test-results/*
3132
site/e2e/states/*.json
3233
site/playwright-report/*
34+
site/.swc
3335

34-
# Make target for updating golden files.
35-
cli/testdata/.gen-golden
36+
# Make target for updating golden files (any dir).
37+
.gen-golden
3638

3739
# Build
3840
/build/

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"pqtype",
9191
"prometheusmetrics",
9292
"promhttp",
93-
"promptui",
9493
"protobuf",
9594
"provisionerd",
9695
"provisionerdserver",
@@ -136,6 +135,7 @@
136135
"thead",
137136
"tios",
138137
"tmpdir",
138+
"tokenconfig",
139139
"tparallel",
140140
"trialer",
141141
"trimprefix",

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,6 @@ docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/me
501501
yarn run format:write:only ../docs/admin/prometheus.md
502502

503503
docs/cli.md: scripts/clidocgen/main.go $(GO_SRC_FILES) docs/manifest.json
504-
# TODO(@ammario): re-enable server.md once we finish clibase migration.
505-
ls ./docs/cli/*.md | grep -vP "\/coder_server" | xargs rm
506504
BASE_PATH="." go run ./scripts/clidocgen
507505
cd site
508506
yarn run format:write:only ../docs/cli.md ../docs/cli/*.md ../docs/manifest.json
@@ -516,13 +514,21 @@ coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS)
516514
./scripts/apidocgen/generate.sh
517515
yarn run --cwd=site format:write:only ../docs/api ../docs/manifest.json ../coderd/apidoc/swagger.json
518516

519-
update-golden-files: cli/testdata/.gen-golden
517+
update-golden-files: cli/testdata/.gen-golden helm/tests/testdata/.gen-golden scripts/ci-report/testdata/.gen-golden
520518
.PHONY: update-golden-files
521519

522-
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(GO_SRC_FILES)
520+
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES)
523521
go test ./cli -run=TestCommandHelp -update
524522
touch "$@"
525523

524+
helm/tests/testdata/.gen-golden: $(wildcard helm/tests/testdata/*.golden) $(GO_SRC_FILES)
525+
go test ./helm/tests -run=TestUpdateGoldenFiles -update
526+
touch "$@"
527+
528+
scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*) $(wildcard scripts/ci-report/*.go)
529+
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
530+
touch "$@"
531+
526532
# Generate a prettierrc for the site package that uses relative paths for
527533
# overrides. This allows us to share the same prettier config between the
528534
# site and the root of the repo.
@@ -594,6 +600,7 @@ test-postgres: test-clean test-postgres-docker
594600
# more consistent execution.
595601
DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \
596602
--junitfile="gotests.xml" \
603+
--jsonfile="gotests.json" \
597604
--packages="./..." -- \
598605
-covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \
599606
-parallel=4 \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ coder server --postgres-url <url> --access-url <url>
8484

8585
> <sup>1</sup> For production deployments, set up an external PostgreSQL instance for reliability.
8686
87-
Use `coder --help` to get a list of flags and environment variables. Use our [quickstart guide](https://coder.com/docs/v2/latest/quickstart) for a full walkthrough.
87+
Use `coder --help` to get a list of flags and environment variables. Use our [install guides](https://coder.com/docs/v2/latest/guides) for a full walkthrough.
8888

8989
## Documentation
9090

0 commit comments

Comments
 (0)