Skip to content

Commit 532b73e

Browse files
committed
Merge branch 'main' into dean/user-quiet-hours-page
2 parents 4d65381 + 3dc1e22 commit 532b73e

File tree

1,082 files changed

+31079
-25795
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,082 files changed

+31079
-25795
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/workflows/ci.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
offlinedocs: ${{ steps.filter.outputs.offlinedocs }}
4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 1
4545
# For pull requests it's not necessary to checkout the code
@@ -110,7 +110,7 @@ jobs:
110110
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
111111
steps:
112112
- name: Checkout
113-
uses: actions/checkout@v3
113+
uses: actions/checkout@v4
114114
with:
115115
fetch-depth: 1
116116

@@ -137,7 +137,7 @@ jobs:
137137
138138
# Check for any typos
139139
- name: Check for typos
140-
uses: crate-ci/typos@v1.16.10
140+
uses: crate-ci/typos@v1.16.11
141141
with:
142142
config: .github/workflows/typos.toml
143143

@@ -165,7 +165,7 @@ jobs:
165165
if: needs.changes.outputs.docs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
166166
steps:
167167
- name: Checkout
168-
uses: actions/checkout@v3
168+
uses: actions/checkout@v4
169169
with:
170170
fetch-depth: 1
171171

@@ -209,7 +209,7 @@ jobs:
209209
timeout-minutes: 7
210210
steps:
211211
- name: Checkout
212-
uses: actions/checkout@v3
212+
uses: actions/checkout@v4
213213
with:
214214
fetch-depth: 1
215215

@@ -248,7 +248,7 @@ jobs:
248248
- windows-2019
249249
steps:
250250
- name: Checkout
251-
uses: actions/checkout@v3
251+
uses: actions/checkout@v4
252252
with:
253253
fetch-depth: 1
254254

@@ -317,7 +317,7 @@ jobs:
317317
timeout-minutes: 25
318318
steps:
319319
- name: Checkout
320-
uses: actions/checkout@v3
320+
uses: actions/checkout@v4
321321
with:
322322
fetch-depth: 1
323323

@@ -365,7 +365,7 @@ jobs:
365365
timeout-minutes: 25
366366
steps:
367367
- name: Checkout
368-
uses: actions/checkout@v3
368+
uses: actions/checkout@v4
369369
with:
370370
fetch-depth: 1
371371

@@ -398,7 +398,7 @@ jobs:
398398
id-token: write
399399
steps:
400400
- name: Checkout
401-
uses: actions/checkout@v3
401+
uses: actions/checkout@v4
402402
with:
403403
fetch-depth: 0
404404

@@ -486,7 +486,7 @@ jobs:
486486
timeout-minutes: 20
487487
steps:
488488
- name: Checkout
489-
uses: actions/checkout@v3
489+
uses: actions/checkout@v4
490490
with:
491491
fetch-depth: 1
492492

@@ -516,7 +516,7 @@ jobs:
516516
timeout-minutes: 20
517517
steps:
518518
- name: Checkout
519-
uses: actions/checkout@v3
519+
uses: actions/checkout@v4
520520
with:
521521
fetch-depth: 1
522522

@@ -582,7 +582,7 @@ jobs:
582582
if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true'
583583
steps:
584584
- name: Checkout
585-
uses: actions/checkout@v3
585+
uses: actions/checkout@v4
586586
with:
587587
# Required by Chromatic for build-over-build history, otherwise we
588588
# only get 1 commit on shallow checkout.
@@ -647,7 +647,7 @@ jobs:
647647
if: needs.changes.outputs.offlinedocs == 'true' || needs.changes.outputs.ci == 'true'
648648
steps:
649649
- name: Checkout
650-
uses: actions/checkout@v3
650+
uses: actions/checkout@v4
651651
with:
652652
# 0 is required here for version.sh to work.
653653
fetch-depth: 0
@@ -727,7 +727,7 @@ jobs:
727727
DOCKER_CLI_EXPERIMENTAL: "enabled"
728728
steps:
729729
- name: Checkout
730-
uses: actions/checkout@v3
730+
uses: actions/checkout@v4
731731
with:
732732
fetch-depth: 0
733733

.github/workflows/docker-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
if: github.repository_owner == 'coder'
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636

3737
- name: Docker login
3838
uses: docker/login-action@v2

.github/workflows/dogfood.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: buildjet-4vcpu-ubuntu-2204
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727

