-
Notifications
You must be signed in to change notification settings - Fork 282
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
Observed generation #637
Observed generation #637
Conversation
ccef4e4
to
a67fe5a
Compare
Needs to make the test less flaky. Putting is down in favor of messaging topology operator, will pick up in couple days. |
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.
Two things that come to mind:
- Do we really need to test this at system level? I'll be much more in favour of testing this at integration level with
testEnv
if it's possible. - Does it make sense to add a test for observed generation transitions/increments?
It might be a bit in the edge between testing Kubernetes and testing our code, but I'd make an argument to say that we want to test that any update to the generation in metadata is reflected in the status of RabbitMQ.
Sadly you cannot... Observed generation is set only after a successful reconcile. Our integration tests controller never successfully exist because no pods ever becomes ready. It's the same as the status
Assuming that k8s api is updating the metadata.generation successfully (which is not in scope for our operator), the system test is testing that observedGeneration is set to a correct value: https://github.com/rabbitmq/cluster-operator/pull/637/files#diff-b18e65a50201ede1c97f44776a33955bd5c2dad93e055102833ddebe07fa647bR114. It's enough imo because we are not incrementing the counter ourselves, but rather setting it to the value of the object generation. |
This closes #311
Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed
Summary Of Changes
status.observedGeneration
to rabbitmqclusterAdditional Context
Local Testing