• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins ver. 2.144
      GitHub Authentication plugin 0.29
      GitHub Branch Source Plugin 2.4.1
      GitHub API Plugin 1.92
      GitHub plugin 1.29.3

      Hi!

      I noticed that a job which based on some GitHub tag become broken after re-tag (deleting of the tag on GitHub, creation of a GitHub tag with the same name).
      After this related builds falls with messages like this:

      Started by user Some User
      06:27:03 Connecting to https://api.github.com using some-user/****** (Jenkins Global credentials)
      java.io.FileNotFoundException: https://api.github.com/repos/Organization/repository/git/refs/tags/some-tag
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
      	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
      	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
      	at org.kohsuke.github.Requester.parse(Requester.java:617)
      	at org.kohsuke.github.Requester.parse(Requester.java:599)
      	at org.kohsuke.github.Requester._to(Requester.java:277)
      Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/git/refs/#get-a-reference"}
      	at org.kohsuke.github.Requester.handleApiError(Requester.java:691)
      	at org.kohsuke.github.Requester._to(Requester.java:298)
      	at org.kohsuke.github.Requester.to(Requester.java:239)
      	at org.kohsuke.github.GHRepository.getRef(GHRepository.java:870)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1457)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:583)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

      At the same time I'm able to retrieve tag's SHA from mentioned GitHub API URI using the same credentials. So it looks like github_branch_source_plugin specific issue.

      "Scan Repository Now" doesn't help here. The job for recreated tag still will be failed even if previously I confirmed that the tag had been deleted in Jenkins UI after deleting in GitHub and then successfully created in Jenkins after creation in GitHub.

      Any jobs that related to tags which were created only one time works fine.

      Steps to reproduce:

      • "New Item" -> "GitHub Organization";
      • For a repo in GitHub organization create a tag which will bring a job in Jenkins;
      • Delete the tag in GitHub;
      • Create a tag with the same name as deleted;
      • Trigger related Jenkins job.

          [JENKINS-54403] Job fail when GitHub tag was recreated

          Nikita Shchipachev created issue -
          Yo-An Lin made changes -
          Link New: This issue is related to JENKINS-55330 [ JENKINS-55330 ]
          Ɓukasz Dudek made changes -
          Link New: This issue is related to JENKINS-55979 [ JENKINS-55979 ]
          Allan BURDAJEWICZ made changes -
          Remote Link New: This issue links to "github-branch-source-plugin #229 (Web Link)" [ 23326 ]
          Liam Newman made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Liam Newman made changes -
          Link New: This issue duplicates JENKINS-54126 [ JENKINS-54126 ]

            Unassigned Unassigned
            nshchipachevaf Nikita Shchipachev
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: