Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small edits to the Soak Tests #105

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/scripts/performance-tests/produce_metric_widget_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,21 @@ def parse_args():
f"Will create a snapshot at URL: https://github.com/{args.github_repository}/blob/gh-pages/{snapshot_location}",
)

# Delete oldest snapshots

snapshot_dirs_length = len(os.listdir(SOAK_TESTS_SNAPSHOTS_COMMITS_DIR))

if snapshot_dirs_length > args.max_benchmarks_to_keep:
oldest_snapshot_dirs = nsmallest(
snapshot_dirs_length - args.max_benchmarks_to_keep,
Path(SOAK_TESTS_SNAPSHOTS_COMMITS_DIR).iterdir(),
key=os.path.getmtime,
)
for old_snapshots_dir in oldest_snapshot_dirs:
shutil.rmtree(old_snapshots_dir, ignore_errors=True)
# Delete oldest run folders in most recent commit and oldest commit folders

for snapshots_dir in [
SOAK_TESTS_SNAPSHOTS_COMMITS_DIR,
f"{SOAK_TESTS_SNAPSHOTS_COMMITS_DIR}/{ args.target_sha }/runs",
]:
snapshot_dirs_length = len(os.listdir(snapshots_dir))

if snapshot_dirs_length > args.max_benchmarks_to_keep:
oldest_snapshot_dirs = nsmallest(
snapshot_dirs_length - args.max_benchmarks_to_keep,
Path(snapshots_dir).iterdir(),
key=os.path.getmtime,
)
for old_snapshots_dir in oldest_snapshot_dirs:
shutil.rmtree(old_snapshots_dir, ignore_errors=True)

logger.info("Done creating metric widget images.")
2 changes: 1 addition & 1 deletion .github/workflows/soak-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
with:
filename: .github/auto-issue-templates/failure-during-soak_tests.md
- name: Publish Issue if failed AFTER Performance Tests
uses: NathanielRN/create-an-issue@v2.5.1-alpha2
uses: JasonEtco/create-an-issue@v2
if: ${{ github.event_name == 'schedule' &&
steps.check-failure-after-performance-tests.outcome == 'failure' }}
env:
Expand Down