-
Notifications
You must be signed in to change notification settings - Fork 124
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
PMM-11423: support for updating a service #1590
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1590 +/- ##
==========================================
+ Coverage 42.81% 42.85% +0.03%
==========================================
Files 382 382
Lines 48101 48085 -16
==========================================
+ Hits 20595 20607 +12
+ Misses 25568 25545 -23
+ Partials 1938 1933 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@PavelKhripkov @BupycHuk please review. |
@michal-kralik we have some functionality related to upd: We really need changes otherwise our mongo backup logic will be broken. |
Sounds good. What kind of changes do you have in mind? |
I'm waiting response from @rnovikovP regarding this thing. Need to set priority and discuss possible solutions |
upd: We decided to not block these changes and we'll prepare fixes to cover cases when cluster is changed. |
Remove scheduled tasks on cluster changing.
@@ -434,7 +435,11 @@ func (ss *ServicesService) RemoveCustomLabels(ctx context.Context, req *inventor | |||
} | |||
|
|||
// ChangeService changes service configuration. | |||
func (ss *ServicesService) ChangeService(ctx context.Context, params *models.ChangeStandardLabelsParams) (*inventorypb.ChangeServiceResponse, error) { | |||
func (ss *ServicesService) ChangeService(ctx context.Context, mgmtServices common.MgmtServices, params *models.ChangeStandardLabelsParams) error { | |||
if err := mgmtServices.RemoveScheduledTasks(ctx, ss.db, params); err != nil { |
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.
@PavelKhripkov would it make more sense to execute this in a transaction along with the labels change?
In case the labels change fail, we already removed scheduled tasks and there's no way back.
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.
For sure, but the calls made on api-level that doesn't allow to rollback. To implement the same on a deeper level, we need to duplicate alot of code lines. And without proper testing It won't be reliable.
PMM-11423
Requires the following to be merged at the same time:
Build: SUBMODULES-3016