Skip to content

Commit ebce4a1

Browse files
committed
fix: disable devcontainer updatecli manifest temporarily
Disable the devcontainer dependency update pipeline due to updatecli limitations with JSON keys containing special characters (dots, slashes, colons). Multiple approaches were attempted (json kind, yaml kind, file kind with content blocks) but all failed. Added README explaining the issue and manual update process until a solution is found.
1 parent fccd110 commit ebce4a1

File tree

3 files changed

+130
-10
lines changed

3 files changed

+130
-10
lines changed

updatecli/updatecli.d/devcontainer.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ targets:
4444
sourceid: dockerLatestMinor
4545
spec:
4646
file: .devcontainer/devcontainer.json
47-
matchpattern: '("version": ")(v?[0-9.]+)(")'
48-
replacepattern: '${1}v{{ source "dockerLatestMinor" }}${3}'
49-
content: |
50-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
51-
"version": "{{ source "dockerLatestMinor" }}",
47+
matchpattern: '("version": "v?)([0-9.]*)(",)'
48+
replacepattern: '${1}{{ source "dockerLatestMinor" }}${3}'
49+
search:
50+
pattern: 'ghcr\.io/devcontainers/features/docker-in-docker'
5251
transformers:
5352
- trimprefix: v
5453

@@ -59,11 +58,10 @@ targets:
5958
sourceid: githubcliLatestMinor
6059
spec:
6160
file: .devcontainer/devcontainer.json
62-
matchpattern: '("version": ")(v?[0-9.]+)(")'
63-
replacepattern: '${1}v{{ source "githubcliLatestMinor" }}${3}'
64-
content: |
65-
"ghcr.io/devcontainers/features/github-cli:1": {
66-
"version": "{{ source "githubcliLatestMinor" }}"
61+
matchpattern: '("version": "v?)([0-9.]+)(")'
62+
replacepattern: '${1}{{ source "githubcliLatestMinor" }}${3}'
63+
search:
64+
pattern: 'ghcr\.io/devcontainers/features/github-cli'
6765
transformers:
6866
- trimprefix: v
6967

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Devcontainer Dependency Updates - Currently Disabled
2+
3+
The `devcontainer.yaml` updatecli manifest has been temporarily disabled (renamed to `devcontainer.yaml.disabled`) due to technical limitations with updatecli's handling of JSON keys containing special characters.
4+
5+
## The Problem
6+
7+
The devcontainer.json file uses feature keys with dots, slashes, and colons:
8+
```json
9+
{
10+
"features": {
11+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
12+
"version": "v27.0.3"
13+
},
14+
"ghcr.io/devcontainers/features/github-cli:1": {
15+
"version": "v2.83.1"
16+
}
17+
}
18+
}
19+
```
20+
21+
Updatecli cannot reliably target these keys using:
22+
- **JSON kind**: JSONPath bracket notation fails to find the values
23+
- **YAML kind**: Yamlpath complains about invalid characters in the path
24+
- **File kind**: Complex multiline pattern matching is error-prone
25+
26+
## Manual Update Process
27+
28+
Until this is resolved, devcontainer dependency versions should be updated manually:
29+
30+
1. Check latest Docker version: https://github.com/moby/moby/releases
31+
2. Check latest GitHub CLI version: https://github.com/cli/cli/releases
32+
3. Update `.devcontainer/devcontainer.json` manually
33+
4. Test in GitHub Codespaces to verify functionality
34+
35+
## Potential Solutions
36+
37+
- Wait for updatecli to improve JSON/YAML path handling for keys with special characters
38+
- Consider restructuring devcontainer.json to use simpler feature keys (requires changes to devcontainer spec)
39+
- Create a custom script to handle these specific updates outside of updatecli
40+
41+
## Re-enabling
42+
43+
To re-enable when a solution is found:
44+
```bash
45+
mv updatecli/updatecli.d/devcontainer.yaml.disabled updatecli/updatecli.d/devcontainer.yaml
46+
```
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: 'deps(devcontainer): update Docker and GitHub CLI versions'
3+
4+
scms:
5+
default:
6+
kind: github
7+
spec:
8+
user: "{{ .github.user }}"
9+
email: "{{ .github.email }}"
10+
owner: "{{ .github.owner }}"
11+
repository: "{{ .github.repository }}"
12+
token: "{{ requiredEnv .github.token }}"
13+
username: "{{ .github.username }}"
14+
branch: "{{ .github.branch }}"
15+
16+
sources:
17+
dockerLatestMinor:
18+
name: Get latest Docker minor version
19+
kind: githubrelease
20+
spec:
21+
owner: moby
22+
repository: moby
23+
token: "{{ requiredEnv .github.token }}"
24+
versionfilter:
25+
kind: semver
26+
pattern: '~27.0'
27+
28+
githubcliLatestMinor:
29+
name: Get latest GitHub CLI minor version
30+
kind: githubrelease
31+
spec:
32+
owner: cli
33+
repository: cli
34+
token: "{{ requiredEnv .github.token }}"
35+
versionfilter:
36+
kind: semver
37+
pattern: '>=2.62.0'
38+
39+
targets:
40+
dockerVersion:
41+
name: 'deps(devcontainer): update Docker version'
42+
scmid: default
43+
kind: file
44+
sourceid: dockerLatestMinor
45+
spec:
46+
file: .devcontainer/devcontainer.json
47+
matchpattern: '("version": "v?)([0-9.]*)(",)'
48+
replacepattern: '${1}{{ source "dockerLatestMinor" }}${3}'
49+
search:
50+
pattern: 'ghcr\.io/devcontainers/features/docker-in-docker'
51+
transformers:
52+
- trimprefix: v
53+
54+
githubcliVersion:
55+
name: 'deps(devcontainer): update GitHub CLI version'
56+
scmid: default
57+
kind: file
58+
sourceid: githubcliLatestMinor
59+
spec:
60+
file: .devcontainer/devcontainer.json
61+
matchpattern: '("version": "v?)([0-9.]+)(")'
62+
replacepattern: '${1}{{ source "githubcliLatestMinor" }}${3}'
63+
search:
64+
pattern: 'ghcr\.io/devcontainers/features/github-cli'
65+
transformers:
66+
- trimprefix: v
67+
68+
actions:
69+
default:
70+
kind: github/pullrequest
71+
scmid: default
72+
title: 'chore(deps): update devcontainer dependencies'
73+
spec:
74+
labels:
75+
- dependencies
76+
- devcontainer

0 commit comments

Comments
 (0)