Fix stuck VSA consistency worker
What does this MR do and why?
This MR fixes the error within the VSA consistency worker class. (not user-facing)
In the previous MR (!122624 (merged)) we changed the batching logic to include records with null
end_event_timestamp
value. By doing so, the restoring of the cursor for the batching logic fails because we called .compact
on a hash which is now removing the end_event_timestamp
key and fails the validation when using keyset pagination:
Error:
RuntimeError:
Incorrect cursor values were given. Missing items: end_event_timestamp
lib/gitlab/pagination/keyset/order.rb:276:in `verify_incoming_values!',
lib/gitlab/pagination/keyset/order.rb:148:in `build_where_values',
lib/gitlab/pagination/keyset/order.rb:168:in `apply_cursor_conditions',
...
The fix is to avoid compacting the hash and allow having end_event_timestamp
with nil value.
How to set up and validate locally
Ensure that you're on ultimate and you have seeded DB.
On master branch, verify that the worker fails:
Analytics::CycleAnalytics::ConsistencyWorker.new.perform
On this branch, the same snippet shouldn't fail.
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.
Related to #408320 (closed)
Merge request reports
Activity
changed milestone to %16.1
assigned to @ahegyi
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 Harsimar Sandhu (
@harsimarsandhu
) (UTC+5.5, 3.5 hours ahead of@ahegyi
)Kamil Trzciński (
@ayufan
) (UTC+2, same timezone as@ahegyi
)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
DangerHi, @vsizov! Could you do the BE review?
requested review from @vsizov
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 6f162cc1expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | | Create | 8 | 0 | 1 | 0 | 9 | ✅ | | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Govern | 2 | 0 | 0 | 0 | 2 | ✅ | | Data Stores | 2 | 0 | 0 | 1 | 2 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 21 | 0 | 2 | 1 | 23 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+
@vsizov
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
added pipeline:mr-approved label
requested review from @splattael and removed review request for @vsizov
- Resolved by Peter Leitzen
Thanks a lot @ahegyi
Looks good to me
enabled an automatic merge when the pipeline for 72520f01 succeeds
mentioned in commit 6c49eee3
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-production label and removed workflowproduction label
mentioned in issue #408320 (closed)
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!2224 (merged)
added releasedpublished label and removed releasedcandidate label