Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes 2 issues that were reported today:
Sometimes, for mysterious reasons, lassie_reboot events can come through with
entity: null
, which causes a console error. This is not a problem for users but will pollute sentry and the console. Now that we have nullish coalescing, we can handle this case more elegantly.When a Linode is restored from a backup, the IDs of its
configs and disks change. When the process is complete,
we need to re-request both configs and disks to ensure
that our cache is up to date. If we fail to do this, a
user will try to boot the Linode with a previous config,
which will cause an error.
Fortunately, we already have an event that has this behavior
(for the same reasons), linode_rebuild. By moving backup_restore
to the same case in the switch in linode.events.ts, we can
achieve the desired effect.
Type of Change
Notes
To test #1, use Charles to pass a
lassie_reboot
event with an entity set tonull
. In the events menus, the event should be displayed without the label (since null.label isn't), and the console should be clear.To test #2, select a backup then "restore to existing Linode". When the restore is complete, without reloading the page try to boot the target Linode.