Skip to content
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

Prevent spinnies error on upload if buildPolling fails #562

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

anthmatic
Copy link
Contributor

Description and Context

When polling was sharing a catch block with the upload function, which was causing issues where an inactive "spinner" was incorrectly updated.

image

Screenshots

TODO

Who to Notify

deployedBuildId
);
} catch (err) {
logger.error(err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you elaborate on why moving this here fixes the problem?

Also, what type of errors can exist here? Are they api-related errors, or internal JS errors? If it's the latter I think we should switch this to be logger.debug() so we don't fill the console with internal js errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call on error types, I'll address that.

Also, after looking at this again don't think think that this change is relevant here. It is in upload.js, so I'll add a comment there

);
await pollBuildStatus(accountId, projectName, upload.buildId);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If this fails, the spinnies.fail() within the catch statement may throw an error because the spinner was already removed above

@anthmatic anthmatic changed the title move polling to its own try/catch block Prevent spinnies error on upload if buildPolling fails Sep 24, 2021
Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me 👍

@anthmatic anthmatic merged commit eec3c7a into master Sep 29, 2021
@anthmatic anthmatic deleted the fix/projects/poll-status-errors branch September 29, 2021 15:14
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