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

Fix state is not reset when feature flag API request fails #13090

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

nwmac
Copy link
Member

@nwmac nwmac commented Jan 14, 2025

Summary

Fixes #11167

Occurred changes and/or fixed issues

This PR fixes the issue above and adds an e2e test to cover the changes.

We now revert the change to the feature flag model if the API request to update it fails, ensuring it does not appear changed in the UI.

We also improve the error message, taking the message from the error response if available.

Finally, this PR fixes a small bug, where if an error occurred, closing the dialog and clicking enable/disable again on a flag would show the previous error.

Note: We can't wire this into the flags that require restart, as the API does not always return before it restarts, so the API call can error, but that can indicate that a restart has started.

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@nwmac nwmac force-pushed the fix-feature-flag-activation-errors branch from 757705b to 86849a7 Compare January 15, 2025 08:33
@nwmac nwmac requested a review from richard-cox January 15, 2025 15:33
@nwmac nwmac merged commit 54e2cbd into rancher:master Jan 20, 2025
34 checks passed
@nwmac nwmac deleted the fix-feature-flag-activation-errors branch January 20, 2025 14:26
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.

Failures when Activating / Deactiving a Feature Flag are ignored
2 participants