Repository navigation
fix(dashmate): move stock 4.x and 5-rc Platform image tags to the release defaults on update - #5433
Conversation
…ease defaults on update `dashmate update` from 4.1.1 kept Drive and rs-dapi on `dashpay/drive:4` and `dashpay/rs-dapi:4`, so the node kept running protocol 13 and would halt when PV14 activates. 4.1.0 and 4.1.1 were released from the 4.1 line, which still stored the derived tag, and stamp a version above the 4.1.0-rc.4 migration that unsets it. Configs stamped 4.1.0 took a different path: the 4.1.0 and 4.1.1 migrations, merged forward from the 4.1 line, re-pinned with base.get(), which in the 5.0 tree resolves the derived default. They stored this build's own tag (`5-beta`, `5-rc`, and `5` once stable) as an explicit string, which no later release moves. - Add a 5.0.0-rc.3 migration that unsets Drive and rs-dapi images holding a tag a release stored: major 4 with or without a published prerelease identifier, or major 5 with one. Keyed at rc.3 so configs rc.1/rc.2 already stamped run it too. Operator images (other registries, digests, minor/exact pins such as `4.1`, the stable `5` no release stored) are left alone. - Re-pin with base.getStored() in the 4.1.0 and 4.1.1 migrations so no migration stores a derived tag. Tests use config files reshaped to what each release wrote on a fresh install; for 4.0.0, 4.1.0 and 4.1.1 they match configs generated with those tags' own default factories exactly. Test would have caught this in CI: ✖ before fix, ✔ after. - "should move a node any earlier release set up onto the Drive and rs-dapi images this one ships": ✖ on v5.0-dev (4.1.0 config ends on an explicit dashpay/drive:5-rc; without the new migration a 4.1.1 config keeps dashpay/drive:4), ✔ with the fix. - "should never store the Drive and rs-dapi tag this build derives": ✖ with base.get() in the 4.1.0 migration, ✔ with base.getStored(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- docs/config/index.md promised a set Drive or rs-dapi image is never changed again. State the exception: upgrading to 5.0 unsets the `4`, `4-<id>` and `5-<id>` tags earlier dashmate releases wrote into every config, since a config cannot tell them from the default. - Correct the 4.1.0-rc.4 comment that said no later release would need to recognise stock tags by shape, and name every prerelease tag the rc.3 migration covers. - Tests: every migration from 4.0.0 on must leave a stock tag as it is or unset it (stricter than "not this build's tag", and fed `5` and `5-<id>` too); add a 4.2 beta config; keep `4.1-rc` and `docker.io/dashpay/...:4` as operator images; fail loudly if the fixture's whitelist reshaping no longer finds its method. Red -> green still holds: on v5.0-dev both regression tests fail (✖ 4.1.0 config ends on 'dashpay/drive:5-rc'), with base.get() back in 4.1.0/4.1.1 the pin test fails, without the rc.3 migration a 4.1.1 config keeps 'dashpay/drive:4'; with the fix ✔ 870 dashmate unit tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Final review complete — no blockers (commit 57654af) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Verified the complete PR diff at head 57654af and the surrounding migration, default-resolution, schema, and persistence code; no actionable in-scope issues were found. The new migration clears the intended historical stock tags while preserving other operator-selected images, and the getStored() changes prevent earlier migrations from creating new derived-image pins. Validation was static only: the supplied CI snapshot reports successful Dashmate tests, linting, and E2E checks, with PR Hygiene still pending.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — The change adds release-dependent configuration migration logic and stock-tag matching across several upgrade paths, requiring ordinary logic review but not meeting the large-or-intricate critical-surface threshold. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 14% left, 5h 100% left),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer
|
Bots are done — your move: post |
Issue being fixed or feature implemented
dashmate updatefrom 4.1.1 leaves a node on the 4.x Drive and rs-dapi images, so it keeps running protocol 13 and halts when PV14 activates. Found while planning the 4.1 → 5.0 upgrade rehearsal.dashpay/drive:4anddashpay/rs-dapi:4(v4.1.1configs/defaults/getBaseConfigFactory.js:265,294).4.1.0-rc.4. 4.1.0 and 4.1.1 were released from the 4.1 line, which still stored the derived tag, and stamp a version above that key, so the runner skips it. No later key touches these images, and nothing remaps stock tags at run time: onlynullresolves to the default.4.1.0and4.1.1migrations were merged forward from the 4.1 line and re-pin withbase.get(). In the 5.0 treeget()resolves the derived default, so they store this build's own tag (5-beta,5-rc, and5once stable) as an explicit string that no later release moves.On v5.0-dev, migrating a testnet config shaped like each release's fresh install:
4dashpay/drive:5-rc4dashpay/drive:5-rcdashpay/drive:5-rc, pinned4dashpay/drive:4dashpay/drive:45-betadashpay/drive:5-betadashpay/drive:5-beta, pinned5-rcdashpay/drive:5-rcdashpay/drive:5-rc, pinned past 5.0 stable(rs-dapi is identical.) With this PR every row ends with null stored, which resolves to
dashpay/drive:5-rcon this build and todashpay/drive:5on 5.0.0.What was done?
5.0.0-rc.3, the next release, so it also runs for configs rc.1 and rc.2 already stamped. It sets the Drive and rs-dapi images to null when they hold a tag a release stored:4,4-rc,4-beta,4-dev, ...);5-rc,5-beta, ...).4.1,4.1.1,5.0.0-rc.2), the stable5(no release stored it before this one; Docker Hub has nodrive:5yet), and custom tags like4-local.4.1.0and4.1.1migrations re-pin withbase.getStored()(null) instead ofbase.get(), so no migration stores a derived tag. Without this, a stable 5.0.0 build would store an explicitdashpay/drive:5in a 4.1.0 config right before the new migration runs, and a 6.x build would store6.stockPrereleaseImagePattern()insrc/config/stockImages.js, next tostockImagePattern().docs/config/index.mdpromised that a set Drive or rs-dapi image is never changed again. It now names the exception: an explicit4,4-<id>or5-<id>tag can't be told apart from what an earlier dashmate wrote, so it is reset. An operator who set one on purpose has to set it again after upgrading. This needs a line in the 5.0 release notes.4.2.0migration, and gateway, quorum-list and insight are the same in 4.1 and 5.0. Core stays ondashd:23; moving to Core v24 is a separate decision.How Has This Been Tested?
New tests in
test/unit/config/configFile/migrateConfigFileFactory.spec.js:should move a node any earlier release set up onto the Drive and rs-dapi images this one ships: configs stamped 4.0.0, 4.1.0, 4.1.1, 4.2.0-beta.7, 5.0.0-beta.6, 5.0.0-rc.1 and 5.0.0-rc.2 (plus an rc.2 config holding null). Each must store null and resolve to the derived default.should only ever unset a stock Drive or rs-dapi tag, never pin another: runs every migration from 4.0.0 on separately, feeding it each4,4-<id>,5and5-<id>tag. Each migration must leave the tag as it is or set it to null.should keep an operator Drive and rs-dapi image when updating from 4.1.1 or a 5.0 prerelease.Red → green:
drive image not unset for the base config 4.1.0 wrote with the 4 tag: expected 'dashpay/drive:5-rc' to equal nullthe 4.1.0 migration pinned a drive image for base holding 4: expected 'dashpay/drive:5-rc' to be one of [ null, 'dashpay/drive:4' ]drive image not unset for the base config 4.1.1 wrote with the 4 tag: expected 'dashpay/drive:4' to equal null.base.get()restored in 4.1.0/4.1.1:the 4.1.0 migration pinned a drive image for base holding 4.yarn workspace dashmate test:unitgives 870 passing, 0 failing. ESLint on the changed files: no new findings.Three independent reviews of the diff (config and migration semantics, operator-image safety, test quality) found nothing that had to be fixed; their suggestions are folded in. They also checked that nothing at run time stores a resolved image again: reset, createConfig,
ConfigFile.toObjectandconfig setall go through the stored value.Run locally with the published
@dashevo/[email protected]dist in place of a local wasm build; dashmate needs it only transitively, through dapi-client. Integration and e2e suites not run. A tarball of this commit is being used in the 4.1.1 → 5.0 upgrade rehearsal.Breaking Changes
None that needs a
!. Operators who never chose a Drive or rs-dapi image move onto the image line the installed dashmate ships, which is what a fresh install does. One narrow change: an operator who set exactly one of the stock tags on purpose (4,4-<id>,5-<id>ofdashpay/driveordashpay/rs-dapi) loses that pin and must set it again, as the docs now say. Any other image an operator chose is untouched.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
57654af/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit
4,4-<prerelease>, or5-<prerelease>are unset. Other image tags, including custom and registry-qualified tags, are preserved.