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

Fixes 500 error occurred during refreshing of a provider instance #9353

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

elsamaryv
Copy link
Contributor

@elsamaryv elsamaryv commented Feb 20, 2025

Issue- An internal server error occurs during refresh('Refresh Relationships and Power States') of a provider instance. The error occurs only in cases when refresh is done 'after' a reconfigure ('Reconfigure selected instance') operation on the provider instance.

Observation- This was happening because it was rendering the _resize partial due to a pre-existing value in the @sb[:action].

Steps to reproduce the behavior:

  1. Choose instance from AWS provider
  2. Configuration -> Reconfigure selected Instance
  3. Recheck on the same item from step 1
  4. Configure -> Refresh Relationships and Power States

Before the fix -

instance refresh - before

After the fix -
instance refresh - after

@miq-bot add-label bug
@miq-bot add-reviewer @GilbertCherrie

@miq-bot miq-bot added the bug label Feb 20, 2025
The error occurs only in cases when refresh is done 'after' a reconfigure operation on the provider instance. It was rendering the _resize partial due to a pre-existing value in the @sb[:action]

Fixes rspec failures
@elsamaryv elsamaryv force-pushed the ivt-server-err-fix-2848 branch from 7e6c969 to e3a6d57 Compare February 20, 2025 14:02
@elsamaryv elsamaryv marked this pull request as ready for review February 20, 2025 14:11
@elsamaryv elsamaryv requested a review from a team as a code owner February 20, 2025 14:11
@GilbertCherrie GilbertCherrie self-assigned this Feb 20, 2025
@elsamaryv
Copy link
Contributor Author

@miqbot assign @Fryguy

@agrare
Copy link
Member

agrare commented Feb 20, 2025

@elsamaryv is it possible to add a spec test covering this case?

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

Test fails without the fix to application_controller/explorer, 👍 LGTM

@GilbertCherrie this does feel pretty fragile, I see we do clear out @record and @sb[:action] in a number of other places (e.g. @sb[:action] = @edit = @record = nil), if this is required I wonder if a more general approach to clearing out stale values when switching between states would be less prone to error and not require each method to do it manually.

@agrare agrare merged commit 5ced471 into ManageIQ:master Feb 24, 2025
15 checks passed
@agrare agrare assigned agrare and unassigned GilbertCherrie Feb 24, 2025
@elsamaryv elsamaryv deleted the ivt-server-err-fix-2848 branch February 25, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants