Skip to content

Commit 688093b

Browse files
committed
Merge remote-tracking branch 'origin/main' into betterexamples
2 parents 1614bd3 + 3f6096b commit 688093b

File tree

1,710 files changed

+101208
-50289
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,710 files changed

+101208
-50289
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
"features": {
66
// See all possible options here https://github.com/devcontainers/features/tree/main/src/docker-in-docker
7-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
7+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
8+
"moby": "false"
9+
}
810
},
911
// SYS_PTRACE to enable go debugging
10-
// without --priviliged the Github Codespace build fails (not required otherwise)
11-
"runArgs": ["--cap-add=SYS_PTRACE", "--privileged"]
12+
"runArgs": ["--cap-add=SYS_PTRACE"]
1213
}

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

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,15 @@ description: |
44
inputs:
55
version:
66
description: "The Go version to use."
7-
default: "1.20.7"
7+
default: "1.21.5"
88
runs:
99
using: "composite"
1010
steps:
11-
- name: Cache go toolchain
12-
uses: buildjet/cache@v3
13-
with:
14-
path: |
15-
${{ runner.tool_cache }}/go/${{ inputs.version }}
16-
key: gotoolchain-${{ runner.os }}-${{ inputs.version }}
17-
restore-keys: |
18-
gotoolchain-${{ runner.os }}-
19-
2011
- name: Setup Go
2112
uses: buildjet/setup-go@v4
2213
with:
23-
# We do our own caching for implementation clarity.
24-
cache: false
2514
go-version: ${{ inputs.version }}
2615

27-
- name: Get cache dirs
28-
shell: bash
29-
run: |
30-
set -x
31-
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
32-
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
33-
34-
# We split up GOMODCACHE from GOCACHE because the latter must be invalidated
35-
# on code change, but the former can be kept.
36-
- name: Cache $GOMODCACHE
37-
uses: buildjet/cache@v3
38-
with:
39-
path: |
40-
${{ env.GOMODCACHE }}
41-
key: gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ github.job }}
42-
# restore-keys aren't used because it causes the cache to grow
43-
# infinitely. go.sum changes very infrequently, so rebuilding from
44-
# scratch every now and then isn't terrible.
45-
46-
- name: Cache $GOCACHE
47-
uses: buildjet/cache@v3
48-
with:
49-
path: |
50-
${{ env.GOCACHE }}
51-
# Job name must be included in the key for effective test cache reuse.
52-
# The key format is intentionally different than GOMODCACHE, because any
53-
# time a Go file changes we invalidate this cache, whereas GOMODCACHE is
54-
# only invalidated when go.sum changes.
55-
# The number in the key is incremented when the cache gets too large,
56-
# since this technically grows without bound.
57-
key: gocache2-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
58-
restore-keys: |
59-
gocache2-${{ runner.os }}-${{ github.job }}-
60-
gocache2-${{ runner.os }}-
61-
6216
- name: Install gotestsum
6317
shell: bash
6418
run: go install gotest.tools/gotestsum@latest

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ runs:
55
using: "composite"
66
steps:
77
- name: Setup sqlc
8-
uses: sqlc-dev/setup-sqlc@v3
8+
uses: sqlc-dev/setup-sqlc@v4
99
with:
10-
sqlc-version: "1.20.0"
10+
sqlc-version: "1.24.0"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: "composite"
66
steps:
77
- name: Install Terraform
8-
uses: hashicorp/setup-terraform@v2
8+
uses: hashicorp/setup-terraform@v3
99
with:
10-
terraform_version: 1.5.5
10+
terraform_version: 1.5.7
1111
terraform_wrapper: false

.github/actions/upload-datadog/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
echo "No API key provided, skipping..."
2121
exit 0
2222
fi
23-
npm install -g @datadog/datadog-ci@2.10.0
23+
npm install -g @datadog/datadog-ci@2.21.0
2424
datadog-ci junit upload --service coder ./gotests.xml \
2525
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
2626
env:

.github/dependabot.yaml

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ updates:
4444
update-types:
4545
- version-update:semver-patch
4646
groups:
47-
otel:
47+
go:
4848
patterns:
49-
- "go.nhat.io/otelsql"
50-
- "go.opentelemetry.io/otel*"
51-
golang-x:
52-
patterns:
53-
- "golang.org/x/*"
49+
- "*"
5450

5551
# Update our Dockerfile.
5652
- package-ecosystem: "docker"
@@ -66,10 +62,6 @@ updates:
6662
# We need to coordinate terraform updates with the version hardcoded in
6763
# our Go code.
6864
- dependency-name: "terraform"
69-
groups:
70-
scripts-docker:
71-
patterns:
72-
- "*"
7365

7466
- package-ecosystem: "npm"
7567
directory: "/site/"
@@ -94,30 +86,9 @@ updates:
9486
- version-update:semver-major
9587
open-pull-requests-limit: 15
9688
groups:
97-
react:
98-
patterns:
99-
- "react*"
100-
- "@types/react*"
101-
xterm:
102-
patterns:
103-
- "xterm*"
104-
xstate:
89+
site:
10590
patterns:
106-
- "xstate"
107-
- "@xstate*"
108-
mui:
109-
patterns:
110-
- "@mui*"
111-
storybook:
112-
patterns:
113-
- "@storybook*"
114-
- "storybook*"
115-
eslint:
116-
patterns:
117-
- "eslint*"
118-
- "@eslint*"
119-
- "@typescript-eslint/eslint-plugin"
120-
- "@typescript-eslint/parser"
91+
- "*"
12192

12293
- package-ecosystem: "npm"
12394
directory: "/offlinedocs/"
@@ -140,6 +111,10 @@ updates:
140111
- dependency-name: "@types/node"
141112
update-types:
142113
- version-update:semver-major
114+
groups:
115+
offlinedocs:
116+
patterns:
117+
- "*"
143118

144119
# Update dogfood.
145120
- package-ecosystem: "terraform"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
app = "paris-coder"
2+
primary_region = "cdg"
3+
4+
[experimental]
5+
entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://[${FLY_PRIVATE_IP}]:3000\" /opt/coder wsproxy server"]
6+
auto_rollback = true
7+
8+
[build]
9+
image = "ghcr.io/coder/coder-preview:main"
10+
11+
[env]
12+
CODER_ACCESS_URL = "https://paris.fly.dev.coder.com"
13+
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
14+
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
15+
CODER_WILDCARD_ACCESS_URL = "*--apps.paris.fly.dev.coder.com"
16+
17+
[http_service]
18+
internal_port = 3000
19+
force_https = true
20+
auto_stop_machines = true
21+
auto_start_machines = true
22+
min_machines_running = 0
23+
24+
[[vm]]
25+
cpu_kind = "shared"
26+
cpus = 2
27+
memory_mb = 512
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
app = "sao-paulo-coder"
2+
primary_region = "gru"
3+
4+
[experimental]
5+
entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://[${FLY_PRIVATE_IP}]:3000\" /opt/coder wsproxy server"]
6+
auto_rollback = true
7+
8+
[build]
9+
image = "ghcr.io/coder/coder-preview:main"
10+
11+
[env]
12+
CODER_ACCESS_URL = "https://sao-paulo.fly.dev.coder.com"
13+
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
14+
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
15+
CODER_WILDCARD_ACCESS_URL = "*--apps.sao-paulo.fly.dev.coder.com"
16+
17+
[http_service]
18+
internal_port = 3000
19+
force_https = true
20+
auto_stop_machines = true
21+
auto_start_machines = true
22+
min_machines_running = 0
23+
24+
[[vm]]
25+
cpu_kind = "shared"
26+
cpus = 2
27+
memory_mb = 512
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
app = "sydney-coder"
2+
primary_region = "syd"
3+
4+
[experimental]
5+
entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://[${FLY_PRIVATE_IP}]:3000\" /opt/coder wsproxy server"]
6+
auto_rollback = true
7+
8+
[build]
9+
image = "ghcr.io/coder/coder-preview:main"
10+
11+
[env]
12+
CODER_ACCESS_URL = "https://sydney.fly.dev.coder.com"
13+
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
14+
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
15+
CODER_WILDCARD_ACCESS_URL = "*--apps.sydney.fly.dev.coder.com"
16+
17+
[http_service]
18+
internal_port = 3000
19+
force_https = true
20+
auto_stop_machines = true
21+
auto_start_machines = true
22+
min_machines_running = 0
23+
24+
[[vm]]
25+
cpu_kind = "shared"
26+
cpus = 2
27+
memory_mb = 512

.github/pr-deployments/template/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
terraform {
22
required_providers {
33
coder = {
4-
source = "coder/coder"
5-
version = "~> 0.11.0"
4+
source = "coder/coder"
65
}
76
kubernetes = {
8-
source = "hashicorp/kubernetes"
9-
version = "~> 2.22"
7+
source = "hashicorp/kubernetes"
108
}
119
}
1210
}
@@ -237,6 +235,9 @@ resource "kubernetes_deployment" "main" {
237235
"app.kubernetes.io/name" = "coder-workspace"
238236
}
239237
}
238+
strategy {
239+
type = "Recreate"
240+
}
240241

241242
template {
242243
metadata {

0 commit comments

Comments
 (0)