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

Properly clear suma genserver state when clearing software updates settings #2530

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

nelsonkopliku
Copy link
Member

@nelsonkopliku nelsonkopliku commented Apr 17, 2024

Description

This makes sure the state of suma genserver is cleared up always when clearing software updates settings, otherwise might happen that genserver state is kept, causing discoveries to happen when they should not.

How was this tested?

Automated tests and on a real infrastructure.

@nelsonkopliku nelsonkopliku marked this pull request as ready for review April 17, 2024 15:02
@nelsonkopliku nelsonkopliku self-assigned this Apr 17, 2024
@nelsonkopliku nelsonkopliku added bug Something isn't working elixir Pull requests that update Elixir code env Create an ephimeral environment for the pr branch labels Apr 17, 2024
Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

Yes, I think it is better to clean in any scenario.

Anyway, the clear simply cleans the auth cookie, right?
I don't know how that could affect doing not needed discoveries, but well, still think it is a good change. I guess we spare one potentially useless query to suma, that would fail.

@nelsonkopliku
Copy link
Member Author

@arbulu89 the problem was that when clearing up suma settings when there were no hosts in the system did clear the entry in the database but not the genserver state 🙈

@nelsonkopliku nelsonkopliku merged commit 016b6ec into main Apr 18, 2024
26 checks passed
@nelsonkopliku nelsonkopliku deleted the fix-suma-settings-clearup branch April 18, 2024 06:52
@arbulu89
Copy link
Contributor

Yes, but the gen server state was supposed to be rebuild, if there was any authentication error in any call

@nelsonkopliku
Copy link
Member Author

nelsonkopliku commented Apr 18, 2024

correct, if there was any authentication. In case what was in memory was good, no change needed.
Anyway I tested with Alberto and fixes the noticed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working elixir Pull requests that update Elixir code env Create an ephimeral environment for the pr branch
Development

Successfully merging this pull request may close these issues.

None yet

2 participants