Verify releases against the gallery instead of vsce's exit code - #2
Merged
Conversation
Releasing 1.0.1 hit both ways vsce's exit code misleads. The first attempt failed with a gallery timeout after four minutes, which does not say whether the upload was accepted. The retry reported success, and the version then took a further four minutes to appear while the marketplace validated it. So a failure can mean published, and a success does not mean visible. Neither is safe to act on alone, and a workflow that trusts either will report the wrong outcome or retry a publish that already happened. The publish step now queries the gallery for the exact version and uses that as the answer. It skips publishing when the version is already there, retries once when vsce fails and the version is genuinely absent, and treats a vsce failure as success when the version turns up anyway. After a successful upload it waits up to twelve minutes for validation, warning rather than failing if the version is slow to appear, since failing there would report a release that did happen as broken. Also corrects the publisher to its canonical casing, SachinSachdeva. The marketplace resolves publishers case-insensitively so the lowercase form published fine, but the manifest disagreeing with the registry is a confusing thing to leave behind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
Releasing 1.0.1 exposed both ways
vsce's exit code misleads.A failure can mean it published. The first attempt reached
Publishing 'sachinsachdeva.system-vitals v1.0.1'...and then failed withRequest timeoutafter roughly four minutes. A timeout says nothing about whether the gallery accepted the upload. Retrying blindly risks a duplicate-version error, or masking a partial publish.A success does not mean it is visible. The retry logged
Published ... v1.0.1., and the gallery still reported only 1.0.0 for about four more minutes while validation ran. Any immediate verification step would have failed a release that had in fact succeeded.Change
The publish step now asks the gallery for the exact version and treats that as the answer:
vscefails and the version is absent → retry once, then failvscefails but the version is present → success, the upload landedvscesucceeds → poll up to 12 minutes for validation, and warn rather than fail if it is slow, because failing there would report a real release as brokenVerified against the live gallery: the query detects the published
1.0.1and correctly rejects a nonexistent9.9.9.Also
Corrects the publisher to its canonical casing,
SachinSachdeva. The marketplace resolves publishers case-insensitively, which is why the lowercase form published without complaint, but the manifest disagreeing with the registry is a confusing thing to leave behind. Confirmed the packaged VSIX now carriesSachinSachdeva.No extension behaviour changes, so no version bump; the next release carries it.