2828
- name: Get branch name
2929
id: branch-name
@@ -61,7 +61,7 @@ jobs:
6161
runs-on: ubuntu-latest
6262
steps:
6363
- name: Checkout
64-
uses: actions/checkout@v3
64+
uses: actions/checkout@v4
6565

6666
- name: Get short commit SHA
6767
id: vars

.github/workflows/nightly-gauntlet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 240
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Setup Go
2323
uses: ./.github/actions/setup-go
@@ -44,7 +44,7 @@ jobs:
4444
timeout-minutes: 10
4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
4848

4949
- name: Setup Go
5050
uses: ./.github/actions/setup-go

.github/workflows/pr-deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
PR_OPEN: ${{ steps.check_pr.outputs.pr_open }}
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@v3
51+
uses: actions/checkout@v4
5252

5353
- name: Check if PR is open
5454
id: check_pr
@@ -78,7 +78,7 @@ jobs:
7878
runs-on: "ubuntu-latest"
7979
steps:
8080
- name: Checkout
81-
uses: actions/checkout@v3
81+
uses: actions/checkout@v4
8282
with:
8383
fetch-depth: 0
8484

@@ -202,7 +202,7 @@ jobs:
202202
CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
203203
steps:
204204
- name: Checkout
205-
uses: actions/checkout@v3
205+
uses: actions/checkout@v4
206206
with:
207207
fetch-depth: 0
208208

@@ -296,7 +296,7 @@ jobs:
296296
kubectl create namespace "pr${{ env.PR_NUMBER }}"
297297
298298
- name: Checkout
299-
uses: actions/checkout@v3
299+
uses: actions/checkout@v4
300300

301301
- name: Check and Create Certificate
302302
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
version: ${{ steps.version.outputs.version }}
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
with:
4545
fetch-depth: 0
4646

@@ -357,7 +357,7 @@ jobs:
357357
cd "$temp_dir"
358358
359359
# Download checksums
360-
checksums_url="$(gh release view --repo coder/coder v2.1.4 --json assets \
360+
checksums_url="$(gh release view --repo coder/coder "v$coder_version" --json assets \
361361
| jq -r ".assets | map(.url) | .[]" \
362362
| grep -e ".checksums.txt\$")"
363363
wget "$checksums_url" -O checksums.txt
@@ -409,7 +409,7 @@ jobs:
409409

410410
steps:
411411
- name: Checkout
412-
uses: actions/checkout@v3
412+
uses: actions/checkout@v4
413413
with:
414414
fetch-depth: 0
415415

@@ -489,7 +489,7 @@ jobs:
489489

490490
steps:
491491
- name: Checkout
492-
uses: actions/checkout@v3
492+
uses: actions/checkout@v4
493493
with:
494494
fetch-depth: 0
495495

.github/workflows/security.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030

3131
- name: Initialize CodeQL
3232
uses: github/codeql-action/init@v2
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
6060
steps:
6161
- name: Checkout
62-
uses: actions/checkout@v3
62+
uses: actions/checkout@v4
6363
with:
6464
fetch-depth: 0
6565

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
- name: Run delete-old-branches-action
3939
uses: beatlabs/delete-old-branches-action@v0.0.10
4040
with:

.prettierrc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# This config file is used in conjunction with `.editorconfig` to specify
22
# formatting for prettier-supported files. See `.editorconfig` and
3-
# `site/.editorconfig`for whitespace formatting options.
3+
# `site/.editorconfig` for whitespace formatting options.
44
printWidth: 80
55
proseWrap: always
6-
semi: false
76
trailingComma: all
87
useTabs: false
98
tabWidth: 2
@@ -12,6 +11,7 @@ overrides:
1211
- README.md
1312
- docs/api/**/*.md
1413
- docs/cli/**/*.md
14+
- docs/changelogs/*.md
1515
- .github/**/*.{yaml,yml,toml}
1616
- scripts/**/*.{yaml,yml,toml}
1717
options:

.vscode/settings.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,15 @@
190190
"**/node_modules": true
191191
},
192192
"search.exclude": {
193-
"scripts/metricsdocgen/metrics": true,
194-
"docs/api/*.md": true
193+
"**.pb.go": true,
194+
"**/*.gen.json": true,
195+
"**/testdata/*": true,
196+
"**Generated.ts": true,
197+
"coderd/apidoc/**": true,
198+
"docs/api/*.md": true,
199+
"docs/templates/*.md": true,
200+
"LICENSE": true,
201+
"scripts/metricsdocgen/metrics": true
195202
},
196203
// Ensure files always have a newline.
197204
"files.insertFinalNewline": true,

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/me
559559
pnpm run format:write:only ./docs/admin/prometheus.md
560560

