Skip to content

build: run the dev container on arm64 hosts - #787

Open
h1994st wants to merge 3 commits into
openai:mainfrom
h1994st:fix/devcontainer-arm64
Open

build: run the dev container on arm64 hosts#787
h1994st wants to merge 3 commits into
openai:mainfrom
h1994st:fix/devcontainer-arm64

Conversation

@h1994st

@h1994st h1994st commented Sep 2, 2026

Copy link
Copy Markdown

Summary

The Dev Container added in #697 cannot start on an Apple Silicon Mac. Its image, mcr.microsoft.com/devcontainers/universal:4.0.1-noble, publishes a linux/amd64 manifest only, so there is nothing for an arm64 host to run natively.

Changes

  • Use mcr.microsoft.com/devcontainers/base:noble, which publishes linux/amd64 and linux/arm64, and add Node.js 22 and Python 3.12 as features. Staying on Ubuntu Noble keeps the userland the Ona automations expect.
  • Add the docker-in-docker feature so the container checks from container-ci.yml run in the Dev Container: the image build, the docker compose config validations, and the findings service smoke test.
  • Add the github-cli feature. The universal image bundled gh, and the documented bulk-scan flow needs it to resolve a GitHub token.
  • Pin those features by digest in .devcontainer/devcontainer-lock.json.
  • Install pnpm with corepack install, which reads the packageManager pin. Node ships a corepack shim for pnpm, so npm install --global pnpm fails with EEXIST on that shim.
  • Share the dependency steps between the Dev Container and the Ona install task through .devcontainer/install.sh.
  • Ignore .pnpm-store/, which pnpm creates in the repository because it cannot hard link across the workspace mount.

Testing

Ran on an Apple Silicon Mac, in the Dev Container after Rebuild Container Without Cache (Ubuntu 24.04.4, aarch64):

  • pnpm run test (SDK): 2241 passed, 41 skipped, 0 failed.
  • pnpm run test:mcp: 23 passed, 0 failed.
  • python -m pytest (plugin): 1086 passed, 9 skipped, 109 subtests, 0 failed.
  • pnpm run build, pnpm run types, and pnpm run format: clean.
  • ruff check, ruff format --check, and python .github/scripts/check_plugin_source_compatibility.py: clean.
  • docker build of the customer container, then --version, bulk-scan --help, and info --json against it.
  • bun sdk/typescript/scripts/smoke-findings-service.ts: passed.
  • docker compose config for compose.yaml, the AppArmor overlay, compose.findings.yaml, and compose.runner.yaml.
  • Resolved toolchain: Node v22.23.2, Python 3.12.14, pnpm 11.19.0 matching the packageManager pin, bun 1.3.14, ripgrep 14.1.0, gh 2.99.0.

Not tested: the Ona environment itself, which I do not have access to. The task graph, triggers, and working directory are unchanged; only the install command now calls the shared script.

Risk and rollout

Development-environment configuration only. No runtime, packaging, or public CLI behavior changes.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@h1994st

h1994st commented Sep 2, 2026

Copy link
Copy Markdown
Author

@codex review

The universal image publishes a linux/amd64 manifest only, so the Dev
Container cannot start natively on arm64 hosts. Use the Ubuntu Noble base
image, which is multi-arch, and supply Node.js, Python, and Docker through
Dev Container features.

Node ships a corepack shim for pnpm, so installing pnpm with npm fails on
an existing file. Install the release pinned by packageManager through
corepack instead, matching how the workflows resolve pnpm.

Move the dependency steps into a script the Dev Container and the Ona
install task share, and run it when the container is created.

pnpm cannot hard link across the workspace mount, so it falls back to a
store inside the repository. Ignore that directory.
@h1994st
h1994st force-pushed the fix/devcontainer-arm64 branch from b4c8893 to 60f66bb Compare September 2, 2026 06:18
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b4c889352e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One Ona regression in the shared install move: the old task deliberately restricted apt-get update to /etc/apt/sources.list.d/ubuntu.sources with sourceparts=-, but .devcontainer/install.sh now refreshes every configured APT source. If rg is missing, an unrelated/private/broken repo can now fail Ona setup before ripgrep installs. I'd preserve the restricted update for the Ona path, or make the shared script accept that source configuration.

@h1994st

h1994st commented Sep 2, 2026

Copy link
Copy Markdown
Author

@codex review

@h1994st

h1994st commented Sep 2, 2026

Copy link
Copy Markdown
Author

@sylvesterkaczmarek Thanks for catching this. Added the restricted apt-get update back in .devcontainer/install.sh.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ab0f31701

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .devcontainer/devcontainer.json
@h1994st

h1994st commented Sep 2, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 08b557c4da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants