Skip to content

Verify releases against the gallery instead of vsce's exit code - #2

Merged
sachinsachdeva merged 1 commit into
mainfrom
fix/robust-publish-verification
Aug 8, 2026
Merged

Verify releases against the gallery instead of vsce's exit code#2
sachinsachdeva merged 1 commit into
mainfrom
fix/robust-publish-verification

Conversation

@sachinsachdeva

Copy link
Copy Markdown
Owner

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 with Request timeout after 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:

  • already on the gallery → skip publishing, exit success
  • vsce fails and the version is absent → retry once, then fail
  • vsce fails but the version is present → success, the upload landed
  • vsce succeeds → 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 broken

Verified against the live gallery: the query detects the published 1.0.1 and correctly rejects a nonexistent 9.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 carries SachinSachdeva.

No extension behaviour changes, so no version bump; the next release carries it.

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>
@sachinsachdeva
sachinsachdeva merged commit 496a667 into main Aug 8, 2026
2 checks passed
@sachinsachdeva
sachinsachdeva deleted the fix/robust-publish-verification branch August 8, 2026 17:07
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.

1 participant