-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat(health): add Rabbitmq topology resource customizations #22066
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
feat(health): add Rabbitmq topology resource customizations #22066
Conversation
❗ Preview Environment undeploy from Bunnyshell failedSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
8827d08
to
1c6ae59
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22066 +/- ##
==========================================
+ Coverage 55.97% 55.99% +0.02%
==========================================
Files 343 343
Lines 57527 57527
==========================================
+ Hits 32202 32215 +13
+ Misses 22674 22664 -10
+ Partials 2651 2648 -3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
Can you combine the nested ifs into one, e.g. condition.type ~= nil even seems unnecessary if we check for condition.type == "Ready"?
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.
Indeed, looking at the source code, if a condition is returned, it will have the type, status and reason keys, so no need to "nil check" them.
I removed the nil checks for the condition components.
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
Same here
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.
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
And here
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.
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
And here
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.
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
And here
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.
if condition.type ~= nil then | ||
if condition.type == "Ready" then | ||
if condition.status ~= nil and condition.reason ~= nil then | ||
if condition.status == "True" and condition.reason == "SuccessfulCreateOrUpdate" then |
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.
And here
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.
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.
Please, make ifs less nested (some not commented specifically)
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Signed-off-by: Francis Provencher <fprovencher@drw.com>
Hi, We are very interested, in my company, to have those new health checks, when do you think it will be available ? Thinks |
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.
Thanks!
…#22066) Signed-off-by: Francis Provencher <fprovencher@drw.com> Signed-off-by: Lyheng <lyhengtep@gmail.com>
…#22066) Signed-off-by: Francis Provencher <fprovencher@drw.com>
…#22066) Signed-off-by: Francis Provencher <fprovencher@drw.com>
…#22066) Signed-off-by: Francis Provencher <fprovencher@drw.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
…#22066) Signed-off-by: Francis Provencher <fprovencher@drw.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Kept it simple.
There are only 2 defined states (on top of unknown) as per: https://github.com/rabbitmq/messaging-topology-operator/blob/0c910d977b21b4610b789a90e7edfc8ca42d9649/api/v1beta1/conditions.go#L26
Checklist: