fix(cli/market): allow same-version upgrade for the upload source#3439
Merged
Conversation
The upgrade pre-flight (gate 3) rejected target == installed as a no-op for every source. But the `upload` bucket overwrites the stored chart in place when the same version is re-uploaded, and app-service permits a same-version upgrade (it gates on `>= deployed`, not strictly greater). So for an already-installed upload app (running / upgradeFailed / ...), re-running `install` is rejected by app-service while the only sanctioned re-apply / recovery path — `upgrade` to the same version — was blocked by the CLI itself. Relax gate 3 to allow cmp == 0 when source == upload; a true downgrade (cmp < 0) is still rejected for every source. Update the gate-3 docs in preflight.go / upgrade.go and add pre-flight tests for the upload same-version (allowed) and upload downgrade (still rejected) paths. Align the skills: olares-market-lifecycle documents the upload gate-3 exception, and olares-chart-deploy's iterate/recovery loop now branches install (first deploy / installFailed / uninstalled) vs `upgrade -s upload --version <same>` (app already exists). Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
eball
added a commit
that referenced
this pull request
Jun 22, 2026
) The upgrade pre-flight (gate 3) rejected target == installed as a no-op for every source. But the `upload` bucket overwrites the stored chart in place when the same version is re-uploaded, and app-service permits a same-version upgrade (it gates on `>= deployed`, not strictly greater). So for an already-installed upload app (running / upgradeFailed / ...), re-running `install` is rejected by app-service while the only sanctioned re-apply / recovery path — `upgrade` to the same version — was blocked by the CLI itself. Relax gate 3 to allow cmp == 0 when source == upload; a true downgrade (cmp < 0) is still rejected for every source. Update the gate-3 docs in preflight.go / upgrade.go and add pre-flight tests for the upload same-version (allowed) and upload downgrade (still rejected) paths. Align the skills: olares-market-lifecycle documents the upload gate-3 exception, and olares-chart-deploy's iterate/recovery loop now branches install (first deploy / installFailed / uninstalled) vs `upgrade -s upload --version <same>` (app already exists). Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
olares-cli market upgradepre-flight gate 3 rejectedtarget == installedas a no-op for every source. For theuploadbucket this is wrong: re-uploading the same version overwrites the stored chart in place, and app-service permits a same-version upgrade (it gates on>= deployed, not strictly greater —framework/app-service/pkg/appstate/upgrading_app.go).running/upgradeFailed/ ...):installis rejected by app-service (InstallOp not allowed from those states), while the only sanctioned re-apply / recovery path —upgradeto the same version — was blocked by the CLI itself. This is the wedge seen in thepsitransferrecovery flow.cmp == 0only whensource == upload. A true downgrade (cmp < 0) is still rejected for every source (app-service rejects it too). Backend is unchanged — market only forwards, and app-service already accepts same-version.Changes
cli/cmd/ctl/market/preflight.go—preflightUpgradegate 3 upload carve-out + doc comment.cli/cmd/ctl/market/upgrade.go—Longhelp text + inline comment reflect the upload same-version exception.cli/cmd/ctl/market/preflight_test.go— new cases: upload same-version → allowed; upload downgrade → still rejected (non-upload same-version no-op already covered).cli/skills/olares-market/references/olares-market-lifecycle.md— gate 3 exception, error-table note, "re-apply an upload chart" guidance.cli/skills/olares-chart/references/olares-chart-deploy.md— iterate/recovery loop branchesinstall(first deploy / installFailed / uninstalled) vsupgrade -s upload --version <same>(app already exists); §4bupgradeFailedrecovery note.Test plan
go build ./...(cli)go test ./cmd/ctl/market/...— all pass, incl. the two new upload pre-flight casesmarket upgrade <app> -s upload --version <same>re-applies an edited chart and recovers anupgradeFailedupload appMade with Cursor