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

gitserver: Fixup error codes for ReadDir#62620

Merged
eseliger merged 1 commit into
mainfrom
es/05-13-gitserverfixuperrorcodesforreaddir
May 13, 2024
Merged

gitserver: Fixup error codes for ReadDir#62620
eseliger merged 1 commit into
mainfrom
es/05-13-gitserverfixuperrorcodesforreaddir

Conversation

@eseliger

Copy link
Copy Markdown
Member

I messed up the error checking here, and the test for it as well, now gitserver properly returns FileNotFoundPayloads and RevisionNotFoundPayloads for this API.

Test plan:

Adjusted test suite and manually verified using the gRPC UI.

I messed up the error checking here, and the test for it as well, now gitserver properly returns FileNotFoundPayloads and RevisionNotFoundPayloads for this API.

Test plan:

Adjusted test suite and manually verified using the gRPC UI.
@cla-bot cla-bot Bot added the cla-signed label May 13, 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

@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 May 13, 2024
@eseliger eseliger marked this pull request as ready for review May 13, 2024 03:32
@eseliger eseliger requested a review from a team May 13, 2024 03:32
Comment on lines 519 to +524
if cfe.ExitStatus == 128 && bytes.Contains(cfe.Stderr, []byte("fatal: not a tree object")) {
return &gitdomain.RevisionNotFoundError{Repo: it.repoName, Spec: string(it.commit)}
}
if cfe.ExitStatus == 128 && bytes.Contains(cfe.Stderr, []byte("fatal: Not a valid object name")) {
return &gitdomain.RevisionNotFoundError{Repo: it.repoName, Spec: string(it.commit)}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are these errors correct? I find it weird that the one starts with not and one starts with Not 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unfortunately yes😔

@eseliger eseliger merged commit 2b598ac into main May 13, 2024
@eseliger eseliger deleted the es/05-13-gitserverfixuperrorcodesforreaddir branch May 13, 2024 13:40

Copy link
Copy Markdown
Member Author

Merge activity

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.

2 participants