Skip to content

Migrate local pipeline + non-release CI from dfx to icp-cli - #550

Open
Kamirus wants to merge 4 commits into
mainfrom
kamillistopad/lang-1311-migrate-non-release-ci-to-icp
Open

Migrate local pipeline + non-release CI from dfx to icp-cli#550
Kamirus wants to merge 4 commits into
mainfrom
kamillistopad/lang-1311-migrate-non-release-ci-to-icp

Conversation

@Kamirus

@Kamirus Kamirus commented May 22, 2026

Copy link
Copy Markdown
Collaborator

What changes for users

Mops contributors:

  • npm run replica, npm run deploy-local and npm start now use icp-cli + pocket-ic instead of dfx. Local dev requires npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm (Node-based install, see icp-cli quickstart).
  • ci.yml installs icp-cli alongside dfx and exercises the new local pipeline end-to-end.

What stays on dfx:

  • Production deploys: release.yml, npm run deploy-staging, npm run deploy-ic.
  • npm run decl:cli (dfx generate) — switching to icp-bindgen would generate a noisy churn diff in cli/declarations/; deferred.
  • mops-test.yml and setup-mops.yml matrices: they test against mops@1.0.0, which only supports pocket-ic 4.0.0 and so can't pick up a newer [toolchain].pocket-ic from this repo's mops.toml.
  • dfx.json is kept so the production paths and external mops users are unaffected.

End users of the ic-mops CLI itself: no change.

Why

Reduce internal coupling to dfx ahead of broader migration (LANG-1311). Picks the safe, low-blast-radius targets first (local dev + ci.yml) and leaves mainnet-touching paths and old-CLI matrices alone.

How it was validated

Locally exercised the full chain on macOS:

npm run replica         # icp network start, port 4943
npm run deploy-local    # icp deploy -y -e local main → .icp/cache/mappings/local.ids.json
npm run decl            # dfx generate main && dfx generate bench
npm run build-frontend  # vite build using new ids file

vite.config.ts reads the new flat icp ids map ({ name: id }) for local, with a fallback to .dfx/local/canister_ids.json so anyone still on the dfx pipeline locally is unaffected during the transition.

Notes

  • icp.yaml mirrors dfx.json; cli and play-frontend use raw build/sync steps because the asset-canister recipe template only supports a single dir.
  • An earlier attempt to also drop dfx from mops-test.yml via [toolchain].pocket-ic = "12.0.0" in root mops.toml failed CI: the matrix tests mops@1.0.0, which errors with "Current Mops CLI only supports pocket-ic 4.0.0". Reverted in a follow-up commit on this PR.

…-cli

Switch `npm run replica`/`deploy-local` and the corresponding ci.yml steps
to icp-cli + pocket-ic; mops-test.yml now relies on `[toolchain].pocket-ic`
in mops.toml instead of dfx. Production deploys (release.yml,
deploy-staging, deploy-ic) and `dfx generate` for declarations stay on dfx.

LANG-1311

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kamirus
Kamirus requested a review from a team as a code owner May 22, 2026 13:25
@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Cursor AI review

👍 APPROVE — looks safe to merge

Category Assessment Details
Summary Migrates contributor local dev and ci.yml from dfx to icp-cli for replica/deploy; keeps dfx for production deploys and dfx generate.
Code Quality icp.yaml mirrors dfx.json with documented exceptions; vite reads icp IDs with dfx fallback; .gitignore and AGENTS.md updated.
Consistency Production paths (release.yml, deploy-staging, deploy-ic, decl:cli) unchanged; scoped to stated low-blast-radius targets.
Security ci.yml permissions/triggers unchanged; no new secrets or pull_request_target broadening.
Tests ci.yml exercises replica → deploy-local → decl → build end-to-end; no CLI surface changes for end users.
Maintainability Dual pipeline is documented in AGENTS.md and PR notes; transitional dfx fallback in vite limits breakage for contributors still on dfx locally.

Verdict

Decision: APPROVE
Risk: Low
Reason: This is an internal contributor/CI migration with production deploy and registry paths untouched, a backward-compatible vite canister-ID fallback, and no user-facing CLI changes. The diff is coherent and low blast radius; no correctness or regression issues were found relative to base.


Generated for commit 5180ff4

Kamirus and others added 2 commits May 22, 2026 15:26
mops 1.0.0 (tested by setup-mops.yml and mops-test.yml matrix) only
supports pocket-ic 4.0.0. Adding pocket-ic = 12.0.0 to root mops.toml
breaks 'mops test' for old CLIs in those matrices.

Keeps icp.yaml + ci.yml/package.json/vite migration; mops-test.yml
stays on dfx for now.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@caffeine-ci-bot

Copy link
Copy Markdown
Contributor

This pull request has had no activity for 30 days and has been marked as stale. It will be closed in 14 days unless there is new activity. Comment or push to keep it open, or add the pinned label to prevent future stale notices.

@Kamirus Kamirus removed the stale label Jun 23, 2026
@ggreif

ggreif commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

There are CI failures: https://github.com/caffeinelabs/mops/actions/runs/28434607718/job/84257379064?pr=550#step:12:15

And also the CI uses prerequisites that are woefully outdated...

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