The Wayback Machine - https://web.archive.org/web/20250511122509/https://github.com/pnpm/pnpm/pull/2731
Skip to content

fix(git-resolver): avoid retries on bitbucket/gitlab private repos #2731

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

Merged
merged 3 commits into from
Dec 6, 2021
Merged

fix(git-resolver): avoid retries on bitbucket/gitlab private repos #2731

merged 3 commits into from
Dec 6, 2021

Conversation

3cp
Copy link
Contributor

@3cp 3cp commented Jul 30, 2020

Recent retry feature exposed this bug. The hosted.git() only works with GitHub repos, bitbucket/gitlab has no gitTemplate defined in hosted-git-info.


Before this fix, a pnpm i gave me:

⋊> ~/b/bcx-broker-au-frontend on new-ui ↑ pnpm i
 WARN  HEAD https://bitbucket.org/buttonwoodcx/bcx-ui error (undefined). Will retry in 10 milliseconds. 5 retries left.
 WARN  HEAD https://bitbucket.org/buttonwoodcx/bcx-ui error (undefined). Will retry in 60 milliseconds. 4 retries left.
 WARN  HEAD https://bitbucket.org/buttonwoodcx/bcx-ui error (undefined). Will retry in 360 milliseconds. 3 retries left.
 WARN  HEAD https://bitbucket.org/buttonwoodcx/bcx-ui error (undefined). Will retry in 2.1 seconds. 2 retries left.
 WARN  HEAD https://bitbucket.org/buttonwoodcx/bcx-ui error (undefined). Will retry in 12.9 seconds. 1 retries left.
Packages: +2 -1
++-
Resolving: total 381, reused 381, downloaded 0, done
 WARN  Cannot link binary 'gulp' of 'gulp-cli' to '/Users/huocp/bw/bcx-broker-au-frontend/node_modules/.bin': binary of 'gulp' is already linked

dependencies:
- bcx-ui 2.31.4
+ bcx-ui 4.13.6

I am not sure how exactly this bug manifested to those retry logs, but this fix did avoid all retry.

@3cp 3cp requested a review from zkochan as a code owner July 30, 2020 03:36
@3cp
Copy link
Contributor Author

3cp commented Jul 30, 2020

Recent retry feature

Maybe it's the new retry log, not new feature.

@zkochan
Copy link
Member

zkochan commented Jul 30, 2020

Retries are happening here:

const response = await fetch(httpsUrl.substr(0, httpsUrl.length - 4), { method: 'HEAD', follow: 0 })

you can pass this function retries: { retry: 0 }}

@3cp
Copy link
Contributor Author

3cp commented Jul 30, 2020

Thx, it's retry: { retries: 0 }.

@zkochan zkochan closed this Jan 15, 2021
@zkochan zkochan deleted the branch pnpm:main January 15, 2021 21:29
@ExE-Boss ExE-Boss reopened this Jan 15, 2021
@ExE-Boss ExE-Boss changed the base branch from master to main January 15, 2021 21:47
@rubencallewaert
Copy link

This is still an issue for me in recent pnpm versions. Are there any plans for this PR to get merged or is there something blocking?

@zkochan zkochan enabled auto-merge (squash) December 6, 2021 20:33
3cp and others added 3 commits December 6, 2021 22:58
Recent retry feature exposed this bug. The hosted.git() only works with GitHub repos, bitbucket/gitlab has no gitTemplate defined in hosted-git-info.
@zkochan zkochan merged commit c941044 into pnpm:main Dec 6, 2021
@3cp 3cp deleted the fix-bitbucket-private branch December 7, 2021 02:40
@zkochan zkochan added this to the v6.24 milestone Dec 10, 2021
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.

4 participants