561561
docs/cli.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
562-
BASE_PATH="." go run ./scripts/clidocgen
562+
CI=true BASE_PATH="." go run ./scripts/clidocgen
563563
pnpm run format:write:only ./docs/cli.md ./docs/cli/*.md ./docs/manifest.json
564564

565565
docs/admin/audit-logs.md: scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
@@ -570,7 +570,7 @@ coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS)
570570
./scripts/apidocgen/generate.sh
571571
pnpm run format:write:only ./docs/api ./docs/manifest.json ./coderd/apidoc/swagger.json
572572

573-
update-golden-files: cli/testdata/.gen-golden helm/coder/tests/testdata/.gen-golden helm/provisioner/tests/testdata/.gen-golden scripts/ci-report/testdata/.gen-golden enterprise/cli/testdata/.gen-golden coderd/.gen-golden
573+
update-golden-files: cli/testdata/.gen-golden helm/coder/tests/testdata/.gen-golden helm/provisioner/tests/testdata/.gen-golden scripts/ci-report/testdata/.gen-golden enterprise/cli/testdata/.gen-golden coderd/.gen-golden provisioner/terraform/testdata/.gen-golden
574574
.PHONY: update-golden-files
575575

576576
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES) $(wildcard cli/*_test.go)
@@ -593,6 +593,10 @@ coderd/.gen-golden: $(wildcard coderd/testdata/*/*.golden) $(GO_SRC_FILES) $(wil
593593
go test ./coderd -run="Test.*Golden$$" -update
594594
touch "$@"
595595

596+
provisioner/terraform/testdata/.gen-golden: $(wildcard provisioner/terraform/testdata/*/*.golden) $(GO_SRC_FILES) $(wildcard provisioner/terraform/*_test.go)
597+
go test ./provisioner/terraform -run="Test.*Golden$$" -update
598+
touch "$@"
599+
596600
scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*) $(wildcard scripts/ci-report/*.go)
597601
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
598602
touch "$@"

buildinfo/boring.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//go:build boringcrypto
2+
3+
package buildinfo
4+
5+
import "crypto/boring"
6+
7+
var boringcrypto = boring.Enabled()

buildinfo/buildinfo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ func IsAGPL() bool {
8787
return strings.Contains(agpl, "t")
8888
}
8989

90+
func IsBoringCrypto() bool {
91+
return boringcrypto
92+
}
93+
9094
// ExternalURL returns a URL referencing the current Coder version.
9195
// For production builds, this will link directly to a release.
9296
// For development builds, this will link to a commit.

buildinfo/notboring.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build !boringcrypto
2+
3+
package buildinfo
4+
5+
var boringcrypto = false

cli/clitest/golden.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
"strings"
1212
"testing"
1313

14-
"github.com/charmbracelet/lipgloss"
1514
"github.com/muesli/termenv"
1615
"github.com/stretchr/testify/require"
1716

1817
"github.com/coder/coder/v2/cli/clibase"
18+
"github.com/coder/coder/v2/cli/cliui"
1919
"github.com/coder/coder/v2/cli/config"
2020
"github.com/coder/coder/v2/coderd/coderdtest"
2121
"github.com/coder/coder/v2/coderd/database/dbtestutil"
@@ -53,13 +53,9 @@ func DefaultCases() []CommandHelpCase {
5353
//
5454
//nolint:tparallel,paralleltest
5555
func TestCommandHelp(t *testing.T, getRoot func(t *testing.T) *clibase.Cmd, cases []CommandHelpCase) {
56-
ogColorProfile := lipgloss.ColorProfile()
5756
// ANSI256 escape codes are far easier for humans to parse in a diff,
5857
// but TrueColor is probably more popular with modern terminals.
59-
lipgloss.SetColorProfile(termenv.ANSI)
60-
t.Cleanup(func() {
61-
lipgloss.SetColorProfile(ogColorProfile)
62-
})
58+
cliui.TestColor(t, termenv.ANSI)
6359
rootClient, replacements := prepareTestData(t)
6460

6561
root := getRoot(t)

0 commit comments

Comments
 (0)