-
Notifications
You must be signed in to change notification settings - Fork 5
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
allow service registration forced update of type field #590
Conversation
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.
This looks good to me.
I don't think this needs to be addressed in this PR but I'm a little concerned that this can "break the Magpie
instance if those definitions are not compatible".
I did a little experimenting and it looks like an incompatible resource definition will cause a 500 error for certain routes but won't completely break the whole Magpie instance which is good.
Maybe we should add a line about how to recover in case a breakage occurs. Something like:
- If updating the service type results in unexpected behaviour due to incompatible
Resource
orPermission
definitions, please manually delete or update the problematic definitions from theMagpie
database.
I know it's not a very user-friendly solution but it at least gives the user a recommended course of action.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #590 +/- ##
==========================================
- Coverage 80.84% 80.82% -0.03%
==========================================
Files 73 73
Lines 10185 10188 +3
Branches 1822 1823 +1
==========================================
Hits 8234 8234
- Misses 1629 1631 +2
- Partials 322 323 +1
☔ View full report in Codecov by Sentry. |
Indeed. This is what I meant by "break". The code assumes that valid combinations of services/resources/permissions were pre-validated by the API/UI/registration script beforehand. If items are combined in a way that is invalid, it won't revalidate everything each time, because that would slow down way too much the execution. This is mostly why the
For this, I think it is more a case of backing up your DB, try it, and revert as needed. |
relates to bird-house/birdhouse-deploy#348