[CI Energy Waste] Add concurrency control testsuite pr #2424
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.
Overview
Adds concurrency control to
TestSuite-PR.ymlworkflow using${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}withcancel-in-progress: trueto prevent overlapping test runs and optimize resource usage.This workflow need an average of ~52min to complete. Analysis of 200 recent workflow runs from 692 total executions reveals significant inefficiencies: 60 overlapping run pairs were identified, with 35 same-branch overlaps being most problematic. The
sqs-dt-truncatebranch had 19 overlapping runs,mainhad 7, andspring-kafkahad 5. This resulted in approximately 1,649 minutes (27.5 hours) of overlapping execution time where resources were duplicated, representing 30% of all runs experiencing overlaps. Real-world examples include main branch runs starting just 2 minutes apart but running simultaneously for 42 minutes each.Related Github Issue
Addresses workflow resource inefficiencies identified through GitHub API analysis of recent workflow executions.
Testing
Test by pushing multiple commits rapidly to a PR and verifying new runs cancel previous ones, while different PRs can still run in parallel. Configuration-only change with no impact on existing test logic.
Checks
Additional context
We are a team of researchers from University of Zurich (https://www.ifi.uzh.ch/en/zest.html) currently working on automating energy optimizations in GitHub Actions workflows. This optimization maintains full functionality while reducing computational overhead and energy consumption.
souhaila.serbout@uzh.ch