Skip to content

Commit db35517

Browse files
authored
Merge branch 'main' into fix-claude-session-id-in-use
2 parents bb20ceb + 1436560 commit db35517

File tree

15 files changed

+84
-35
lines changed

15 files changed

+84
-35
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Set up Go
9898
uses: actions/setup-go@v6
9999
with:
100-
go-version: "1.23.2"
100+
go-version: "1.24.0"
101101
- name: Validate contributors
102102
run: go build ./cmd/readmevalidation && ./readmevalidation
103103
- name: Remove build file artifact

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module coder.com/coder-registry
22

3-
go 1.23.2
3+
go 1.24.0
44

55
require (
66
cdr.dev/slog v1.6.1
@@ -20,7 +20,7 @@ require (
2020
github.com/rivo/uniseg v0.4.4 // indirect
2121
go.opentelemetry.io/otel v1.16.0 // indirect
2222
go.opentelemetry.io/otel/trace v1.16.0 // indirect
23-
golang.org/x/crypto v0.35.0 // indirect
24-
golang.org/x/sys v0.30.0 // indirect
25-
golang.org/x/term v0.29.0 // indirect
23+
golang.org/x/crypto v0.45.0 // indirect
24+
golang.org/x/sys v0.38.0 // indirect
25+
golang.org/x/term v0.37.0 // indirect
2626
)

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiM
5151
go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4=
5252
go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs=
5353
go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0=
54-
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
55-
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
56-
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
57-
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
54+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
55+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
56+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
57+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
5858
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
59-
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
60-
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
61-
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
62-
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
63-
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
64-
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
59+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
60+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
61+
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
62+
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
63+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
64+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
6565
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY=
6666
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
6767
google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e h1:xIXmWJ303kJCuogpj0bHq+dcjcZHU+XFyc1I0Yl9cRg=

registry/coder/modules/mux/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Automatically install and run mux in a Coder workspace. By default, the module i
1414
module "mux" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/mux/coder"
17-
version = "1.0.0"
17+
version = "1.0.1"
1818
agent_id = coder_agent.example.id
1919
}
2020
```
@@ -35,7 +35,7 @@ module "mux" {
3535
module "mux" {
3636
count = data.coder_workspace.me.start_count
3737
source = "registry.coder.com/coder/mux/coder"
38-
version = "1.0.0"
38+
version = "1.0.1"
3939
agent_id = coder_agent.example.id
4040
}
4141
```
@@ -46,7 +46,7 @@ module "mux" {
4646
module "mux" {
4747
count = data.coder_workspace.me.start_count
4848
source = "registry.coder.com/coder/mux/coder"
49-
version = "1.0.0"
49+
version = "1.0.1"
5050
agent_id = coder_agent.example.id
5151
# Default is "latest"; set to a specific version to pin
5252
install_version = "0.4.0"
@@ -59,7 +59,7 @@ module "mux" {
5959
module "mux" {
6060
count = data.coder_workspace.me.start_count
6161
source = "registry.coder.com/coder/mux/coder"
62-
version = "1.0.0"
62+
version = "1.0.1"
6363
agent_id = coder_agent.example.id
6464
port = 8080
6565
}
@@ -73,7 +73,7 @@ Run an existing copy of mux if found, otherwise install from npm:
7373
module "mux" {
7474
count = data.coder_workspace.me.start_count
7575
source = "registry.coder.com/coder/mux/coder"
76-
version = "1.0.0"
76+
version = "1.0.1"
7777
agent_id = coder_agent.example.id
7878
use_cached = true
7979
}
@@ -87,7 +87,7 @@ Run without installing from the network (requires mux to be pre-installed):
8787
module "mux" {
8888
count = data.coder_workspace.me.start_count
8989
source = "registry.coder.com/coder/mux/coder"
90-
version = "1.0.0"
90+
version = "1.0.1"
9191
agent_id = coder_agent.example.id
9292
install = false
9393
}

registry/coder/modules/mux/main.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ describe("mux", async () => {
5555
expect(output.exitCode).toBe(0);
5656
const expectedLines = [
5757
"📦 Installing mux via npm into /tmp/mux...",
58+
"⏭️ Skipping npm lifecycle scripts with --ignore-scripts",
5859
"🥳 mux has been installed in /tmp/mux",
5960
"🚀 Starting mux server on port 4000...",
6061
"Check logs at /tmp/mux.log!",
6162
];
6263
for (const line of expectedLines) {
6364
expect(output.stdout).toContain(line);
6465
}
65-
}, 60000);
66+
}, 180000);
6667
});

registry/coder/modules/mux/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ if [ ! -f "$MUX_BINARY" ] || [ "${USE_CACHED}" != true ]; then
5050
if [ ! -f package.json ]; then
5151
echo '{}' > package.json
5252
fi
53+
echo "⏭️ Skipping npm lifecycle scripts with --ignore-scripts"
5354
PKG="mux"
5455
if [ -z "${VERSION}" ] || [ "${VERSION}" = "latest" ]; then
5556
PKG_SPEC="$PKG@latest"
5657
else
5758
PKG_SPEC="$PKG@${VERSION}"
5859
fi
59-
if ! npm install --no-audit --no-fund --omit=dev "$PKG_SPEC"; then
60+
if ! npm install --no-audit --no-fund --omit=dev --ignore-scripts "$PKG_SPEC"; then
6061
echo "❌ Failed to install mux via npm"
6162
exit 1
6263
fi

registry/coder/modules/vault-github/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec
1414
module "vault" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/vault-github/coder"
17-
version = "1.0.31"
17+
version = "1.1.0"
1818
agent_id = coder_agent.example.id
1919
vault_addr = "https://vault.example.com"
2020
}
@@ -46,7 +46,7 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t
4646
module "vault" {
4747
count = data.coder_workspace.me.start_count
4848
source = "registry.coder.com/coder/vault-github/coder"
49-
version = "1.0.31"
49+
version = "1.1.0"
5050
agent_id = coder_agent.example.id
5151
vault_addr = "https://vault.example.com"
5252
coder_github_auth_id = "my-github-auth-id"
@@ -59,7 +59,7 @@ module "vault" {
5959
module "vault" {
6060
count = data.coder_workspace.me.start_count
6161
source = "registry.coder.com/coder/vault-github/coder"
62-
version = "1.0.31"
62+
version = "1.1.0"
6363
agent_id = coder_agent.example.id
6464
vault_addr = "https://vault.example.com"
6565
coder_github_auth_id = "my-github-auth-id"
@@ -73,7 +73,7 @@ module "vault" {
7373
module "vault" {
7474
count = data.coder_workspace.me.start_count
7575
source = "registry.coder.com/coder/vault-github/coder"
76-
version = "1.0.31"
76+
version = "1.1.0"
7777
agent_id = coder_agent.example.id
7878
vault_addr = "https://vault.example.com"
7979
vault_cli_version = "1.15.0"

registry/coder/modules/vault-github/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ variable "vault_github_auth_path" {
3232
default = "github"
3333
}
3434

35+
variable "vault_namespace" {
36+
type = string
37+
description = "The Vault Enterprise namespace that contains the GitHub auth mount."
38+
default = null
39+
}
40+
3541
variable "vault_cli_version" {
3642
type = string
3743
description = "The version of Vault to install."
@@ -52,6 +58,7 @@ resource "coder_script" "vault" {
5258
AUTH_PATH : var.vault_github_auth_path,
5359
GITHUB_EXTERNAL_AUTH_ID : data.coder_external_auth.github.id,
5460
INSTALL_VERSION : var.vault_cli_version,
61+
VAULT_NAMESPACE : var.vault_namespace != null ? var.vault_namespace : "",
5562
})
5663
run_on_start = true
5764
start_blocks_login = true
@@ -63,6 +70,13 @@ resource "coder_env" "vault_addr" {
6370
value = var.vault_addr
6471
}
6572

73+
resource "coder_env" "vault_namespace" {
74+
count = var.vault_namespace == null ? 0 : 1
75+
agent_id = var.agent_id
76+
name = "VAULT_NAMESPACE"
77+
value = var.vault_namespace
78+
}
79+
6680
data "coder_external_auth" "github" {
6781
id = var.coder_github_auth_id
6882
}

registry/coder/modules/vault-github/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
INSTALL_VERSION=${INSTALL_VERSION}
55
GITHUB_EXTERNAL_AUTH_ID=${GITHUB_EXTERNAL_AUTH_ID}
66
AUTH_PATH=${AUTH_PATH}
7+
VAULT_NAMESPACE=${VAULT_NAMESPACE}
78

89
fetch() {
910
dest="$1"
@@ -104,6 +105,11 @@ if ! (
104105
fi
105106
rm -rf "$TMP"
106107

108+
if [ -n "$${VAULT_NAMESPACE}" ]; then
109+
export VAULT_NAMESPACE
110+
printf "📁 Using Vault namespace: %s\n\n" "$${VAULT_NAMESPACE}"
111+
fi
112+
107113
# Authenticate with Vault
108114
printf "🔑 Authenticating with Vault ...\n\n"
109115
GITHUB_TOKEN=$(coder external-auth access-token "$${GITHUB_EXTERNAL_AUTH_ID}")

registry/coder/modules/vault-jwt/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This module lets you authenticate with [Hashicorp Vault](https://www.vaultprojec
1414
module "vault" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/vault-jwt/coder"
17-
version = "1.1.1"
17+
version = "1.2.0"
1818
agent_id = coder_agent.example.id
1919
vault_addr = "https://vault.example.com"
2020
vault_jwt_role = "coder" # The Vault role to use for authentication
@@ -42,7 +42,7 @@ curl -H "X-Vault-Token: ${VAULT_TOKEN}" -X GET "${VAULT_ADDR}/v1/coder/secrets/d
4242
module "vault" {
4343
count = data.coder_workspace.me.start_count
4444
source = "registry.coder.com/coder/vault-jwt/coder"
45-
version = "1.1.1"
45+
version = "1.2.0"
4646
agent_id = coder_agent.example.id
4747
vault_addr = "https://vault.example.com"
4848
vault_jwt_auth_path = "oidc"
@@ -58,7 +58,7 @@ data "coder_workspace_owner" "me" {}
5858
module "vault" {
5959
count = data.coder_workspace.me.start_count
6060
source = "registry.coder.com/coder/vault-jwt/coder"
61-
version = "1.1.1"
61+
version = "1.2.0"
6262
agent_id = coder_agent.example.id
6363
vault_addr = "https://vault.example.com"
6464
vault_jwt_role = data.coder_workspace_owner.me.groups[0]
@@ -71,7 +71,7 @@ module "vault" {
7171
module "vault" {
7272
count = data.coder_workspace.me.start_count
7373
source = "registry.coder.com/coder/vault-jwt/coder"
74-
version = "1.1.1"
74+
version = "1.2.0"
7575
agent_id = coder_agent.example.id
7676
vault_addr = "https://vault.example.com"
7777
vault_jwt_role = "coder" # The Vault role to use for authentication
@@ -132,7 +132,7 @@ resource "jwt_signed_token" "vault" {
132132
module "vault" {
133133
count = data.coder_workspace.me.start_count
134134
source = "registry.coder.com/coder/vault-jwt/coder"
135-
version = "1.1.1"
135+
version = "1.2.0"
136136
agent_id = coder_agent.example.id
137137
vault_addr = "https://vault.example.com"
138138
vault_jwt_role = "coder" # The Vault role to use for authentication

0 commit comments

Comments
 (0)