fix(release): resolve the deploy identity from DFX_CONFIG_ROOT, not HOME - #670
Merged
Merged
Conversation
deploy-backend isolated the identity store by pointing HOME at a temp directory, because orbit-cli read the store from homedir() directly and would otherwise miss the identity dfx had just imported. dfx is normally a dfxvm shim that resolves the version pinned in dfx.json under HOME, so repointing it hid the installed toolchain and every backend deploy died with "dfx 0.30.2 is not installed". orbit-cli now honours DFX_CONFIG_ROOT as a stand-in for the home directory, the same way dfx does, and the script sets only that.
|
✅ No security or compliance issues detected. Reviewed everything up to 8ff9ca4. Security OverviewDetected Code Changes
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused changes consistently address the reported deployment failure without introducing unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Updates deploy identity resolution so dfxvm retains access to its installed toolchain while deployment credentials remain isolated.
Changes:
- Resolve the dfx identity store relative to
DFX_CONFIG_ROOT, falling back to the user home. - Stop overriding
HOMEduring backend deployments.
| File | Description |
|---|---|
scripts/deploy-backend |
Isolates dfx configuration without hiding dfxvm installations. |
cli/src/utils.ts |
Honors DFX_CONFIG_ROOT when locating identity PEM files. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aterga
approved these changes
Sep 22, 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.
Every backend deploy fails with
error: dfx 0.30.2 is not installed, after the artifacts download and before anything ships.scripts/deploy-backendisolated the identity store by pointingHOMEat a temp directory.dfxis normally a dfxvm shim that resolves the version pinned indfx.jsonunder$HOME, so repointing it hides the toolchainsetup-dfxjust installed.HOMEwas only set becauseorbit-cliread the identity store fromhomedir()directly and would otherwise miss the identity dfx had imported.orbit-clinow treatsDFX_CONFIG_ROOTas a stand-in for the home directory, the same way dfx does, and the script sets only that.Verified against a real dfxvm install:
HOMErepointed reproduces the error exactly,DFX_CONFIG_ROOTalone givesdfx 0.30.2. After the change the key lands at$DFX_CONFIG_ROOT/.config/dfx/identity/orbit-deploy/identity.pem, which is the path the CLI builds,dfx identity get-principalreturns the playground deploy identity, and the real~/.config/dfx/identityis untouched.This was not CI-only. An operator running the script by hand hits the same failure.