ci: centralize dev-env image version + bump to v1.2.0 - #1448
Merged
Conversation
…llo_world) Introduce .github/workflows/run-example.yml, a reusable (workflow_call) workflow that runs an example's CI steps inside the ICP dev-env container. It is the single source of truth for the dev-env image version in CI; callers pass the language (image variant), working directory, and commands. Convert hello_world to a thin caller as a proof of concept, bump the devcontainer to icp-dev-env-all:1.1.0, and add dev-env-version-check.yml to guard that the devcontainer and the reusable workflow stay on the same version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert every example workflow to call the reusable _run-example.yml, so no workflow hardcodes the dev-env image version anymore — the version lives only in _run-example.yml and .devcontainer/devcontainer.json (guarded by dev-env-version-check.yml). Each caller passes language, working-directory, and the commands to run; extra setup steps (apt installs, rustup targets, model downloads) are folded into the run block, and PocketIC integration tests use the new install-pocketic input. Also fix image variants: frontend-only examples (hosting/react, hosting/oisy- signer-demo) now use the `all` image like the other hosting examples, instead of the motoko image. Update workflow-template.yml to the caller pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…v-env-version # Conflicts: # .github/workflows/vetkeys-password-manager-with-metadata.yml
marc0olo
marked this pull request as ready for review
July 22, 2026 13:41
There was a problem hiding this comment.
Pull request overview
This PR centralizes the ghcr.io/dfinity/icp-dev-env-* container image version used by CI into a single reusable workflow, bumps the dev-env version to 1.1.0, and adds a guard workflow to prevent the devcontainer and CI image versions from drifting.
Changes:
- Introduces a reusable workflow (
.github/workflows/_run-example.yml) as the single source of truth for the CI dev-env image tag (now 1.1.0) and optional PocketIC installation. - Converts many example workflows into thin callers of the reusable workflow (eliminating per-workflow hardcoded image tags).
- Adds a version-drift check workflow and bumps the devcontainer image to 1.1.0; updates the workflow template to the new caller pattern.
Reviewed changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .devcontainer/devcontainer.json | Bumps devcontainer image to icp-dev-env-all:1.1.0. |
| .github/workflows/_run-example.yml | Adds reusable workflow; centralizes CI container tag at 1.1.0 and PocketIC install option. |
| .github/workflows/dev-env-version-check.yml | Adds PR guard to ensure devcontainer and CI dev-env versions match. |
| .github/workflow-template.yml | Updates template to use the reusable workflow caller pattern. |
| .github/workflows/backend_only.yml | Switches to reusable workflow caller. |
| .github/workflows/backend_wasm64.yml | Switches to reusable workflow caller. |
| .github/workflows/basic_ethereum.yml | Switches to reusable workflow caller. |
| .github/workflows/canister-info.yml | Switches to reusable workflow caller. |
| .github/workflows/canister-snapshot-download.yml | Switches to reusable workflow caller. |
| .github/workflows/canister-snapshots.yml | Switches to reusable workflow caller. |
| .github/workflows/canister_factory.yml | Switches to reusable workflow caller. |
| .github/workflows/canister_logs.yml | Switches to reusable workflow caller. |
| .github/workflows/candid_type_generation.yml | Switches to reusable workflow caller. |
| .github/workflows/cert-var.yml | Switches to reusable workflow caller. |
| .github/workflows/composite_query.yml | Switches to reusable workflow caller. |
| .github/workflows/daily_planner.yml | Switches to reusable workflow caller. |
| .github/workflows/evm_block_explorer.yml | Switches to reusable workflow caller. |
| .github/workflows/exchange-rates.yml | Switches to reusable workflow caller. |
| .github/workflows/face-recognition.yml | Switches to reusable workflow caller. |
| .github/workflows/filevault.yml | Switches to reusable workflow caller. |
| .github/workflows/flying_ninja.yml | Switches to reusable workflow caller. |
| .github/workflows/guards.yml | Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs. |
| .github/workflows/hello_cycles.yml | Switches to reusable workflow caller. |
| .github/workflows/hello_world.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/hosting-godot-html5-template-example.yml | Switches to reusable workflow caller. |
| .github/workflows/hosting-photo-storage-example.yml | Switches to reusable workflow caller. |
| .github/workflows/hosting-static-website-example.yaml | Switches to reusable workflow caller. |
| .github/workflows/hosting-unity-webgl-example.yaml | Switches to reusable workflow caller. |
| .github/workflows/ic_pos.yml | Switches to reusable workflow caller. |
| .github/workflows/icp_transfer.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/icrc2-swap.yml | Switches to reusable workflow caller. |
| .github/workflows/image-classification.yml | Switches to reusable workflow caller (keeps custom setup in run). |
| .github/workflows/inter-canister-calls.yml | Switches to reusable workflow caller. |
| .github/workflows/llm_chatbot.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/low_wasm_memory.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/oisy_signer_demo.yml | Switches to reusable workflow caller (uses all variant). |
| .github/workflows/parallel_calls.yml | Switches all jobs to reusable workflow caller (including multi-subnet jobs). |
| .github/workflows/performance_counters.yml | Switches to reusable workflow caller. |
| .github/workflows/periodic_tasks.yml | Switches to reusable workflow caller. |
| .github/workflows/photo_gallery.yml | Switches to reusable workflow caller. |
| .github/workflows/pub-sub.yml | Switches to reusable workflow caller. |
| .github/workflows/qrcode.yml | Switches to reusable workflow caller. |
| .github/workflows/query_stats.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/random_maze.yml | Switches to reusable workflow caller. |
| .github/workflows/react.yml | Switches to reusable workflow caller (uses all variant). |
| .github/workflows/receiving-icp.yml | Switches to reusable workflow caller. |
| .github/workflows/send_http_get.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/send_http_post.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/simd.yml | Switches to reusable workflow caller. |
| .github/workflows/stake_neuron_from_cli.yml | Switches to reusable workflow caller. |
| .github/workflows/superheroes.yml | Switches to reusable workflow caller. |
| .github/workflows/threshold-ecdsa.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/threshold-schnorr.yml | Switches both Motoko and Rust jobs to reusable workflow caller; routes PocketIC via reusable workflow inputs. |
| .github/workflows/unity_ii_deeplink.yml | Switches to reusable workflow caller. |
| .github/workflows/unit_testable_rust_canister.yml | Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs. |
| .github/workflows/vetkeys-basic-bls-signing.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/vetkeys-basic-ibe.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/vetkeys-basic-timelock-ibe.yml | Switches to reusable workflow caller. |
| .github/workflows/vetkeys-basic-vetkd.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/vetkeys-encrypted-notes-app-vetkd.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/vetkeys-password-manager-with-metadata.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/vetkeys-password-manager.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/wasm_counter.yml | Switches to reusable workflow caller (uses all variant). |
| .github/workflows/who_am_i.yml | Switches both Motoko and Rust jobs to reusable workflow caller. |
| .github/workflows/x509.yml | Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- workflow-template.yml: show the two-language (Motoko + Rust) form by default with one pull_request path entry per language, and document the single-language, frontend-only, and PocketIC variants. The previous single <working-dir> placeholder would have under-triggered a copied two-language workflow. - dev-env-version-check.yml: anchor the version grep to the actual `container: ghcr.io/dfinity/icp-dev-env` line (first match) so a comment or example line can't be picked up by mistake. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Thanks @Copilot — both points were fair and are addressed in 315dbbb:
|
Bump the pinned icp-dev-env image from 1.1.0 to the v-prefixed v1.2.0 tag in the two source-of-truth locations, and document the v-prefix convention in AGENTS.md. The registry publishes both `v1.2.0` and `1.2.0` tags (from type=ref,event=tag and type=semver respectively); we pin the v-prefixed form. dev-env-version-check.yml keeps devcontainer.json and _run-example.yml in sync. Awaiting dfinity/icp-dev-env#43 (the v1.2.0 release); CI will be red until that image is published. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lwshang
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Centralizes the
icp-dev-envCI image version into a single source, bumps it tov1.2.0, and fixes a few image-variant mismatches. Previously the version was hardcoded across ~60 workflow files plus the devcontainer, which had already drifted (devcontainer was on0.3.1while CI was on1.0.1).Changes (net, vs
master).github/workflows/_run-example.yml— a reusable (workflow_call) workflow that runs an example's CI steps inside the dev-env container. It is the single source of truth for the CI image version. Callers passlanguage(image variant),working-directory, andrun(commands). Examples needing a PocketIC server use the optionalinstall-pocketic/pocketic-versioninputs._run-example.yml— no workflow hardcodes the image version anymore. Extra setup steps (apt installs,rustup target add, model download) are folded intorun; PocketIC integration tests useinstall-pocketic..github/workflows/dev-env-version-check.yml— fails the PR if the devcontainer and the reusable workflow drift to different versions..devcontainer/devcontainer.jsonbumpedicp-dev-env-all:0.3.1→v1.2.0.hosting/reactandhosting/oisy-signer-demonow use theallimage (were incorrectly onmotoko), consistent with the otherhosting/*examples..github/workflow-template.ymlupdated to the caller pattern.Tag convention (
v-prefix)The dev-env release CI tags each release with a
vprefix and publishes both forms to the registry —type=ref,event=tagyieldsv1.2.0,type=semver,pattern={{version}}yields1.2.0. We pin thev-prefixed form (v1.2.0) to match the git release tag.dev-env-version-check.ymlextracts the numericX.Y.Zfrom both files, so the prefix does not affect the drift check.Not touched:
basic_bitcoin(bespoke workflow — needs a bitcoind regtest node and Docker bind-mounts, so it can't use the shared container-based workflow) andninja_pr_checks(uses the unrelated-slimimage on a Node-version tag scheme).Result
Bumping the dev-env version is now a one-line change in
_run-example.yml+devcontainer.json(kept equal bydev-env-version-check). Because each caller watches_run-example.ymlin itspaths:, a bump automatically re-runs every affected example — which is what this PR itself does: all example suites run againstv1.2.0.Validation
The
v1.2.0images are published (via dfinity/icp-dev-env#43), and all 63 checks pass on this PR: every example suite (Motoko + Rust, including the PocketIC and ML examples —image-classification,face-recognition), plus thedev-env-version-checkdrift guard with both places onv1.2.0.🤖 Generated with Claude Code