Skip to content

Commit

Permalink
random order
Browse files Browse the repository at this point in the history
  • Loading branch information
zpoint committed Nov 29, 2024
1 parent 7f75f9f commit 64f9282
Show file tree
Hide file tree
Showing 2 changed files with 380 additions and 375 deletions.
7 changes: 6 additions & 1 deletion .buildkite/generate_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from collections import defaultdict
import copy
import os
import random
from typing import Any, Dict, List

import yaml
Expand Down Expand Up @@ -131,8 +132,12 @@ def main():
file.write('# This is an auto-generated Buildkite pipeline by '
'.buildkite/generate_pipeline.py, Please do not '
'edit directly.\n')
all_steps = [pipeline['steps'] for pipeline in pipelines]
# Shuffle the steps to avoid flakyness, consecutive runs of the same
# kind of test may fail for requiring locks on the same resources.
random.shuffle(all_steps)
final_pipeline = {
'steps': [pipeline['steps'] for pipeline in pipelines]
'steps': all_steps
}
yaml.dump(final_pipeline, file, default_flow_style=False)

Expand Down
Loading

0 comments on commit 64f9282

Please sign in to comment.