Skip to content

Commit 3c16b95

Browse files
committed
Merge branch 'main' into bryphe/prototype/workspaces-page
2 parents fa6c8c3 + 7cf686c commit 3c16b95

Some content is hidden

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

61 files changed

+5029
-1967
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Generated files
22
peerbroker/proto/*.go linguist-generated=true
3+
provisionerd/proto/*.go linguist-generated=true
34
provisionersdk/proto/*.go linguist-generated=true

.github/dependabot.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: "06:00"
8+
timezone: "America/Chicago"
9+
commit-message:
10+
prefix: "chore"
11+
ignore:
12+
# These actions deliver the latest versions by updating the major
13+
# release tag, so ignore minor and patch versions
14+
- dependency-name: "actions/*"
15+
update-types:
16+
- version-update:semver-minor
17+
- version-update:semver-patch
18+
- dependency-name: "Apple-Actions/import-codesign-certs"
19+
update-types:
20+
- version-update:semver-minor
21+
- version-update:semver-patch
22+
- dependency-name: "marocchino/sticky-pull-request-comment"
23+
update-types:
24+
- version-update:semver-minor
25+
- version-update:semver-patch
26+
27+
- package-ecosystem: "gomod"
28+
directory: "/"
29+
schedule:
30+
interval: "daily"
31+
time: "06:00"
32+
timezone: "America/Chicago"
33+
commit-message:
34+
prefix: "chore"
35+
36+
- package-ecosystem: "npm"
37+
directory: "/"
38+
schedule:
39+
interval: "daily"
40+
time: "06:00"
41+
timezone: "America/Chicago"
42+
commit-message:
43+
prefix: "chore"
44+
ignore:
45+
# Ignore major updates to Node.js types, because they need to
46+
# correspond to the Node.js engine version
47+
- dependency-name: "@types/node"
48+
update-types:
49+
- version-update:semver-major

.github/stale.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 14
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 5
5+
# Label to apply when stale.
6+
staleLabel: stale
7+
# Comment to post when marking an issue as stale. Set to `false` to disable
8+
markComment: >
9+
This issue has been automatically marked as stale because it has not had
10+
recent activity. It will be closed if no activity occurs in the next 5 days.
11+
# Comment to post when closing a stale issue. Set to `false` to disable
12+
closeComment: false

.github/workflows/coder.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ on:
1010

1111
pull_request:
1212
branches:
13-
- main
14-
- "release/*"
13+
- "*"
1514

1615
workflow_dispatch:
1716

@@ -149,20 +148,27 @@ jobs:
149148
150149
- run: go install gotest.tools/gotestsum@latest
151150

151+
- uses: hashicorp/setup-terraform@v1
152+
if: runner.os == 'Linux'
153+
with:
154+
terraform_version: 1.1.2
155+
terraform_wrapper: false
156+
152157
- name: Test with Mock Database
153158
run:
154159
gotestsum --jsonfile="gotests.json" --packages="./..." --
155160
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
156-
-count=3 -race -parallel=2
161+
-count=3 -race -short -parallel=2
157162

158163
- name: Test with PostgreSQL Database
159164
if: runner.os == 'Linux'
160165
run:
161166
DB=true gotestsum --jsonfile="gotests.json" --packages="./..." --
162167
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
163-
-count=1 -race -parallel=2
168+
-count=1 -race -parallel=1
164169

165170
- uses: codecov/codecov-action@v2
171+
if: github.actor != 'dependabot[bot]'
166172
with:
167173
token: ${{ secrets.CODECOV_TOKEN }}
168174
files: ./gotests.coverage
@@ -195,6 +201,7 @@ jobs:
195201
- run: yarn test:coverage
196202

197203
- uses: codecov/codecov-action@v2
204+
if: github.actor != 'dependabot[bot]'
198205
with:
199206
token: ${{ secrets.CODECOV_TOKEN }}
200207
files: ./coverage/lcov.info

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ linters:
241241
- staticcheck
242242
- structcheck
243243
- tenv
244+
- tparallel
244245
- typecheck
245246
- unconvert
246247
- unused

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"foxundermoon.shell-format",
77
"emeraldwalk.runonsave",
88
"zxh404.vscode-proto3",
9-
"redhat.vscode-yaml"
9+
"redhat.vscode-yaml",
10+
"streetsidesoftware.code-spell-checker"
1011
]
1112
}

Makefile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ bin/coderd:
33
go build -o bin/coderd cmd/coderd/main.go
44
.PHONY: bin/coderd
55

6-
build: site/out bin/coderd
6+
bin/provisionerd:
7+
mkdir -p bin
8+
go build -o bin/provisionerd cmd/provisionerd/main.go
9+
.PHONY: bin/provisionerd
10+
11+
build: site/out bin/coderd bin/provisionerd
712
.PHONY: build
813

914
# Runs migrations to output a dump of the database.
@@ -38,27 +43,34 @@ fmt/sql: ./database/query.sql
3843
fmt: fmt/prettier fmt/sql
3944
.PHONY: fmt
4045

41-
gen: database/generate peerbroker/proto provisionersdk/proto
46+
gen: database/generate peerbroker/proto provisionersdk/proto provisionerd/proto
4247
.PHONY: gen
4348

44-
# Generates the protocol files.
4549
peerbroker/proto: peerbroker/proto/peerbroker.proto
46-
cd peerbroker/proto && protoc \
50+
protoc \
4751
--go_out=. \
4852
--go_opt=paths=source_relative \
4953
--go-drpc_out=. \
5054
--go-drpc_opt=paths=source_relative \
51-
./peerbroker.proto
55+
./peerbroker/proto/peerbroker.proto
5256
.PHONY: peerbroker/proto
5357

54-
# Generates the protocol files.
58+
provisionerd/proto: provisionerd/proto/provisionerd.proto
59+
protoc \
60+
--go_out=. \
61+
--go_opt=paths=source_relative \
62+
--go-drpc_out=. \
63+
--go-drpc_opt=paths=source_relative \
64+
./provisionerd/proto/provisionerd.proto
65+
.PHONY: provisionerd/proto
66+
5567
provisionersdk/proto: provisionersdk/proto/provisioner.proto
56-
cd provisionersdk/proto && protoc \
68+
protoc \
5769
--go_out=. \
5870
--go_opt=paths=source_relative \
5971
--go-drpc_out=. \
6072
--go-drpc_opt=paths=source_relative \
61-
./provisioner.proto
73+
./provisionersdk/proto/provisioner.proto
6274
.PHONY: provisionersdk/proto
6375

6476
site/out:

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ ignore:
2929
# All coderd tests fail if this doesn't work.
3030
- database/databasefake
3131
- peerbroker/proto
32+
- provisionerd/proto
3233
- provisionersdk/proto

coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package coderd
33
import (
44
"net/http"
55

6-
"github.com/go-chi/chi"
6+
"github.com/go-chi/chi/v5"
77

88
"cdr.dev/slog"
99
"github.com/coder/coder/database"

0 commit comments

Comments
 (0)