Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

gitserver: Remove IsCloneable check from clone path#63028

Merged
eseliger merged 1 commit into
mainfrom
es/06-03-gitserverremoveiscloneablecheckfromclonepath
Jun 3, 2024
Merged

gitserver: Remove IsCloneable check from clone path#63028
eseliger merged 1 commit into
mainfrom
es/06-03-gitserverremoveiscloneablecheckfromclonepath

Conversation

@eseliger

@eseliger eseliger commented Jun 3, 2024

Copy link
Copy Markdown
Member

We made this preflight check always, and the doc string said that it's for "better error messages".

I checked on that, and the additional RPS claim and the additional latency of the iscloneable check plus load on the code host don't seem justified.

Error message before this change:

Error updating repo:
failed to clone dev.azure.com/sourcegraph-source/src-cli/src-cli: error cloning repo: repo dev.azure.com/sourcegraph-source/src-cli/src-cli not cloneable: failed to check remote access: fatal: Authentication failed for 'https://dev.azure.com/sourcegraph-source/src-cli/_git/src-cli/': exit status 128

Error message after this change:

Error updating repo:
failed to clone dev.azure.com/sourcegraph-source/src-cli/src-cli: clone failed. Output: Creating bare repo Created bare repo at /Users/erik/.sourcegraph/repos_1/.tmp/clone-2786287217/.git Fetching remote contents fatal: Authentication failed for 'https://dev.azure.com/sourcegraph-source/src-cli/_git/src-cli/': failed to fetch: exit status 128: command failed: exit status 128

Not much worse or less readable.

Closes https://github.com/sourcegraph/sourcegraph/issues/62786

Test plan:

Adjusted tests, made sure repos still clone alright and throw a somewhat useful error message on failure.

We made this preflight check always, and the doc string said that it's for "better error messages".

I checked on that, and the additional RPS claim and the additional latency of the iscloneable check plus load on the code host don't seem justified.

Error message before this change:

```
Error updating repo:
failed to clone dev.azure.com/sourcegraph-source/src-cli/src-cli: error cloning repo: repo dev.azure.com/sourcegraph-source/src-cli/src-cli not cloneable: failed to check remote access: fatal: Authentication failed for 'https://dev.azure.com/sourcegraph-source/src-cli/_git/src-cli/': exit status 128
```

Error message after this change:

```
Error updating repo:
failed to clone dev.azure.com/sourcegraph-source/src-cli/src-cli: clone failed. Output: Creating bare repo Created bare repo at /Users/erik/.sourcegraph/repos_1/.tmp/clone-2786287217/.git Fetching remote contents fatal: Authentication failed for 'https://dev.azure.com/sourcegraph-source/src-cli/_git/src-cli/': failed to fetch: exit status 128: command failed: exit status 128
```

Not much worse or less readable.

Closes https://github.com/sourcegraph/sourcegraph/issues/62786

Test plan:

Adjusted tests, made sure repos still clone alright and throw a somewhat useful error message on failure.
@cla-bot cla-bot Bot added the cla-signed label Jun 3, 2024
@github-actions github-actions Bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels Jun 3, 2024

eseliger commented Jun 3, 2024

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @eseliger and the rest of your teammates on Graphite Graphite

@eseliger eseliger marked this pull request as ready for review June 3, 2024 06:38
@eseliger eseliger requested a review from a team June 3, 2024 06:38
@eseliger eseliger merged commit a18904b into main Jun 3, 2024
@eseliger eseliger deleted the es/06-03-gitserverremoveiscloneablecheckfromclonepath branch June 3, 2024 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate ways to get around IsCloneable check for all repos

2 participants