Project

General

Profile

action #169261

Updated by dheidler about 2 months ago

Followup of https://progress.opensuse.org/issues/168400 

 ## Motivation 

 In #164898 we replaced the automatic git fetch cron (fetchneedles) with minion jobs. 

 There are three possible improvements. 

 - Resolve symlinks before enqueuing => ALREADY DONE in #168400 
 - Avoid fetch when we can check locally for existing ref *[DONE](https://github.com/os-autoinst/openQA/pull/6017)* 

 That leaves missing: 

 ### Reduce scope of minion locks 

 This is more complicated and maybe too much effort for little benefit, but: 

 In some cases we don't need to call any git commands that could conflict with other commands, e.g. just looking up the remote url. 
 Or the case mentioned in the previous section would be another command that would not interfere with other git tasks. 
 Any command that does not change anything. 
 For those we don't need a lock. 

 Only at that point where we see we have to do a fetch, we have to get the lock. 

 This reduces the chances of other tasks having to retry because it couldn't get a lock. 

 It's just problematic because if a task has two paths to update, and you only realize for the second one that you need the lock, you would have to retry, but you don't want to repeat the commands for the first path. 
 The `notes` field could act as a kind of state which of the paths have already been done. 

 ## Acceptance criteria 
 * **AC1**: Minion locks used for Git tasks take symlinking of case/needle directories into account.

Back