-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure count items is not already running
A race condition where a count items was running when the new one started at the beggining of the quota tests, and the old one completing after the new one, would lead to an override of the infostore collection, in turn leading to missing metrics for the quota buckets/accounts, making the quota tests fail till a new count items starts. Use a file locking mechanism to ensure no concurrent job runs - Watching the resource or using kube api is prone to race condition, as their is a delay between the request to create a job, and its run, plus, the logic is not easy to centralize if we consider job already completed or not yet started, as we delete the old jobs upon completion - Using alock mechanism is similar to what we already have for quotas, plus, it ensures no race condition and tests being able to restart as soon as possible. Issue: ZENKO-4941
- Loading branch information
1 parent
dc6eaa1
commit 814e417
Showing
1 changed file
with
54 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters