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

GitHub organization job losing build history

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have a large GitHub organization folder job (over 100 repos) that is scanned every 15 mins for changes. Occasionally (usually overnight I think) branches are losing the build history and are reset to build number 1.

      I suspect the branch indexing is somehow losing communication with GitHub and the branch is deleted and then recreated on the next successful scan. Note this doesn't appear to happen in business hours, so possibly is a result of overnight resource conservation (Jenkins is not currently shutdown overnight).

      As a workaround I have configured to not delete branches unless unchanged for 7 days, however some branches are not updated this frequently, and I don't want to extend this period as we'll have too many jobs hanging around.

      Note also that we don't currently use webhooks to detect changes, which is why it is a periodic scan every 15 mins.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/test/java/integration/EventsTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/02054676abef582d137c4a2d6288d0a37586f6de
            Log:
            JENKINS-42000 Note that tests were added to track this issue

            • Tests should have been part of original contract though
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/02054676abef582d137c4a2d6288d0a37586f6de Log: JENKINS-42000 Note that tests were added to track this issue Tests should have been part of original contract though
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/jenkins/branch/OrganizationFolder.java
            src/test/java/integration/EventsTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/76313ec24e6afc2fa7a7fb408a7d5753f8be5c99
            Log:
            Merge pull request #85 from stephenc/jenkins-42000

            JENKINS-42000 Communication errors in organization scanning should not delete all everything

            Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0178b37da659...76313ec24e6a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/OrganizationFolder.java src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/76313ec24e6afc2fa7a7fb408a7d5753f8be5c99 Log: Merge pull request #85 from stephenc/jenkins-42000 JENKINS-42000 Communication errors in organization scanning should not delete all everything Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0178b37da659...76313ec24e6a
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Branch API 2.0.6 has the fix. (Well I claim it does)

            Show
            stephenconnolly Stephen Connolly added a comment - Branch API 2.0.6 has the fix. (Well I claim it does)
            Hide
            fortuna Ben Fortuna added a comment - - edited

            Awesome, thanks so much for the quick response. I'll confirm the fix once 2.0.6 is released.

            Stephen Connolly a slight issue with installing 2.0.6 - it appears to have a dependency on scm-api 2.0.4, but the latest release is 2.0.3.

            Show
            fortuna Ben Fortuna added a comment - - edited Awesome, thanks so much for the quick response. I'll confirm the fix once 2.0.6 is released. Stephen Connolly a slight issue with installing 2.0.6 - it appears to have a dependency on scm-api 2.0.4, but the latest release is 2.0.3.
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Ben Fortuna yes and scm-api 2.0.4 was released before branch-api 2.0.6... just that the OSS update center can have issues presenting a consistent set of releases when the releases were made in less than 4-8h of the update center being regenerated (and also the update center does not present a self-consistent set of plugins, e.g. JENKINS-23757 is one aspect. Another aspect is that if the update center does not have e.g. scm-api 2.0.4 then it should hold back branch-api 2.0.6 until it does have it - a feature of the CloudBees update center back-end code)

            In any case the releases should all be available now

            Show
            stephenconnolly Stephen Connolly added a comment - Ben Fortuna yes and scm-api 2.0.4 was released before branch-api 2.0.6... just that the OSS update center can have issues presenting a consistent set of releases when the releases were made in less than 4-8h of the update center being regenerated (and also the update center does not present a self-consistent set of plugins, e.g. JENKINS-23757 is one aspect. Another aspect is that if the update center does not have e.g. scm-api 2.0.4 then it should hold back branch-api 2.0.6 until it does have it - a feature of the CloudBees update center back-end code) In any case the releases should all be available now

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: