• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • gitea-plugin
    • None
    • Gitea 1.17.2
      Jenkins 2.361.1
      Gitea Plugin 1.4.3

      Jenkins scans regularly the multibranch pipelines.

      This scan fails if within a repository exists a pull request from a personal fork:

        Checking pull request #5042
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-5042 (still at f28e872c1c0e9c2afc1dfd902ccd4beb046b3b84+683a03dc45583ec40ab8d08d58d0cd5c29addddd)
      
        Checking pull request #5041
      ERROR: [Tue Sep 27 23:03:29 CEST 2022] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://gitea.boom.org::bangorg::bimrepo
      [Tue Sep 27 23:03:29 CEST 2022] Finished branch indexing. Indexing took 29 sec
      FATAL: Failed to recompute children of MultiBranchPipelineName » bimrepo
      org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 404/Not Found
      	at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:867)
      	at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchRepository(DefaultGiteaConnection.java:200)
      	at org.jenkinsci.plugin.gitea.GiteaSCMFileSystem$BuilderImpl.build(GiteaSCMFileSystem.java:170)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.createProbe(GiteaSCMSource.java:620)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:249)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:386)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
      	at hudson.model.ResourceController.execute(ResourceController.java:107)
      	at hudson.model.Executor.run(Executor.java:449)
      Finished: FAILURE
      

          [JENKINS-69719] Jenkins scan of Gitea fails on PRs from forks

          m l created issue -
          m l made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          m l made changes -
          Environment Original: Gitea 1.16.1
          Jenkins 2.319.3
          Plugin-Version 1.4.1
          New: Gitea 1.17.2
          Jenkins 2.361.1
          Gitea Plugin 1.4.3
          m l made changes -
          Description Original: I created an organisational folder for a private Gitea instance. Both the organization and the project are private.

          The user and the personal-access-token are created as described on the plugin help page.

          While build *branches* work fine, building *pull-requests* fails with an error *if I start the build manually.* Builds triggered by Webhooks run fine.
          {noformat}
          Started by user Gregor Tudan
          Running as Gregor Tudan
          Looking up repository VV/antora-theme
          Querying the current revision of pull request #17...
          Current revision of pull request #17 is b8cf059e793da04596f6b9e63a88410866eb23ad
          org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 403/Forbidden
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:865)
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchRepository(DefaultGiteaConnection.java:200)
          at org.jenkinsci.plugin.gitea.GiteaSCMFileSystem$BuilderImpl.build(GiteaSCMFileSystem.java:170)
          at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:293)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:106)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:310)
          at hudson.model.ResourceController.execute(ResourceController.java:99)
          at hudson.model.Executor.run(Executor.java:432)
          [Gitea] Notifying pull request build status: FAILURE There was a failure building this commit
          [Gitea] Notified
          Finished: FAILURE{noformat}
          Here is what's in the jenkins logs:
          {noformat}
          022-02-15 10:25:53.110+0000 [id=6686] INFO o.j.p.g.GiteaNotifier$JobScheduledListener$1#run: Looking up repository VV/antora-theme
          2022-02-15 10:25:53.157+0000 [id=6686] INFO o.j.p.g.GiteaNotifier$JobScheduledListener$1#run: Querying the current revision of pull request #17...
          2022-02-15 10:25:53.231+0000 [id=6686] INFO o.j.p.g.GiteaNotifier$JobScheduledListener$1#run: Current revision of pull request #17 is b8cf059e793da04596f6b9e63a88410866eb23ad
          2022-02-15 10:25:53.231+0000 [id=6686] INFO o.j.p.g.GiteaNotifier$JobScheduledListener$1#run: Notifying pull request pending build VV/antora-theme/PR-17
          2022-02-15 10:25:53.295+0000 [id=6686] INFO o.j.p.g.GiteaNotifier$JobScheduledListener$1#run: VV/antora-theme/PR-17 Notified
          2022-02-15 10:25:53.320+0000 [id=7658] INFO o.j.p.workflow.job.WorkflowRun#finish: VV/antora-theme/PR-17 #1 completed: FAILURE{noformat}
          This is the failed call in the access log:
          {noformat}
          /api/v1/repos/VV/antora-theme{noformat}
          New: Jenkins scans regularly the multibranch pipelines.

          This scan fails, if within a repository exist a pull request from a personal fork:

          {noformat}
            Checking pull request #5042
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: PR-5042 (still at f28e872c1c0e9c2afc1dfd902ccd4beb046b3b84+683a03dc45583ec40ab8d08d58d0cd5c29addddd)

            Checking pull request #5041
          ERROR: [Tue Sep 27 23:03:29 CEST 2022] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://gitea.boom.org::bangorg::bimrepo
          [Tue Sep 27 23:03:29 CEST 2022] Finished branch indexing. Indexing took 29 sec
          FATAL: Failed to recompute children of MultiBranchPipelineName » bimrepo
          org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 404/Not Found
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:867)
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchRepository(DefaultGiteaConnection.java:200)
          at org.jenkinsci.plugin.gitea.GiteaSCMFileSystem$BuilderImpl.build(GiteaSCMFileSystem.java:170)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.createProbe(GiteaSCMSource.java:620)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:249)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:386)
          at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
          at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
          at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
          at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
          at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
          at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
          at hudson.model.ResourceController.execute(ResourceController.java:107)
          at hudson.model.Executor.run(Executor.java:449)
          Finished: FAILURE
          {noformat}
          m l made changes -
          Description Original: Jenkins scans regularly the multibranch pipelines.

          This scan fails, if within a repository exist a pull request from a personal fork:

          {noformat}
            Checking pull request #5042
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: PR-5042 (still at f28e872c1c0e9c2afc1dfd902ccd4beb046b3b84+683a03dc45583ec40ab8d08d58d0cd5c29addddd)

            Checking pull request #5041
          ERROR: [Tue Sep 27 23:03:29 CEST 2022] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://gitea.boom.org::bangorg::bimrepo
          [Tue Sep 27 23:03:29 CEST 2022] Finished branch indexing. Indexing took 29 sec
          FATAL: Failed to recompute children of MultiBranchPipelineName » bimrepo
          org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 404/Not Found
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:867)
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchRepository(DefaultGiteaConnection.java:200)
          at org.jenkinsci.plugin.gitea.GiteaSCMFileSystem$BuilderImpl.build(GiteaSCMFileSystem.java:170)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.createProbe(GiteaSCMSource.java:620)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:249)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:386)
          at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
          at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
          at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
          at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
          at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
          at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
          at hudson.model.ResourceController.execute(ResourceController.java:107)
          at hudson.model.Executor.run(Executor.java:449)
          Finished: FAILURE
          {noformat}
          New: Jenkins scans regularly the multibranch pipelines.

          This scan fails if within a repository exists a pull request from a personal fork:

          {noformat}
            Checking pull request #5042
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: PR-5042 (still at f28e872c1c0e9c2afc1dfd902ccd4beb046b3b84+683a03dc45583ec40ab8d08d58d0cd5c29addddd)

            Checking pull request #5041
          ERROR: [Tue Sep 27 23:03:29 CEST 2022] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://gitea.boom.org::bangorg::bimrepo
          [Tue Sep 27 23:03:29 CEST 2022] Finished branch indexing. Indexing took 29 sec
          FATAL: Failed to recompute children of MultiBranchPipelineName » bimrepo
          org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 404/Not Found
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:867)
          at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchRepository(DefaultGiteaConnection.java:200)
          at org.jenkinsci.plugin.gitea.GiteaSCMFileSystem$BuilderImpl.build(GiteaSCMFileSystem.java:170)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.createProbe(GiteaSCMSource.java:620)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
          at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:249)
          at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:386)
          at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
          at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
          at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
          at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
          at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
          at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
          at hudson.model.ResourceController.execute(ResourceController.java:107)
          at hudson.model.Executor.run(Executor.java:449)
          Finished: FAILURE
          {noformat}
          Steven made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]

            Unassigned Unassigned
            mrlov m l
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: