This repository was archived by the owner on Sep 7, 2020. It is now read-only.
Draft
Conversation
Redundant pipelines are only canceled if no uninterruptible job has started. Let's mark all the jobs as interruptible hoping the redundant pipelines will get canceled, to try to reduce the load on the build server. There is one exception: the certification cannot currently be interrupted, because the UCC wouldn't stop properly. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
The certification tests generate files owned by root, since the different sigma agents need to run as root. To prevent the next job from failing to remove files owned by root, the files have their ownership reset at the end of every job (by the run_test_file.py script). When a job is canceled however, there is no way to change the ownership of those files, neither is there a way to remove them at the next run (because the very first thing the gitlab-runner does is to try to remove them). One way to solve this would be to use 'none' as the git clean flags, and do the cleanup ourselves. A downside of this approach is that we risk either not removing some parts (example, files under .tmp added by Gitlab CI) or to removing too much (for example if we run git clean, it would delete the downloaded artifacts...). Another way is to use the 'clone' strategy to always remove the repository entirely and start with an empty folder every time. This approach has been chosen because as the certification tests already take a lot of time to run, it shouldn't have a significant impact on the total time. While we're at it, also remove the 'echo $CI_COMMIT_DESCRIPTION' leftover. Note that this commit still won't allow us to mark the certification tests as interruptible, because the UCC does not terminate properly when canceling a job anyway. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
41f86c7 to
6fdbad4
Compare
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Essentially 2 things:
This should hopefully make it overall faster, because redundant pipelines will get cancelled (a pipeline is redundant when there is a more recent one for the same branch).
Only the latest pipeline for each branch will get completed.