-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[cli][client] Add step for checks #6889
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6889 +/- ##
==========================================
- Coverage 50.69% 50.60% -0.10%
==========================================
Files 126 126
Lines 4894 4903 +9
Branches 1170 1176 +6
==========================================
Hits 2481 2481
- Misses 2403 2412 +9
Partials 10 10
Continue to review full report at Codecov.
|
|
||
if (event.type === 'checks-conclusion-failed') { | ||
output.stopSpinner(); | ||
return event.payload; |
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.
Is the payload an error here?
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.
No, it's the Deployment. Since even if the checks failed, the Deployment can still succeed, but the aliases won't get assigned.
@@ -88,6 +88,42 @@ export async function* checkDeploymentStatus( | |||
yield { type: 'ready', payload: deploymentUpdate }; | |||
} | |||
|
|||
if (deploymentUpdate.checksState !== undefined) { | |||
if (deploymentUpdate.checksState === 'completed') { | |||
finishedEvents.add('checks-completed'); |
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.
You're adding to the finishedEvents set but never reading from it.
Seems like it should either check for existence or just remove these lines since the values aren't used
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.
Do you know what finishedEvents
is used for? I just did what all other events do, I though that it's a way to just keep track of which events were already yielded.
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.
I don't recall, but looking at the code it seems to be used to avoid yielding duplicate events
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 that case it'd be expected to add it to finishedEvents
, no?
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.
Oh, I see
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.
Updated
Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>
Related Issues
https://github.com/vercel/runtimes/issues/201
Shows an error message in case the checks failed and a spinner while they're running.
It won't show any new information when there are no checks, if they're skipped, or if they all succeed, since it wouldn't really fit into the
Inspect, Production/Preview
view.For the error we also don't need an extra link, because the inspect link above will be the only relevant one.
Tests
yarn test-unit
Code Review