Skip to content

Commit 2a0a836

Browse files
committed
Merge branch 'main' into bq/add-proxies-to-navbar
2 parents 07babac + 4eb0baa commit 2a0a836

File tree

258 files changed

+11588
-3425
lines changed

Some content is hidden

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

258 files changed

+11588
-3425
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- main
77

88
pull_request:
9-
109
workflow_dispatch:
1110

1211
permissions:
@@ -27,6 +26,9 @@ concurrency:
2726
group: ${{ github.workflow }}-${{ github.ref }}
2827
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2928

29+
env:
30+
CODER_GO_VERSION: "~1.20"
31+
3032
jobs:
3133
lint:
3234
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
@@ -37,11 +39,11 @@ jobs:
3739
# Install Go!
3840
- uses: actions/setup-go@v4
3941
with:
40-
go-version: "~1.20"
42+
go-version: ${{ env.CODER_GO_VERSION }}
4143

4244
# Check for any typos!
4345
- name: Check for typos
44-
uses: crate-ci/typos@v1.14.8
46+
uses: crate-ci/typos@v1.14.10
4547
with:
4648
config: .github/workflows/typos.toml
4749
- name: Fix the typos
@@ -55,7 +57,7 @@ jobs:
5557
- name: Lint Go
5658
uses: golangci/golangci-lint-action@v3.3.1
5759
with:
58-
version: v1.51.0
60+
version: v1.52.2
5961

6062
- name: Lint shell scripts
6163
uses: ludeeus/action-shellcheck@2.0.0
@@ -153,7 +155,7 @@ jobs:
153155
- uses: actions/setup-go@v4
154156
with:
155157
cache: false
156-
go-version: "~1.20"
158+
go-version: ${{ env.CODER_GO_VERSION }}
157159

158160
- name: Echo Go Cache Paths
159161
id: go-cache-paths
@@ -177,13 +179,15 @@ jobs:
177179
run: |
178180
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
179181
- name: Install protoc-gen-go
180-
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
182+
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
181183
- name: Install protoc-gen-go-drpc
182-
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
184+
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
183185
- name: Install goimports
184186
run: go install golang.org/x/tools/cmd/goimports@latest
185187
- name: Install yq
186188
run: go run github.com/mikefarah/yq/v4@v4.30.6
189+
- name: Install mockgen
190+
run: go install github.com/golang/mock/mockgen@v1.6.0
187191

188192
- name: Install Protoc
189193
run: |
@@ -254,7 +258,7 @@ jobs:
254258
- uses: actions/setup-go@v4
255259
with:
256260
cache: false
257-
go-version: "~1.20"
261+
go-version: ${{ env.CODER_GO_VERSION }}
258262

259263
- name: Echo Go Cache Paths
260264
id: go-cache-paths
@@ -343,7 +347,7 @@ jobs:
343347
- uses: actions/setup-go@v4
344348
with:
345349
cache: false
346-
go-version: "~1.20"
350+
go-version: ${{ env.CODER_GO_VERSION }}
347351

348352
- name: Echo Go Cache Paths
349353
id: go-cache-paths
@@ -435,7 +439,7 @@ jobs:
435439
- uses: actions/setup-go@v4
436440
with:
437441
cache: false
438-
go-version: "~1.20"
442+
go-version: ${{ env.CODER_GO_VERSION }}
439443

440444
- name: Echo Go Cache Paths
441445
id: go-cache-paths
@@ -587,7 +591,7 @@ jobs:
587591
- uses: actions/setup-go@v4
588592
with:
589593
cache: false
590-
go-version: "~1.20"
594+
go-version: ${{ env.CODER_GO_VERSION }}
591595

592596
- uses: hashicorp/setup-terraform@v2
593597
with:

.github/workflows/dogfood.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
cache-from: type=registry,ref=codercom/oss-dogfood:latest
5050
cache-to: type=inline
5151
deploy_template:
52+
needs: deploy_image
5253
runs-on: ubuntu-latest
5354
steps:
5455
- name: Checkout

.github/workflows/release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- "v*"
77
workflow_dispatch:
88
inputs:
9+
go_version:
10+
description: "Go version to use for building."
11+
required: false
12+
default: "1.20.4"
913
dry_run:
1014
description: Perform a dry-run release (devel). Note that ref must be an annotated tag when run without dry-run.
1115
type: boolean
@@ -28,6 +32,10 @@ env:
2832
# https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/
2933
CODER_RELEASE: ${{ !inputs.dry_run }}
3034
CODER_DRY_RUN: ${{ inputs.dry_run }}
35+
# For some reason, setup-go won't actually pick up a new patch version if
36+
# it has an old one cached. We need to manually specify the versions so we
37+
# can get the latest release. Never use "~1.xx" here!
38+
CODER_GO_VERSION: "1.20.4"
3139

