Skip to content

Fix parity update script #1342

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

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Fix parity update script #1342

merged 1 commit into from
Jun 25, 2024

Conversation

silv-io
Copy link
Member

@silv-io silv-io commented Jun 25, 2024

Motivation

Since some changes in our core repositories happened, where the parity calculations don't happen on every commit, we're running into issues with the parity update script (see https://github.com/localstack/docs/actions/runs/9639842836). Now the parity reporting is always to be found in the latest scheduled run or manual full run of the pipelines.

Changes

  • Remove old handling of not found artifacts which relied on finding it on other executions on the same tree. The assumption that parity metrics are always in the latest commits or on the tree of dependent branches does not hold anymore.
  • Add loop based handling where the last 20 runs on master are looped through and searched for the artifact

Testing

Running it locally now yields following result:

Searching for Artifact: parity-metric-ext-raw-* in workflow 'Build, Test, Push' on branch master in repo localstack/localstack-ext.
searching last workflow with 'conclusion=success'
Trying to download file with run_id 9659964244...
no artifact matches any of the names or patterns provided
Trying to download file with run_id 9656490933...
...downloaded parity-metric-ext-raw-* successfully.
./target/tmp_download
├── parity-metric-ext-raw-amd64-1
│   └── metric-report-raw-data-2024-06-25__04_49_41-pytest-junit-main-amd64-1.csv
├── parity-metric-ext-raw-amd64-2
│   └── metric-report-raw-data-2024-06-25__04_48_34-pytest-junit-main-amd64-2.csv
├── parity-metric-ext-raw-arm64-1
│   └── metric-report-raw-data-2024-06-25__04_50_08-pytest-junit-main-arm64-1.csv
└── parity-metric-ext-raw-arm64-2
    └── metric-report-raw-data-2024-06-25__04_49_27-pytest-junit-main-arm64-2.csv

5 directories, 4 files
Moving artifact to ./target/metrics-raw
content of ./target/metrics-raw:
./target/metrics-raw
├── pro-integration-test-metric-report-raw-data-2024-06-25__04_48_34-pytest-junit-main-amd64-2.csv
├── pro-integration-test-metric-report-raw-data-2024-06-25__04_49_27-pytest-junit-main-arm64-2.csv
├── pro-integration-test-metric-report-raw-data-2024-06-25__04_49_41-pytest-junit-main-amd64-1.csv
└── pro-integration-test-metric-report-raw-data-2024-06-25__04_50_08-pytest-junit-main-arm64-1.csv

1 directory, 4 files
Done.

We can see that the latest run does not contain the metrics but the one before that did.

See this PR for the result of a full run of the update workflow: https://github.com/localstack/docs/pull/1343/files

@silv-io silv-io requested review from alexrashed and steffyP June 25, 2024 12:09
Copy link

github-actions bot commented Jun 25, 2024

🎊 PR Preview has been successfully built and deployed to https://localstack-docs-preview-pr-1342.surge.sh 🎊

Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! This approach works well with our current testing strategy and the script actually got way simpler. 💯 🧹 🐞 🔨
The manual run triggered by @silv-io worked fine and the resulting PR is looking good as well: #1343

@alexrashed alexrashed merged commit 1673ba5 into main Jun 25, 2024
3 checks passed
@alexrashed alexrashed deleted the fix-parity-update branch June 25, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants