-
Notifications
You must be signed in to change notification settings - Fork 81
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
SLVSCODE-870 Fix silent failure of deployment to OpenVSX #628
Conversation
Quality Gate passedIssues Measures |
@@ -29,10 +31,13 @@ const { | |||
extensionFile: ARTIFACT_FILE, | |||
pat: OPENVSX_TOKEN | |||
}; | |||
await ovsx.publish(options); | |||
|
|||
const [ publicationResult ] = await ovsx.publish(options); |
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.
This is what caused the silent failure: ovsx.publish
returns an array of PromiseSettledResult
instead of failing 🤦🏻
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.
If I'm looking at the correct thing, publish()
returns a single Promise<PromiseSettledResult<void>[]>
. With the await
, we will get the array of settled/unsettled promises.
So I am thinking that we should consider the full array (not only the first element), and check if any of them have been rejected in the if
below. 🤔
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.
In theory, yes; and when I run the script, the array contains only a single result. It could contain several items if we were publishing several packages at once.
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.
OK, that makes sense!
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.
This means all our release actions will start failing "loudly" from now on :D Let's discuss before we merge. Maybe it's best to disable the OVSX publish temporarily until we have a long-term solution
SLVSCODE-870