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

feat: add git timeout #14914

Merged
merged 29 commits into from Apr 17, 2022
Merged

Conversation

hasanwhitesource
Copy link
Contributor

Changes

Added a 10 seconds timeout for git tasks based on https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-TIMEOUT.md

Context

Closes #13957

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/util/git/config.ts Outdated Show resolved Hide resolved
@hasanwhitesource
Copy link
Contributor Author

@viceice if this is good so far I will go on to setting this config value to the places where simple-git is being used

@hasanwhitesource hasanwhitesource marked this pull request as ready for review April 5, 2022 09:36
@hasanwhitesource hasanwhitesource marked this pull request as draft April 6, 2022 12:24
@hasanwhitesource hasanwhitesource marked this pull request as ready for review April 6, 2022 13:58
lib/config/options/index.ts Outdated Show resolved Hide resolved
@rarkins rarkins marked this pull request as draft April 7, 2022 08:34
@hasanwhitesource
Copy link
Contributor Author

@viceice @rarkins Do we want to leave this pull request just for the addition of the feature and create a different pr/issue to make use of this feature in the relevant code sections?( e.g util\git\index.ts , manager\git-submodules\extract.ts , datasource\git-refs\base.ts ,... )

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are other files which should also use this value, it's ideal if we include them in this PR. If not then let's document which are unsupported and have an issue for each

lib/config/validation.ts Outdated Show resolved Hide resolved
@hasanwhitesource hasanwhitesource marked this pull request as ready for review April 10, 2022 12:26
lib/config/options/index.ts Show resolved Hide resolved
lib/config/validation.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
lib/util/git/config.ts Outdated Show resolved Hide resolved
@hasanwhitesource hasanwhitesource marked this pull request as ready for review April 13, 2022 13:09
lib/config/options/index.ts Show resolved Hide resolved
lib/config/validation.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
@hasanwhitesource
Copy link
Contributor Author

@viceice wdyt of the changes ?

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small test fixes required 😉

lib/config/options/index.ts Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
lib/util/git/config.spec.ts Outdated Show resolved Hide resolved
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
docs/usage/self-hosted-configuration.md Outdated Show resolved Hide resolved
@rarkins rarkins enabled auto-merge (squash) April 17, 2022 17:11
@rarkins rarkins merged commit 9270eba into renovatebot:main Apr 17, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀


To handle the case where the underlying Git processes appear to hang, configure the timeout with the number of milliseconds to wait after last received content on either `stdOut` or `stdErr` streams before sending a `SIGINT` kill message.

The value must be between `2000` and `6000` (milliseconds) inclusive.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is outside these values. How does that work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a typo in the text it should be 60000

rarkins added a commit that referenced this pull request Apr 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git timeout
6 participants