Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42057

Tidy up the GitHub commit statuses

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently failed builds are assigned the GitHub status of Failure.

      The GitHub statuses seem to be modelled on the JUnit test result states.

      In JUnit a failure corresponds to the assertions being incorrect, whereas an error is an unexpected outcome from the test.

      If we upscale that to the unit of an entire build:

      • The build completes with test failures (i.e. Jenkins UNSTABLE) is analogous to an individual tests assertions being incorrect thus this should map to GitHub's FAILURE status
      • The build does not complete (i.e. Jenkins FAILURE) is analogous to an unexpected outcome thus this should map to GitHub's ERROR status

      Thus the change is to make a Jenkins build FAILURE report as a GitHub ERROR

      Here is the current (and proposed) github status for a build that has test failures (i.e. Jenkins UNSTABLE)

      Here is the current github status for a build that cannot be built (e.g. a compiler error or such)

      Here is the proposed github status for a build that cannot be built:

      And on the overall PRs tab you will see tooltips like:

      and

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -
            Show
            stephenconnolly Stephen Connolly added a comment - Additionally, the default status assignment of the GitHub plugin matches this proposal: https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github/status/sources/DefaultStatusResultSource.java
            Hide
            stephenconnolly Stephen Connolly added a comment -

            There was initially a TODO comment to decide on ERROR or FAILURE: https://github.com/jenkinsci/github-branch-source-plugin/commit/25cab343d6dc5dc8a5ee083886bf4c6ac5b29210

            Unclear how the removal of that comment was related to the deciding to map FAILURE to FAILURE

            Show
            stephenconnolly Stephen Connolly added a comment - There was initially a TODO comment to decide on ERROR or FAILURE: https://github.com/jenkinsci/github-branch-source-plugin/commit/25cab343d6dc5dc8a5ee083886bf4c6ac5b29210 Unclear how the removal of that comment was related to the deciding to map FAILURE to FAILURE
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubBuildStatusNotification.java
            src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
            http://jenkins-ci.org/commit/github-branch-source-plugin/6a5919bdd6093b9ae815b50c9c37df687635088f
            Log:
            [FIXED JENKINS-42057] Report build errors as GitHub status Error

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubBuildStatusNotification.java src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties http://jenkins-ci.org/commit/github-branch-source-plugin/6a5919bdd6093b9ae815b50c9c37df687635088f Log: [FIXED JENKINS-42057] Report build errors as GitHub status Error
            Hide
            recampbell Ryan Campbell added a comment -

            This is demo-worthy Patrick Wolf

            Show
            recampbell Ryan Campbell added a comment - This is demo-worthy Patrick Wolf

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: