Sync updated_at attribute when updating epic
What does this MR do and why?
In !155468 (merged) we updated the sync to only include attributes that were changed but we should sync updated_at
and updated_by
regardless to avoid them getting out of sync.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Update and checkout master
- Monitor the sync log by running
tail -f log/epic_work_item_sync.log
in yourgitlab
directory - Visit an epic with a synced work item (or create a new one using the URL
http://127.0.0.1:3000/groups/GROUP-PATH/-/epics/new
) and update its labels, there should be a new logged warning, similar to:
{
"severity":"WARN",
"time":"2024-06-11T17:08:04.442Z",
"correlation_id":"01J044ARDREGYBJZ8CRSHA7W11",
"meta.caller_id":"WorkItems::ValidateEpicWorkItemSyncWorker",
"meta.remote_ip":"127.0.0.1",
"meta.feature_category":"team_planning",
"meta.user":"root",
"meta.user_id":1,
"meta.client_id":"user/1",
"meta.root_caller_id":"graphql:unknown",
"message":"Epic and work item attributes are not in sync after update",
"epic_id":229,
"work_item_id":759,
"mismatching_attributes":[
"updated_at"
],
"event":"Epics::EpicUpdatedEvent"
}
- Checkout this branch
eg-fix-epics-update-sync-updated-at
and verify that updating the label labels don't result in anymismatching_attributes
.