3240
jobs:
3341
release:
@@ -92,7 +100,7 @@ jobs:
92100

93101
- uses: actions/setup-go@v4
94102
with:
95-
go-version: "~1.20"
103+
go-version: ${{ env.CODER_GO_VERSION }}
96104

97105
- name: Cache Node
98106
id: cache-node

.github/workflows/security.yaml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.ref }}-security
1919
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

21+
env:
22+
CODER_GO_VERSION: "1.20.4"
23+
2124
jobs:
2225
codeql:
2326
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
@@ -32,18 +35,7 @@ jobs:
3235
- name: Setup Go
3336
uses: actions/setup-go@v4
3437
with:
35-
go-version: "~1.20"
36-
37-
- name: Go Cache Paths
38-
id: go-cache-paths
39-
run: |
40-
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
41-
42-
- name: Go Mod Cache
43-
uses: actions/cache@v3
44-
with:
45-
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
46-
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
38+
go-version: ${{ env.CODER_GO_VERSION }}
4739

4840
# Workaround to prevent CodeQL from building the dashboard.
4941
- name: Remove Makefile
@@ -73,18 +65,7 @@ jobs:
7365

7466
- uses: actions/setup-go@v4
7567
with:
76-
go-version: "~1.20"
77-
78-
- name: Go Cache Paths
79-
id: go-cache-paths
80-
run: |
81-
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
82-
83-
- name: Go Mod Cache
84-
uses: actions/cache@v3
85-
with:
86-
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
87-
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
68+
go-version: ${{ env.CODER_GO_VERSION }}
8869

8970
- name: Cache Node
9071
id: cache-node
@@ -102,10 +83,12 @@ jobs:
10283
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
10384
- name: Install yq
10485
run: go run github.com/mikefarah/yq/v4@v4.30.6
86+
- name: Install mockgen
87+
run: go install github.com/golang/mock/mockgen@v1.6.0
10588
- name: Install protoc-gen-go
106-
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
89+
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
10790
- name: Install protoc-gen-go-drpc
108-
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
91+
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
10992
- name: Install Protoc
11093
run: |
11194
# protoc must be in lockstep with our dogfood Dockerfile or the

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Checkout repository
3939
uses: actions/checkout@v2
4040
- name: Run delete-old-branches-action
41-
uses: beatlabs/delete-old-branches-action@v0.0.9
41+
uses: beatlabs/delete-old-branches-action@v0.0.10
4242
with:
4343
repo_token: ${{ github.token }}
4444
date: "6 months ago"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ site/stats/
5959
./scaletest/terraform/.terraform
6060
./scaletest/terraform/.terraform.lock.hcl
6161
terraform.tfstate.*
62+
**/*.tfvars

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ linters-settings:
5454
# - importShadow
5555
- indexAlloc
5656
- initClause
57-
- ioutilDeprecated
5857
- mapKey
5958
- methodExprCall
6059
# - nestingReduce

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ site/stats/
6262
./scaletest/terraform/.terraform
6363
./scaletest/terraform/.terraform.lock.hcl
6464
terraform.tfstate.*
65+
**/*.tfvars
6566
# .prettierignore.include:
6667
# Helm templates contain variables that are invalid YAML and can't be formatted
6768
# by Prettier.

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ lint/shellcheck: $(SHELL_SRC_FILES)
420420
gen: \
421421
coderd/database/dump.sql \
422422
coderd/database/querier.go \
423+
coderd/database/dbmock/store.go \
423424
provisionersdk/proto/provisioner.pb.go \
424425
provisionerd/proto/provisionerd.pb.go \
425426
site/src/api/typesGenerated.ts \
@@ -441,6 +442,7 @@ gen/mark-fresh:
441442
files="\
442443
coderd/database/dump.sql \
443444
coderd/database/querier.go \
445+
coderd/database/dbmock/store.go \
444446
provisionersdk/proto/provisioner.pb.go \
445447
provisionerd/proto/provisionerd.pb.go \
446448
site/src/api/typesGenerated.ts \
@@ -476,6 +478,10 @@ coderd/database/dump.sql: coderd/database/gen/dump/main.go $(wildcard coderd/dat
476478
coderd/database/querier.go: coderd/database/sqlc.yaml coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql) coderd/database/gen/enum/main.go
477479
./coderd/database/generate.sh
478480

481+
482+
coderd/database/dbmock/store.go: coderd/database/db.go coderd/database/querier.go
483+
go generate ./coderd/database/dbmock/
484+
479485
provisionersdk/proto/provisioner.pb.go: provisionersdk/proto/provisioner.proto
480486
protoc \
481487
--go_out=. \

0 commit comments

Comments
 (0)