Skip to content

fix: retry vsce/ovsx publish on marketplace timeout - W-24209833 - #184

Merged
mshanemc merged 2 commits into
mainfrom
sm/W-24209833-vsce-publish-retry
Sep 16, 2026
Merged

mshanemc merged 2 commits into
mainfrom
sm/W-24209833-vsce-publish-retry

Conversation

@mshanemc

Copy link
Copy Markdown
Contributor

What issues does this PR fix or reference?

@W-24209833@

Summary

  • VSCE marketplace gallery requests time out at 180s; vsce has no timeout flag
  • Retry each VSIX 3 times with 15s backoff instead of failing the whole publish job
  • --skip-duplicate keeps retries idempotent if the gallery committed after the client died

Test plan

  • Confirm promote-prerelease and release-vsix loops retry per file, not the whole step
  • Next real promote: a hung /_apis/gallery publish retries instead of failing the job

Gallery /_apis/gallery requests time out at 180s with no vsce flag. Retry each VSIX 3 times so a hang does not fail the whole publish job.
@mshanemc mshanemc self-assigned this Sep 16, 2026
@mshanemc
mshanemc requested a review from madhur310 September 16, 2026 17:17
PRE_RELEASE_FLAG: ${{ inputs.pre-release && '--pre-release' || '' }}
run: |
cd "$EXTENSION"
npx vsce publish $PRE_RELEASE_FLAG

@madhur310 madhur310 Sep 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need -skip-duplicate flag now right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so? It didn't before this PR, either, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but probably should now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added --skip-duplicate on both vsce and ovsx in this path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a vscode-release-explicit.yml run failed because the marketplace call hung/timed out but had actually gone through server-side, and someone manually reran that job, the rerun would already hit "version already exists" — same root cause, same missing flag. This PR didn't introduce that gap; it's been there as long as this workflow has lacked --skip-duplicate

exit 1
fi

publish_with_retry() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use salesforcecli/github-workflows/.github/actions/retry@main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's meant for running a command. Wasn't quite sure how to get it inside a giant bash script without redoing the whole thing (prerelease calc, etc) since those are part of the giant script instead of gha workflow steps

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah not a fan of big bash either, we can leave this in for now.

@mshanemc
mshanemc merged commit dfb4766 into main Sep 16, 2026
3 checks passed
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