Skip to content

Conversation

sinedd777
Copy link

…onFolder

Fixes the issue where one unauthenticated OrganizationFolder hitting GitHub API rate limits would block
webhook processing for all other OrganizationFolders.

Changes

  • Created OrganizationFolderAsyncHelper to handle conditional async processing
  • Modified onSCMHeadEvent, onSCMNavigatorEvent, and onSCMSourceEvent to use async processing when
    multiple folders exist
  • Uses CompletableFuture with timeout to prevent indefinite blocking
  • Maintains synchronous behavior for single folder scenarios (for compatibility)

The fix ensures that authenticated folders can continue processing webhooks even when unauthenticated
folders are rate-limited by GitHub's 60 requests/hour limit for anonymous access.

Testing done

  • Set up multiple OrganizationFolder instances with mixed authentication (some with GitHub credentials,
    some without)
  • Triggered webhook events to exhaust the 60 requests/hour rate limit on unauthenticated folders
  • Verified that authenticated folders continue processing webhooks without being blocked
  • Confirmed async processing activates only when multiple folders exist
  • Tested timeout behavior to ensure no indefinite blocking occurs
  • Verified backward compatibility by testing with a single OrganizationFolder (remains synchronous)

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main
    branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira -
    JENKINS-75144
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

…onFolder

Fixes the issue where one unauthenticated OrganizationFolder hitting GitHub API
rate limits would block webhook processing for all other OrganizationFolders.

Changes:
- Created OrganizationFolderAsyncHelper to handle conditional async processing
- Modified onSCMHeadEvent, onSCMNavigatorEvent, and onSCMSourceEvent to use async
  processing when multiple folders exist
- Uses CompletableFuture with timeout to prevent indefinite blocking
- Maintains synchronous behavior for single folder scenarios (for compatibility)

The fix ensures that authenticated folders can continue processing webhooks even
when unauthenticated folders are rate-limited by GitHub's 60 requests/hour limit
for anonymous access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant