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

add concurrency check to gradle-check workflow #16007

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

rishabh6788
Copy link
Contributor

Description

Coming from opensearch-project/opensearch-build#5008 the gradle-check workflow runs for every new commit that is pushed onto the pull-request. This results in multiple instances of gradle-check workfow and as well as jenkins job to run. The user is only interested in the result of the latest commit run and doesn't care about the previous commit run results.
This results in unnecessary noise on the pull request and as well as wastage of resources. Since there can be only 30 concurrent gradle-check jobs at any given point of time, these stale runs also exhaust the job queue which can otherwise be used for legitimate runs.

This PR adds concurrency feature provided with github-actions to limit the workflow to run only 1 instance and cancel all other instances of the workflow for the same PR. See https://docs.github.com/en/enterprise-cloud%40latest/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs.

This will only cancel the github worflow and doesn't handle cancelling the jenkins job.
The logic to cancel the jenkins job is currently handled in opensearch-project/opensearch-build#5043.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
opensearch-project/opensearch-build#5008

Check List

  • [ ] Functionality includes testing.
  • [ ] API changes companion pull request created, if applicable.
  • [ ] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta reta merged commit 9537d39 into opensearch-project:main Sep 20, 2024
46 of 49 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 20, 2024
Signed-off-by: Rishabh Singh <[email protected]>
(cherry picked from commit 9537d39)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Sep 20, 2024
(cherry picked from commit 9537d39)

Signed-off-by: Rishabh Singh <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants