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

M3-2899 Fix: Catch deleted events errors #5079

Merged
merged 2 commits into from
Jun 19, 2019
Merged

M3-2899 Fix: Catch deleted events errors #5079

merged 2 commits into from
Jun 19, 2019

Conversation

Jskobos
Copy link
Contributor

@Jskobos Jskobos commented Jun 17, 2019

Description

After a Linode was deleted, if it had long-running events on it,
our linode.events.ts logic was requesting the (nonexistent)
Linode after every event, and these errors were uncaught and therefore
being reported to Sentry.

Fixed this in two ways:

  • Added a catch block to the requestLinodeForStore method, which
    drops the error
  • Added a check in the requestLinodeForStore thunk, so that the API
    is only hit for a Linode that exists in our store. Since requestLinodeForStore
    is only called for existing Linodes, this shouldn't cause any issues; however,
    fix Testing Linode Power #1 above is enough to resolve this issue, so it might be safer to remove this.

After a Linode was deleted, if it had long-running events on it,
our linode.events.ts logic was requesting the (nonexistent)
Linode after every event, and these errors were uncaught and therefore
being reported to Sentry.

Fixed this in two ways:

- Added a catch block to the requestLinodeForStore method, which
drops the error
- Added a check in the requestLinodeForStore thunk, so that the API
is only hit for a Linode that exists in our store. Since requestLinodeForStore
is only called for existing Linodes, this shouldn't cause any issues; however,
fix #1 above is enough to resolve this issue, so it might be safer to remove this.
@Jskobos Jskobos self-assigned this Jun 17, 2019
Copy link
Contributor

@martinmckenna martinmckenna left a comment

Choose a reason for hiding this comment

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

Tested with a large resize. Looks pretty good. There's still a small (very tiny) window where you might get a Not Found error, but I think this will help significantly.

There is still the issue where the events polling is set to 1 second, so in the future we should look into not resetting the events polling if arrayOfEvents.contains(deletedEvents && someEventOnDeletedLinode). Or something like that

@Jskobos Jskobos merged commit d5acab1 into linode:develop Jun 19, 2019
@Jskobos Jskobos deleted the M3-2899-catch-deleted-events-errors branch June 19, 2019 13:22
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.

3 participants