Skip to content

Update test durations automatically based on latest durations from master #12748

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

k-a-il
Copy link
Contributor

@k-a-il k-a-il commented Jun 12, 2025

Motivation

While switching from CircleCI to GitHub Actions, I saw that the test durations file hadn’t been updated in about a year. Since then, we’ve added a lot of new tests. This pull request adds a workflow that downloads test durations from the latest scheduled run on the master branch, combines them, and creates a PR with the updated test durations file. New workflow is scheduled to run every month.

Changes

  • Added a workflow to download and merge the test durations file, and create a pull request with the updates

Testing

Tested in a forked repostiory.

Copy link

github-actions bot commented Jun 12, 2025

Test Results - Preflight, Unit

21 613 tests  ±0   19 957 ✅  - 1   6m 45s ⏱️ -15s
     1 suites ±0    1 655 💤 ±0 
     1 files   ±0        0 ❌ ±0   1 🔥 +1 

For more details on these errors, see this check.

Results for commit 75f3790. ± Comparison against base commit 3bbf944.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 12, 2025

Test Results (MA/MR) - Preflight, Unit

21 613 tests  ±0   19 958 ✅ ±0   6m 28s ⏱️ +7s
     1 suites ±0    1 655 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 75f3790. ± Comparison against base commit 3bbf944.

♻️ This comment has been updated with latest results.

Copy link

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 9s ⏱️ -29s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit b22b9a9. ± Comparison against base commit 3bbf944.

Copy link

github-actions bot commented Jun 12, 2025

Test Results (amd64, MA/MR) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 12s ⏱️ -7s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 75f3790. ± Comparison against base commit 3bbf944.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 12, 2025

Test Results (MA/MR) - Alternative Providers

987 tests  ±0   589 ✅ ±0   29m 59s ⏱️ -2s
  4 suites ±0   398 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 75f3790. ± Comparison against base commit 3bbf944.

♻️ This comment has been updated with latest results.

Copy link

Test Results - Alternative Providers

987 tests   589 ✅  30m 17s ⏱️
  4 suites  398 💤
  4 files      0 ❌

Results for commit b22b9a9.

Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 21m 21s ⏱️
5 230 tests 4 301 ✅ 929 💤 0 ❌
5 236 runs  4 301 ✅ 935 💤 0 ❌

Results for commit b22b9a9.

Copy link

github-actions bot commented Jun 12, 2025

Test Results (amd64, MA/MR) - Integration, Bootstrap

    5 files  ±0      5 suites  ±0   2h 21m 17s ⏱️ - 1m 9s
5 230 tests ±0  4 301 ✅ ±0  929 💤 ±0  0 ❌ ±0 
5 236 runs  ±0  4 301 ✅ ±0  935 💤 ±0  0 ❌ ±0 

Results for commit 75f3790. ± Comparison against base commit 3bbf944.

♻️ This comment has been updated with latest results.

@k-a-il k-a-il self-assigned this Jun 13, 2025
@k-a-il k-a-il added the semver: patch Non-breaking changes which can be included in patch releases label Jun 13, 2025
@k-a-il k-a-il marked this pull request as ready for review June 13, 2025 06:55
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.

Nice! This is really cool! The update-test-durations.yml might be something we want to consider generalizing and moving to our meta repository in the future to use it in other repositories as well 🤩

Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

LGTM! Just some minor non-blocking suggestions :)

- name: Latest run-id from community repository
run: |
latest_workflow_id=$(curl -s https://api.github.com/repos/localstack/localstack/actions/workflows \
| jq '.workflows[] | select(.name=="AWS / Build, Test, Push").id')
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: I think you can use the aws-test.yml filename here as well. This might make it more stable in regards to name changes

latest_workflow_id=$(curl -s https://api.github.com/repos/localstack/localstack/actions/workflows \
| jq '.workflows[] | select(.name=="AWS / Build, Test, Push").id')
latest_run_id=$(curl -s \
"https://api.github.com/repos/localstack/localstack/actions/workflows/${latest_workflow_id}/runs?branch=master&status=success&per_page=30" \
Copy link
Member

Choose a reason for hiding this comment

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

q: What happens if the latest workflow doesn't have a successful attempt?

path: localstack
add-paths: .test_durations
labels: "semver: patch, area: testing, area: ci"
token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

@silv-io silv-io Jun 13, 2025

Choose a reason for hiding this comment

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

suggestion: You could use PRO_ACCESS_TOKEN here so that it's using the PAT of @localstack-bot. This way the PR author should be the bot instead of github-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants