Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-67466] Add timeout to JGit remote operations #795

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

MarkEWaite
Copy link
Contributor

JENKINS-67466 - Add timeout to JGit remote operations

Uses the JGit timeout implementation to prevent JGit operations from hanging indefinitely.

The JGit timeout implementation has a very different behavior than the timeout implementation for command line git. The command line git implementation stops once the timeout has expired. The JGit timeout implementation stops after timeout period has completed with no traffic during the timeout period.

This does not add timeout support to JGit checkout because JGit checkout does not provide a timeout API.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • New feature

Uses the JGit timeout implementation to prevent JGit operations
from hanging indefinitely.

The JGit timeout implementation has a very different behavior than
the timeout implementation for command line git.  The command line git
implementation stops once the timeout has expired.  The JGit timeout
implementation stops after timeout period has completed with no traffic
during the timeout period.

See JENKINS-22400 for examples of other operations which still need
timeout support.

This does not add timeout support to JGit checkout because JGit checkout
does not provide a timeout API.
@github-actions github-actions bot added the test Automated test addition or improvement label Dec 31, 2021
@MarkEWaite MarkEWaite added enhancement Improvement or new feature and removed test Automated test addition or improvement labels Dec 31, 2021
@MarkEWaite MarkEWaite merged commit 0409ea9 into jenkinsci:master Dec 31, 2021
@MarkEWaite MarkEWaite deleted the enable-JGit-timeout branch December 31, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
1 participant