Skip to content

CI Skip passing jobs#4910

Merged
kahmed10 merged 5 commits into
developfrom
stashingsuccess
May 27, 2026
Merged

CI Skip passing jobs#4910
kahmed10 merged 5 commits into
developfrom
stashingsuccess

Conversation

@causten
Copy link
Copy Markdown
Collaborator

@causten causten commented May 25, 2026

Motivation

Each task in the job can take over 30 minutes to run. If a task fails for a random reason such as network timeout the entire the Jenkins job is restarted. This adds to the burden on the CI servers. The goal here is to skip a task if the Jenkins job was simply restarted using the same PR commit hash.

Technical Details

Check the GitHub PR status, skip if the commit status "Jenkins - xxx" is successful

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Comment thread Jenkinsfile Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Jenkins CI pipeline to avoid rerunning long stages when a Jenkins job is restarted on the same PR commit SHA, by checking existing GitHub commit statuses and conditionally skipping stages that have already succeeded.

Changes:

  • Added isStageCompleted(stageName) helper that queries GitHub commit statuses and skips stages that previously succeeded for the same SHA (unless FORCE_REBUILD is set).
  • Added FORCE_REBUILD pipeline parameter to override the skip behavior.
  • Wrapped multiple long-running rocmtest stages with if (!isStageCompleted(...)) guards.

Comment thread Jenkinsfile
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4910   +/-   ##
========================================
  Coverage    92.66%   92.66%           
========================================
  Files          588      588           
  Lines        30412    30412           
========================================
  Hits         28180    28180           
  Misses        2232     2232           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@causten causten requested a review from pfultz2 May 25, 2026 19:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread Jenkinsfile
Comment on lines +186 to +198
def response = sh(
script: """
curl -s -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer \$TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/ROCmSoftwarePlatform/AMDMIGraphX/commits/${commitSha}/status"
""",
returnStdout: true
).trim()
def json = new groovy.json.JsonSlurper().parseText(response)
result = json.statuses?.any { it.context == context && it.state == "success" } ?: false
}
@kahmed10 kahmed10 merged commit 283f84e into develop May 27, 2026
13 of 14 checks passed
@kahmed10 kahmed10 deleted the stashingsuccess branch May 27, 2026 04:53
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.

5 participants