Skip to content

Commit 90ce5a8

Browse files
authored
Merge branch 'coder:main' into immoral-v0.17.0
2 parents 649fe6b + d82f2fd commit 90ce5a8

File tree

2,245 files changed

+149673
-61712
lines changed

Some content is hidden

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

2,245 files changed

+149673
-61712
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
}

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore all files and folders
2+
**
3+
4+
# Include flake.nix and flake.lock
5+
!flake.nix
6+
!flake.lock

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ coderd/apidoc/swagger.json linguist-generated=true
66
coderd/database/dump.sql linguist-generated=true
77
peerbroker/proto/*.go linguist-generated=true
88
provisionerd/proto/*.go linguist-generated=true
9+
provisionerd/proto/version.go linguist-generated=false
910
provisionersdk/proto/*.go linguist-generated=true
1011
*.tfplan.json linguist-generated=true
1112
*.tfstate.json linguist-generated=true
1213
*.tfstate.dot linguist-generated=true
1314
*.tfplan.dot linguist-generated=true
15+
site/e2e/provisionerGenerated.ts linguist-generated=true
1416
site/src/api/typesGenerated.ts linguist-generated=true
17+
site/src/pages/SetupPage/countries.tsx linguist-generated=true

.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.10"
7+
default: "1.21.9"
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-node/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
- name: Setup Node
1818
uses: buildjet/setup-node@v3
1919
with:
20-
node-version: 18.17.0
20+
node-version: 18.19.0
2121
# See https://github.com/actions/setup-node#caching-global-packages-data
2222
cache: "pnpm"
2323
cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ runs:
77
- name: Setup sqlc
88
uses: sqlc-dev/setup-sqlc@v4
99
with:
10-
sqlc-version: "1.20.0"
10+
sqlc-version: "1.25.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/dependabot.yaml

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,12 @@ updates:
3838
commit-message:
3939
prefix: "chore"
4040
labels: []
41+
open-pull-requests-limit: 15
4142
ignore:
4243
# Ignore patch updates for all dependencies
4344
- dependency-name: "*"
4445
update-types:
4546
- version-update:semver-patch
46-
groups:
47-
otel:
48-
patterns:
49-
- "go.nhat.io/otelsql"
50-
- "go.opentelemetry.io/otel*"
51-
golang-x:
52-
patterns:
53-
- "golang.org/x/*"
5447

5548
# Update our Dockerfile.
5649
- package-ecosystem: "docker"
@@ -66,10 +59,6 @@ updates:
6659
# We need to coordinate terraform updates with the version hardcoded in
6760
# our Go code.
6861
- dependency-name: "terraform"
69-
groups:
70-
scripts-docker:
71-
patterns:
72-
- "*"
7362

7463
- package-ecosystem: "npm"
7564
directory: "/site/"
@@ -94,30 +83,9 @@ updates:
9483
- version-update:semver-major
9584
open-pull-requests-limit: 15
9685
groups:
97-
react:
98-
patterns:
99-
- "react*"
100-
- "@types/react*"
101-
xterm:
86+
site:
10287
patterns:
103-
- "xterm*"
104-
xstate:
105-
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"
88+
- "*"
12189

12290
- package-ecosystem: "npm"
12391
directory: "/offlinedocs/"
@@ -140,6 +108,10 @@ updates:
140108
- dependency-name: "@types/node"
141109
update-types:
142110
- version-update:semver-major
111+
groups:
112+
offlinedocs:
113+
patterns:
114+
- "*"
143115

144116
# Update dogfood.
145117
- package-ecosystem: "terraform"

.github/fly-wsproxies/jnb-coder.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
app = "jnb-coder"
2+
primary_region = "jnb"
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://jnb.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.jnb.fly.dev.coder.com"
16+
CODER_VERBOSE = "true"
17+
18+
[http_service]
19+
internal_port = 3000
20+
force_https = true
21+
auto_stop_machines = true
22+
auto_start_machines = true
23+
min_machines_running = 0
24+
25+
# Ref: https://fly.io/docs/reference/configuration/#http_service-concurrency
26+
[http_service.concurrency]
27+
type = "requests"
28+
soft_limit = 50
29+
hard_limit = 100
30+
31+
[[vm]]
32+
cpu_kind = "shared"
33+
cpus = 2
34+
memory_mb = 512
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
CODER_VERBOSE = "true"
17+
18+
[http_service]
19+
internal_port = 3000
20+
force_https = true
21+
auto_stop_machines = true
22+
auto_start_machines = true
23+
min_machines_running = 0
24+
25+
# Ref: https://fly.io/docs/reference/configuration/#http_service-concurrency
26+
[http_service.concurrency]
27+
type = "requests"
28+
soft_limit = 50
29+
hard_limit = 100
30+
31+
[[vm]]
32+
cpu_kind = "shared"
33+
cpus = 2
34+
memory_mb = 512
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
CODER_VERBOSE = "true"
17+
18+
[http_service]
19+
internal_port = 3000
20+
force_https = true
21+
auto_stop_machines = true
22+
auto_start_machines = true
23+
min_machines_running = 0
24+
25+
# Ref: https://fly.io/docs/reference/configuration/#http_service-concurrency
26+
[http_service.concurrency]
27+
type = "requests"
28+
soft_limit = 50
29+
hard_limit = 100
30+
31+
[[vm]]
32+
cpu_kind = "shared"
33+
cpus = 2
34+
memory_mb = 512
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
CODER_VERBOSE = "true"
17+
18+
[http_service]
19+
internal_port = 3000
20+
force_https = true
21+
auto_stop_machines = true
22+
auto_start_machines = true
23+
min_machines_running = 0
24+
25+
# Ref: https://fly.io/docs/reference/configuration/#http_service-concurrency
26+
[http_service.concurrency]
27+
type = "requests"
28+
soft_limit = 50
29+
hard_limit = 100
30+
31+
[[vm]]
32+
cpu_kind = "shared"
33+
cpus = 2
34+
memory_mb = 512

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ provider "kubernetes" {
8888
data "coder_workspace" "me" {}
8989

9090
resource "coder_agent" "main" {
91-
os = "linux"
92-
arch = "amd64"
93-
startup_script_timeout = 180
94-
startup_script = <<-EOT
91+
os = "linux"
92+
arch = "amd64"
93+
startup_script = <<-EOT
9594
set -e
9695
9796
# install and start code-server

0 commit comments

Comments
 (0)