-
Notifications
You must be signed in to change notification settings - Fork 361
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
fix: [M3-7718] - Stale assigned Firewall data displaying on Linode and NodeBalancer details pages #10534
fix: [M3-7718] - Stale assigned Firewall data displaying on Linode and NodeBalancer details pages #10534
Conversation
…d NodeBalancer details pages
@@ -66,17 +66,19 @@ export const FirewallDialog = React.memo((props: Props) => { | |||
|
|||
const onSubmit = async () => { | |||
await requestMap[mode](); | |||
// Invalidate Firewalls assigned to NodeBalancers and Linodes when Firewall is enabled, disabled, or deleted. | |||
// eslint-disable-next-line no-unused-expressions | |||
devices?.forEach((device) => { |
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.
Previously, we were only invalidating the Firewalls assigned to a device when deleting the Firewall. Updating the status of the Firewall (e.g. enabling it or disabling it) should be reason to invalidate the Firewall too.
@@ -193,6 +201,19 @@ export const FirewallRulesLanding = React.memo((props: Props) => { | |||
updateFirewallRules(finalRules) | |||
.then((_rules) => { | |||
setSubmitting(false); | |||
// Invalidate Firewalls assigned to NodeBalancers and Linodes. |
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 invalidation was happening on Firewall rule updates, which was the initial issue identified in the ticket.
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.
Just some linting and renaming in this file. The query key for nodebalancers is plural, so updated the name of the import accordingly. This is done in a few other files, too.
Coverage Report: ✅ |
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.
Thank you for the fixes! 🧰
Description 📝
useAllFirewallDevicesQuery
was not always being invalidated when modifying a Firewall.As a result, without refreshing the page, adding/deleting rules or enabling/disabling a Firewall with assigned device(s) will not show the Firewall's most accurate status or rules on the NodeBalancer Details > Settings or Linode Details > Network tab if the query for that Firewall has already been cached because the page was previously visited.
Changes 🔄
nodebalancers
).Target release date 🗓️
6/10
Preview 📷
Screen.Recording.2024-05-31.at.8.42.11.AM.mov
Screen.Recording.2024-05-31.at.8.43.26.AM.mov
How to test 🧪
Prerequisites
(How to setup test environment)
Reproduction steps
(How to reproduce the issue, if applicable)
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply