jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-65071] Closing a github PR should not trigger tags examination

Open
#1,348 2 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

I started to notice that our github app key quota gets exhausted. When this happens usually is because Jenkins is doing a full examination of the repository, and since I have a lot of tags (2k+), this process takes a while (10mins) and depletes the quota.

From checking the Multibranch Pipeline Events logs I can see that tags are being processed, but usually it is hard to understand what triggered this. However today I managed to reproduce this by closing a PR (not merging). Here are the logs

 

 

```
[Wed Mar 10 11:55:06 UTC 2021] Received Pull request #16349 closed in repository xxx/platform REMOVED event from 140.82.115.242 ⇒ https://jenkins.xxxx.com/github-webhook/ with timestamp Wed Mar 10 11:55:01 UTC 2021
11:55:06 GitHub throttling is disabled, which is not allowed for public GitHub usage, so ThrottleOnOver will be used instead. To configure a different rate limiting strategy, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
11:55:06 Connecting to https://api.github.com using 88560/****** (GitHub app key)
[Wed Mar 10 11:55:06 UTC 2021] Received Pull request #16349 closed in repository xxx/platform REMOVED event from 140.82.115.155 ⇒ https://jenkins.xxx.com/github-webhook/ with timestamp Wed Mar 10 11:55:01 UTC 2021
11:55:06 GitHub throttling is disabled, which is not allowed for public GitHub usage, so ThrottleOnOver will be used instead. To configure a different rate limiting strategy, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
11:55:06 Connecting to https://api.github.com using 88560/****** (GitHub app key)
Examining xxx/platform

Checking branches...

Getting remote branch feature/joao_xxx...

Checking branch feature/joao_xxx

1 branches were processed

Checking pull-requests...

Getting remote pull request #16349...

Examining xxx/platform

Checking branches...

Getting remote branch feature/joao_xxx...

Checking branch feature/joao_xxx

1 branches were processed

Checking pull-requests...

Getting remote pull request #16349...

0 pull requests were processed

Checking tags...

Getting remote tags...

Checking tag v0.1.0.0

Checking tag v0.1.1.0

0 pull requests were processed

Checking tags...

Getting remote tags...

Checking tag v0.1.1.1

Checking tag v0.1.2.0

Checking tag v0.1.0.0

Checking tag v0.1.1.0

Checking tag v0.1.3.0
```

 

Something which is also weird is that 2 webhooks were received triggering the examination twice, but maybe that is another problem. Is this something by design? I mean does jenkins really need to check the tags? If yes, maybe this could be configurable?

 

UPDATE: reopening the PR also triggers the tags examination

---
Originally reported by jtjeferreira, imported from: Closing a github PR should not trigger tags examination


  • status: In Progress
  • priority: Minor
  • component(s): github-branch-source-plugin
  • label(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I started to notice that our github app key quota gets exhausted. When this happens usually is because Jenkins is doing a full examination of the repository, and since I have a lot of tags (2k+), this process takes a while (10mins) and depletes the quota.

From checking the Multibranch Pipeline Events logs I can see that tags are being processed, but usually it is hard to understand what triggered this. However today I managed to reproduce this by closing a PR (not merging). Here are the logs

 

 



[Wed Mar 10 11:55:06 UTC 2021] Received Pull request #16349 closed in repository xxx/platform REMOVED event from 140.82.115.242 ⇒ https://jenkins.xxxx.com/github-webhook/ with timestamp Wed Mar 10 11:55:01 UTC 2021

11:55:06 GitHub throttling is disabled, which is not allowed for public GitHub usage, so ThrottleOnOver will be used instead. To configure a different rate limiting strategy, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
11:55:06 Connecting to https://api.github.com using 88560/****** (GitHub app key)
[Wed Mar 10 11:55:06 UTC 2021] Received Pull request #16349 closed in repository xxx/platform REMOVED event from 140.82.115.155 ⇒ https://jenkins.xxx.com/github-webhook/ with timestamp Wed Mar 10 11:55:01 UTC 2021
11:55:06 GitHub throttling is disabled, which is not allowed for public GitHub usage, so ThrottleOnOver will be used instead. To configure a different rate limiting strategy, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
11:55:06 Connecting to https://api.github.com using 88560/****** (GitHub app key)
Examining xxx/platform

Checking branches...

Getting remote branch feature/joao_xxx...

Checking branch feature/joao_xxx

1 branches were processed

Checking pull-requests...

Getting remote pull request #16349...

Examining xxx/platform

Checking branches...

Getting remote branch feature/joao_xxx...

Checking branch feature/joao_xxx

1 branches were processed

Checking pull-requests...

Getting remote pull request #16349...

0 pull requests were processed

Checking tags...

Getting remote tags...

Checking tag v0.1.0.0

Checking tag v0.1.1.0

0 pull requests were processed

Checking tags...

Getting remote tags...

Checking tag v0.1.1.1

Checking tag v0.1.2.0

Checking tag v0.1.0.0

Checking tag v0.1.1.0

Checking tag v0.1.3.0



 

Something which is also weird is that 2 webhooks were received triggering the examination twice, but maybe that is another problem. Is this something by design? I mean does jenkins really need to check the tags? If yes, maybe this could be configurable?

 

UPDATE: reopening the PR also triggers the tags examination

environment

```
Jenkins 2.263.4

github-branch-source-plugin 2.9.5
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.