Skip to content

Release is not idempotent#1242

Merged
joshmgross merged 2 commits intomainfrom
release-not-idempotent
Mar 31, 2026
Merged

Release is not idempotent#1242
joshmgross merged 2 commits intomainfrom
release-not-idempotent

Conversation

@joshmgross
Copy link
Copy Markdown
Contributor

Even with #1235, re-releasing fails when attempting to upload artifacts to the GitHub Release:

  ⨯ release failed after 6m57s                       error=scm releases: failed to publish artifacts: failed to upload pscale_0.278.0_macOS_amd64.tar.gz: POST https://uploads.github.com/repos/planetscale/cli/releases/303388482/assets?name=pscale_0.278.0_macOS_amd64.tar.gz: 422 Validation Failed [{Resource:ReleaseAsset Field:name Code:already_exists Message:}]

https://github.com/planetscale/cli/actions/runs/23770631746/job/69261024826

I expected replace_existing_artifacts to resolve that, but it did not. There doesn't appear to be a way to skip the main publish step and run the other release steps, and GoReleaser's own docs say to only run once per tag

  1. You are running GoReleaser multiple times against the same tag
    This one is easier to fix: make sure you are running GoReleaser only on tags, and only one time per tag.

https://goreleaser.com/resources/errors/release-upload/

For now, we'll need to release a new version if anything fails during a release.

@joshmgross joshmgross requested a review from a team as a code owner March 31, 2026 14:50
@joshmgross joshmgross enabled auto-merge March 31, 2026 15:04
@joshmgross joshmgross merged commit 4a39378 into main Mar 31, 2026
4 checks passed
@joshmgross joshmgross deleted the release-not-idempotent branch March 31, 2026 15:50
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