Fix handling Service Ping response with only usage_data_id
What does this MR do and why?
Related to #337497 (closed)
https://gitlab.com/gitlab-services/version-gitlab-com/-/merge_requests/630 fixed Version App not sending usage_data_id
when there's not enough payloads from a given GitLab instance to send back full DevOps metrics in a conv_index
Hash. This only happens for a very first Service Ping from a new instance.
This turned out to not be enough to fix #337497 (closed) and ServicePing::SubmitService
now tries to save an empty DevOpsReport::Metric
record when only usage_data_id
is present in a response.
This MR fixes this behavior by omitting usage_data_id
in a check if metrics are present in a response.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Reset GDK data with
gdk reset-data
- Set
ServicePing::SubmitService.base_url
to point to your local Version App instance. - Send Service Ping to local Version App instance by running
ServicePing::SubmitService.new.execute
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %14.4
assigned to @pskorupa
added 1 commit
- f4bc9709 - Fix handling Service Ping response DevOps metrics
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend George Koltsov ( @georgekoltsov
) (UTC+1, 1 hour behind@pskorupa
)Terri Chu ( @terrichu
) (UTC-4, 6 hours behind@pskorupa
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermarked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
added 1 commit
- ca9b04dd - Fix handling Service Ping response DevOps metrics
@nbelokolodov Would you have a moment to review this?
requested review from @nbelokolodov
removed review request for @nbelokolodov
- Resolved by Nicolas Dular
@mikolaj_wawrzyniak I'm assigning you for a backend maintainer review in advance, so that maybe we'll fit this in 14.4, but it should do great harm if we won't make it on time.
Not including it will only affect saving DevOps metrics for the very first Service Ping -
ServicePing::SubmitService
will try to save an empty report and fail with no side effects, where this shouldn't even be attempted in the first place.Edited by Piotr Skorupa
requested review from @mikolaj_wawrzyniak
added 1 commit
- e06fe59c - Fix handling Service Ping response DevOps metrics
@mikolaj_wawrzyniak
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
enabled an automatic merge when the pipeline for 6559eb95 succeeds
mentioned in commit ba527d74
added workflowstaging-canary label and removed workflowverification label
added workflowstaging label and removed workflowstaging-canary label
mentioned in issue #343145 (closed)
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!306 (merged)
added releasedpublished label and removed releasedcandidate label