-
Notifications
You must be signed in to change notification settings - Fork 95
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
Bug 2012069: Refactoring Status controller #498
Merged
openshift-merge-robot
merged 25 commits into
openshift:master
from
rluders:refactoring-status-controller
Oct 8, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
bec2914
refactor: simplifying the logic for merge method
28986b2
refactor: extracting methods
a32b4db
refactor: improving variable names
3cf6071
refactor: improves condition handling
f32abb3
refactor: rename status*.go to controller*.go
c6fd846
refactor: introduce controller status and status messages
2814df4
style: fixing linting issues
c4755bb
fix: error handling to status.go
5ee0837
style: converting TODOS to issues
cc26439
refactor: smaller fixes
fe535b4
fix: fixing allReady inverted logic.
1488b79
refactor: conditions entries to clusteroperator
9a45d22
fix: fixing some code issues
cbb7125
test: improve test coverage
0b6f95d
style: disable funlen for Test_conditions_setCondition
ab0bb88
refactor: replace switch with if
2adc54a
style: happy lint
262453a
refactor: remove useless operator status
105195d
chore: better test name
847635a
refactor: improve log msg and logic
e99b571
refactor: remove duplicated message
069fff9
chore: fixing broken test
65300b4
fix: reset status controller every time (testing)
53b5d39
fix: check healthy operator status
69a4731
fix: improving code based on review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
@tremes So, after a few tests (and fighting with the e2e tests), it seems that this is the best solution. We keep an instance to the status controller into the controller (controller everywhere) and then it encapsulates the logic to handle the statuses. But, it needs to be reset every time that the merge is executed, otherwise, the operator status would be wrong.
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.
yes I am looking at it and it seem we are reseting everything (also the line https://github.com/openshift/insights-operator/pull/498/files#diff-10c33b0f428af9470aef2747e42fc97d97150d338b151e836d9cdebbf4fbef42R149) eveyrtime....
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.
Yeh, but in this case it is correct. We are "resetting" 'cause the
merge
method receives theclusterOperator
when it is called.