Bug 15686

Summary: AB-INT: metrics git error: cannot lock ref
Product: [Infrastructure] AutoBuilder Reporter: Mathieu Dubois-Briand <mathieu.dubois-briand>
Component: autobuilderAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: infras.ab.watcher, Infras.watcher, pidge, randy.macleod, yoann.congal
Version: unspecified   
Target Milestone: 5.3   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Mathieu Dubois-Briand 2024-12-09 11:28:15 UTC
Got the following error when the metrics autobuilder tried to push to the git:

> remote: error: cannot lock ref 'refs/heads/master': is at 844def31c68bc9557b2cf1d3028fa527e5873b76 but expected e59c5b889cd834ba64323c4dd429d3140d6a5c26
> To ssh://push.yoctoproject.org/yocto-metrics
> ! [remote rejected]   master -> master (failed to update ref)
> error: failed to push some refs to 'ssh://push.yoctoproject.org/yocto-metrics'

https://valkyrie.yoctoproject.org/#/builders/103/builds/308
Comment 1 Mathieu Dubois-Briand 2024-12-09 11:32:31 UTC
metrics debian11-vk-3 dunfell completed at 2024-12-06T07:10:13Z
https://valkyrie.yoctoproject.org/#/builders/103/builds/308/steps/13/logs/stdio
Comment 2 Randy MacLeod 2024-12-12 15:43:22 UTC
Put a retry around it?
Comment 3 Mathieu Dubois-Briand 2025-01-20 08:39:07 UTC
metrics debian11-vk-3 dunfell completed at 2025-01-17T07:22:38Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/519/steps/13/logs/stdio
Comment 4 Mathieu Dubois-Briand 2025-03-13 09:29:49 UTC
metrics alma9-vk-2 kirkstone completed at 2025-03-11T06:18:31Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/785/steps/13/logs/stdio
Comment 5 Mathieu Dubois-Briand 2025-03-18 09:53:11 UTC
metrics alma8-vk-2 kirkstone completed at 2025-03-18T06:18:57Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/820/steps/14/logs/stdio
Comment 6 Ross Burton 2025-06-12 15:09:43 UTC
This hasn't happened for a while.  Moving to 5.3 but it is possible that better locking has been backported so we should close it in a few months if it doesn't replicate.
Comment 7 Ross Burton 2026-01-29 22:30:58 UTC
Posted the backport of the "rebase before pushing" patch for the kirkstone branch, hopefully will stop this rare race.
Comment 8 Ross Burton 2026-02-26 16:10:30 UTC
Should be fixed for kirkstone in bb08d2608471e8cb48e84058a14e77705529093b.