Skip to content

Conversation

@prudhvigodithi
Copy link
Member

@prudhvigodithi prudhvigodithi commented May 13, 2025

Description

Today for a post merge action the running gradle check CI runs are terminated with the concurrency setting.

Here is an example https://github.com/opensearch-project/OpenSearch/actions/runs/14934871450/job/41959850100 where the operation was cancelled by the Github. This can happen when a new PR is merged while for the previous PR post merge run is still running. I assume this is because ${{ github.event.pull_request.number }} shows null for a post merge actions.
But notice this dint actually stop the triggered Jenkins job https://build.ci.opensearch.org/job/gradle-check/57901/. This concurrency setting only terminates at the Github level.

Today for Jenkins this is already handled (https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/gradle/gradle-check.jenkinsfile#L125) to abort the Jenkins jobs for the same PR. So for an open PR upon a new commit when triggered a Jenkins job it will abort the existing running build.

Having this It should be safe to remove the concurrency setting as we dont have to handle the termination at the Github level which is causing the termination of post merge actions. #18283 (comment)

Related Issues

Found when working as part of #17974

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.

@prudhvigodithi prudhvigodithi requested review from a team, jed326 and peternied as code owners May 13, 2025 21:33
@prudhvigodithi
Copy link
Member Author

Adding @andrross @gaiksaya @getsaurabh02

@andrross
Copy link
Member

Does this mean PRs will now get a comment about the cancelled Jenkins job when a new PR revision is pushed?

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Member Author

I did some testing and updated to ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}

This still honors cancelling the runs for same PR's

Screenshot 2025-05-13 at 5 08 44 PM

But excludes the post merge events which we can see the runs does not terminate
Screenshot 2025-05-13 at 5 05 27 PM

@prudhvigodithi prudhvigodithi added backport 2.x Backport to 2.x branch backport 3.0 labels May 14, 2025
@prudhvigodithi prudhvigodithi changed the title Remove concurrency setting for gradle check Update concurrency setting for gradle check to exclude cancellation of the post_merge runs May 14, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Performance Roadmap May 14, 2025
@andrross andrross merged commit dd61c5d into opensearch-project:main May 14, 2025
42 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap May 14, 2025
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board May 14, 2025
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 14, 2025
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit dd61c5d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 14, 2025
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit dd61c5d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 14, 2025
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit dd61c5d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
andrross pushed a commit that referenced this pull request May 14, 2025
…18295)

(cherry picked from commit dd61c5d)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
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>
andrross pushed a commit that referenced this pull request May 14, 2025
…18296)

(cherry picked from commit dd61c5d)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
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>
@prudhvigodithi prudhvigodithi self-assigned this May 15, 2025
tanik98 pushed a commit to tanik98/OpenSearch that referenced this pull request May 27, 2025
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Jun 1, 2025
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
…-project#18283)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants