Skip to content

chore: reset the repository to the Dev Container Features format - #4

Merged
dan-petty merged 4 commits into
mainfrom
chore/3-reset-to-features-format
Nov 19, 2026
Merged

dan-petty merged 4 commits into
mainfrom
chore/3-reset-to-features-format

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Reset the fork to the devcontainers/features format, with no Feature yet. The repository becomes a collection of Features that make debian:sid usable.

  • Remove every upstream Feature and test, .vscode/, dependabot.yaml and 7 upstream-only workflows. test-pr-arm64 goes too, because the target is linux/amd64 only.
  • Add package.json and package-lock.json, so CI and the dev container run the locked @devcontainers/cli.
  • Rewrite test-pr, test-all (now also weekly), test-manual, release and validate for debian:sid on ubuntu-latest. test-pr gets a podman-host job for scenarios with keepid in their name.
  • test-pr has one paths-filter for src/** and test/**. A step gets the Feature ids from the changed files, so a new Feature needs no workflow edit.
  • test-all tests the Features with -f, so the test/_global scenarios run only in the test-global job.
  • The release Publish step runs only when src/ holds a Feature. The merge of this PR deletes the files under src/, and the src/** push filter also matches deleted files. devcontainers/action fails when ./src is missing.
  • Each checkout sets persist-credentials: false. Each job has a timeout-minutes, and each container test step has a shorter one.
  • Add lint.yaml: shellcheck on each tracked *.sh, a README drift check and a version check. The version check needs a higher semver version, and it fails when git diff fails.
  • Add .github/renovate.json, which extends the devops-cli preset. Renovate updates the devops-cli image only on Monday, because that image publishes several tags a day.
  • Rebuild .devcontainer on the devops-cli image by digest.
  • Rewrite README.md and CONTRIBUTING.md. CONTRIBUTING.md tells how a test script passes shellcheck. CODEOWNERS is @dan-petty. LICENSE adds the owner's line.

labels.yml and roadmap.toml do not change.

Deviations from the issue:

  • Scenario "Pinned image" fails as written: the image is devcontainer:v0.179.5@sha256:<digest>, and the scenario regex allows no tag. The tag stays so that Renovate can show the version. The digest pins the image.
  • Scenario "Microsoft text replaced" fails as written: CONTRIBUTING.md says "Open one issue for each change, and deliver it in one pull request". That is the ASD-STE100 form of "one issue per PR".
  • test-pr: the Changes section asks for one filter for each Feature id. The Key questions mark one src/** filter with ids from the diff as Chosen. This PR uses the Chosen design and adds test/**, so a change to a test also runs the tests.

Closes #3

The repository becomes a collection of Dev Container Features that make
debian:sid usable. The upstream Features of the fork are not needed.

- Remove every upstream Feature under src/ and every test under test/.
- Remove .vscode/, dependabot.yaml and 7 workflows that serve only the
  upstream Features or need the upstream App secrets.
- Add package.json and package-lock.json with @devcontainers/cli, so CI
  and the dev container run the locked CLI through npx and npm scripts.
- Rewrite test-pr, test-all, test-manual, release and validate for
  debian:sid on ubuntu-latest. Add lint.yaml: shellcheck, a README drift
  check and a version-bump check.
- Add .github/renovate.json, which extends the devops-cli preset.
- Rebuild .devcontainer on the devops-cli image by digest.
- Rewrite README.md and CONTRIBUTING.md. CODEOWNERS is now @dan-petty.
  LICENSE keeps the Microsoft line and adds the owner's line.

Closes #3
@dan-petty dan-petty added the type/chore Dependency upgrades, tooling adjustments, or maintenance label Nov 19, 2026
@dan-petty

dan-petty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner Author

Proof

Head 82efaa2 fixes the minor findings of the two reviews. All checks pass on head 82efaa2 (devops pr monitor 4, exit 0, 6/6): lint, validate and detect-changes pass. test, test-scenarios and podman-host are skipped, because src/ holds no Feature. In the detect-changes log, the features filter is true (the deleted upstream files), and the id step prints Changed Features: [].

Done-when item Command Result
Only the kept and new files git ls-files 17 files: .devcontainer/devcontainer.json, .github/{labels.yml,renovate.json,roadmap.toml}, 6 workflows, .gitignore, CODEOWNERS, CONTRIBUTING.md, LICENSE, README.md, package.json, package-lock.json
Kept files do not change git diff --quiet origin/main -- .github/labels.yml .github/roadmap.toml exit 0
Locked CLI on ubuntu-latest npm ci then npx devcontainer --version in the lint job log line 0.90.0
Locked CLI in the dev container devcontainer up --workspace-folder ., then npm ci && npx devcontainer --version in it (head 75f23f1; this head does not change the dev container) 0.90.0; remote user vscode; Docker server 29.9.3; shellcheck 0.11.0
actionlint actionlint .github/workflows/*.y*ml (1.17.1, with shellcheck 0.11.0) exit 0
zizmor zizmor --offline .github/workflows (1.32.0) exit 0, no finding. Before: 10 artipacked
Lint on zero scripts git ls-files -z '*.sh' | xargs -0r shellcheck exit 0; 0 scripts
JSON files jq empty on package.json, package-lock.json, .github/renovate.json, .devcontainer/devcontainer.json exit 0
Renovate config JSON Schema check of .github/renovate.json against docs.renovatebot.com/renovate-schema.json (draft 7, jsonschema 4.26.0) 0 errors. A bad config gives 1 error. renovate-config-validator did not run (see below).

Version check of lint.yaml, on a probe repository

The probe takes the run text of the step from lint.yaml and runs it with bash -e, as the runner does. The base is src/foo at version 1.2.0.

Case New step Old step
install.sh changes, same version exit 1, error on the file exit 1
install.sh changes, lower version 1.1.9 exit 1, error on the file exit 0
install.sh changes, version 1.2.1 exit 0 exit 0
install.sh changes, version 1.10.0 exit 0 exit 0
Only README.md changes exit 0 exit 0
A new Feature exit 0, prints its version exit 0
A Feature is removed exit 0 exit 0
git diff fails (base ref is missing) exit 128 exit 0

Feature ids of test-pr.yaml, on the same probe

The step reads the JSON file list of dorny/paths-filter (list-files: json). The probe has src/foo and src/bar.

Changed files Output features
none []
src/foo/install.sh ["foo"]
test/foo/test.sh, src/bar/install.sh, src/foo/README.md ["bar","foo"]
src/gone/install.sh (removed Feature), test/_global/scenarios.json []
src/a b/x.sh, src/foo/x ["foo"]

Other fixes

Finding Fix Proof
Global scenarios ran twice in test-all The test job passes the ids of src/*/devcontainer-feature.json with -f. CLI 0.90.0 bundle: return t?await uG(e,g):(await FV(e,g),i||await uG(e,g)). uG runs test/_global, and i is the -f list. --skip-scenarios does not stop uG. The probe loop gives -f bar foo -i debian:sid.
Deprecated positional . Removed from package.json, the workflows and CONTRIBUTING.md. devcontainer features test --help: -p, --project-folder ... [default: "."]. grep finds no . after features test.
shellcheck on test scripts CONTRIBUTING.md gives # shellcheck source=/dev/null above source dev-container-features-test-lib. The lint step stays on each tracked *.sh at the default severity. shellcheck 0.11.0 on a test script: without the directive SC1091, exit 1; with it, exit 0.
persist-credentials false on each of the 10 checkouts. lint keeps fetch-depth: 0. The action makes the release tags with octokit.rest.git.createRef (dist/index.js:20022 at bef2cf2), not with git push.
No job timeout Jobs: lint 10, validate 5, detect-changes 5, release 15, test-pr test jobs 30 (step 25), test-all 60 (step 50) and 30 (step 25), test-manual 60 (step 50) minutes. actionlint exit 0
README claim "A check on 2026-11-19 installed 12 of the 28 Features of devcontainers/features on debian:sid, and also the claude-code Feature of anthropics/devcontainer-features." Upstream 44ebeea has 28 Features in src/. The census checked 12 of them and claude-code, 13 in all.
Renovate cadence A packageRules entry for ghcr.io/dan-petty/devops-cli/devcontainer with schedule * * * * 1. No minimumReleaseAge. Repository rules come after the preset rules, so this schedule replaces the preset patch rule at any time.

Not proven here

  • renovate-config-validator (the npm package renovate): the permission classifier refused to run it. The in-cluster Renovate checks the config when it processes the repository.
  • podman-host, test, test-scenarios, test-all and release have not run with a Feature. The podman-in-podman PR runs them first.

The merge of the reset deletes every file under src/. The push paths filter also matches deleted files, so release.yaml runs on main. devcontainers/action reads ./src with fs.readdir and fails when the folder is missing. The Publish step now runs only when a Feature exists, as in the validate, lint and test-all workflows.
- Set persist-credentials: false on each checkout. The release action
  makes its tags through the REST API, not with git push.
- Give each job a timeout-minutes. Each container test step has a
  shorter timeout than its job.
- The version check assigns the git diff alone, so errexit stops the
  step when git fails. It also needs a higher version (sort -V).
- test-pr.yaml has one paths-filter for src/** and test/**. A step gets
  the Feature ids from the changed files, so a new Feature needs no
  workflow edit.
- test-all.yaml tests the Features with -f, so the test/_global
  scenarios run only in the test-global job.
- Remove the deprecated positional "." of devcontainer features test.
- Renovate updates the devops-cli dev container image only on Monday.
- CONTRIBUTING.md tells how a test script passes shellcheck. README.md
  gives only the Features that the check installed.
@dan-petty
dan-petty marked this pull request as ready for review November 19, 2026 13:37
@dan-petty
dan-petty merged commit 541ea94 into main Nov 19, 2026
6 checks passed
@dan-petty
dan-petty deleted the chore/3-reset-to-features-format branch November 19, 2026 13:42
dan-petty added a commit that referenced this pull request Nov 19, 2026
* feat(podman-in-podman): add the podman-in-podman Feature 1.0.0

The Feature runs a Podman engine in the dev container: rootless Podman for
the remote user, rootful Podman through sudo. install.sh installs Podman and
its tools from the distribution archive with no version pins. The entrypoint
nests cgroup v2, makes the runtime directory, fits the subordinate IDs to the
user namespace and starts the API socket for dockerCompat and docker-compose.

The tests are the default test and nine scenarios. rootless_vscode_keepid
also runs in the podman-host job under rootless Podman with keep-id.

* ci: test on three base images and fix the review points of PR #4

- test-pr.yaml: the test, test-scenarios and podman-host jobs run on
  debian:sid, debian:trixie and ubuntu:noble. test-scenarios skips the
  duplicate test, which ran on ubuntu:focal. A new push stops the tests of
  the previous push.
- test-all.yaml: test each Feature alone on debian:sid, then all Features
  together.
- release.yaml: one publish run at a time. The permissions of release.yaml,
  test-pr.yaml and lint.yaml have comments.
- lint.yaml: semver compares the versions, so 1.1.0 is higher than
  1.1.0-rc.1.
- README.md: 10 of the 12 checked upstream Features install.

* fix(podman-in-podman): make the Feature work on trixie and noble

- Set rootless_storage_path in /etc/containers/storage.conf, made from
  the file of the distribution. containers/storage 1.57 (trixie) and
  1.51 (noble) read no storage.rootless.conf.d drop-in.
- Make /var/lib/cni. Podman 4 (noble) otherwise mounts its private
  directory on /var/lib in the rootless network namespace, which hides
  the rootless storage, so user networks are not found.
- Install iptables: netavark 1.4 (noble) runs iptables, not nft.
- Install docker-compose-v2 where the archive has it. The docker-compose
  package of Ubuntu is Compose version 1, which imports distutils.
- podman-subid-ranges.sh: keep each extent of the ID map separate. The
  kernel refuses a subordinate range across two extents, for example
  1:1000 with vscode at uid 1001 under keep-id.
- podman-init.sh: give the rootless storage to the user before
  'podman system migrate', which writes to it.
- Tests: check the pasta network mode with podman inspect (Podman 4.9
  has no RootlessNetworkCmd in podman info), add the uid 1001 and
  cross-extent cases of the subid ranges, drop the config grep.

* fix(podman-in-podman): mark the end of the entrypoint for the tests

The Dev Containers CLI runs the Feature entrypoints after the container
prints "Container started", and starts the tests then. The tests could
read the state before podman-init.sh ended: a stale docker.sock link,
no API socket, no pid file. podman-init.sh now writes
/run/podman-in-podman/ready at its end, and each test that needs the
entrypoint waits for that file first.

* feat(podman-in-podman): make docker run Podman with a rootful API socket and no Docker CLI

Remove compose=docker-compose and its packages. dockerCompat installs
podman-docker, starts a rootful Podman API service on
/run/podman/podman.sock (root:docker 0660) and links /var/run/docker.sock
to it. podman-compose is the only compose provider. Move the shared
install steps to scripts/podman-common.sh, add the podman-check.sh
postStartCommand, the exclusion of podman-outside-podman, slirp4netns,
and the docker_compat scenario and restart checks.

* fix(podman-in-podman): keep Podman warnings out of the start line and set netavark

On ubuntu:noble, the start line of podman-check.sh had a Podman warning in
place of the version, over two lines. The check put the stderr of podman
into the version text.

- podman-check.sh writes the stderr of podman to a temporary file. Only
  stdout goes into the start line. The last stderr line goes into the
  failure line.
- The containers.conf drop-in sets network_backend = "netavark". The
  podman package of ubuntu:noble has
  /etc/cni/net.d/87-podman-bridge.conflist, and the Feature installs no
  CNI plugins. With no backend set, Podman 4.9 reads that file on a new
  store and warns, and it selects CNI on a store that has images but no
  defaultNetworkBackend file. Then 'podman run' fails.
- test.sh checks one start line on a store with no backend file, and
  netavark on a store with images and no backend file.
- NOTES.md and README.md tell about the backend.

* fix(podman-in-podman): accept only the ready file of the current start

Fixes of the review of PR #9.

- Under Docker, /run is not a tmpfs, so the ready file of the last start
  stays after a stop and a start. podman-check.sh accepted it before the
  entrypoint of this start ran. podman-init.sh now writes the start time
  of PID 1 (field 22 of /proc/1/stat) to the ready file. podman-check.sh
  waits until the file holds the start time of the current PID 1.
- In dash, the input redirection of the PID check came before
  2> /dev/null, so a missing /proc/<pid>/cmdline printed an error line
  at the start after a restart. The stderr redirection now comes first.
- idempotent.sh writes a ready file of an earlier start and checks that
  podman-check.sh waits until the entrypoint runs, and then passes.
- The compose services of compose_podman.sh and docker_compat.sh use
  init: true. As PID 1, sleep ignores SIGTERM, so each down waited
  10 seconds for each container.
- NOTES.md and README.md tell about the start time in the ready file.

* test(podman-in-podman): keep the cmdline reads of the tests quiet

* ci: run the CodeQL analysis of this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/chore Dependency upgrades, tooling adjustments, or maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: reset the repository to the Dev Container Features format

1 participant