-
Notifications
You must be signed in to change notification settings - Fork 9
fix: retry vsce/ovsx publish on marketplace timeout - W-24209833 #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,13 @@ jobs: | |
| PRE_RELEASE_FLAG: ${{ inputs.pre-release && '--pre-release' || '' }} | ||
| run: | | ||
| cd "$EXTENSION" | ||
| npx vsce publish $PRE_RELEASE_FLAG | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would need
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but probably should now
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| ok=0 | ||
| for attempt in 1 2 3; do | ||
| echo "Publish attempt ${attempt}/3" | ||
| npx vsce publish --skip-duplicate $PRE_RELEASE_FLAG && { ok=1; break; } | ||
| [ "$attempt" -lt 3 ] && sleep 15 | ||
| done | ||
| [ "$ok" -eq 1 ] | ||
|
|
||
| - name: Publish to Open VSX | ||
| if: | | ||
|
|
@@ -148,7 +154,13 @@ jobs: | |
| PRE_RELEASE_FLAG: ${{ inputs.pre-release && '--pre-release' || '' }} | ||
| run: | | ||
| cd "$EXTENSION" | ||
| npx ovsx publish $PRE_RELEASE_FLAG -p "$OVSX_PAT" | ||
| ok=0 | ||
| for attempt in 1 2 3; do | ||
| echo "Publish attempt ${attempt}/3" | ||
| npx ovsx publish --skip-duplicate $PRE_RELEASE_FLAG -p "$OVSX_PAT" && { ok=1; break; } | ||
| [ "$attempt" -lt 3 ] && sleep 15 | ||
| done | ||
| [ "$ok" -eq 1 ] | ||
|
|
||
| - name: Prepare artifact name | ||
| id: artifact | ||
|
|
||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.