-
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
capabilities: reconciliate product on backend metric deletion #444
Conversation
da77b87
to
81f5c11
Compare
b4a335a
to
40be156
Compare
40be156
to
0a62aef
Compare
0a62aef
to
9aafa60
Compare
ping @miguelsorianod |
I was waiting for your input here. After we talked about this you were going to review this approach (let it fail vs try to fix it, etc...). Have you reviewed it? |
You are the one in the asignees section :) This is ready to be reviewed. |
? That does not change what was talked and the action points of the other day. I was expecting you to review it and give me feedback based on that. |
This PR implements a "Product CR Spec" update from the Backend Controller to make it valid from a invalid state. This adds robustness to the operator, kind of healing capability when some spec becomes invalid due to an external action. This same behavior has been seen by 3scale internal System. When backend metric or method is deleted in the dashboard, the application plan limits and pricing rules with references to it are automatically deleted also. The other approach is, do not react and do not "heal" invalid CR. If backend metric is deleted, the product spec will be invalid, as existing backend reference no longer exists. The operator would report as events, CR status and internal log and manual action would be required. Both approaches can be valid. Since 3scale UI "heals" application plans limits and pricing rules automatically, for consistency shake, I would add this feature to the operator. |
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 for the detailed information and insight @eguzki 👍
I'm fine with this approach. Both approaches seem acceptable solutions to me with some pros and cons for each one.
I left a minor comment. All other changes look good to me 👍
212bf7a
to
1f81d05
Compare
Code Climate has analyzed commit 1f81d05 and detected 9 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
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.
👍
When backend metric or method is deleted, Application plan limits and pricing rules with references to it have to be deleted also, as it happens automatically in the System UI.
Fixes issue about product and backend consistency when there are references between them.