Skip to content

repository does not exist #1150

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

Open
kmalakoff opened this issue Feb 27, 2025 · 2 comments
Open

repository does not exist #1150

kmalakoff opened this issue Feb 27, 2025 · 2 comments

Comments

@kmalakoff
Copy link

When I perform a search like

src search --json "repo:has.file(package.json) file:package.json "some-package" count:1000"

The whole search fails for a repo that "does not exist"

GraphQL errors: {
"message": "repository does not exist: repo-name",
"path": [
"search",
"results",
"results",
309,
"file",
"content"
]

The query works with a small count before it hits an error. Is there a way for the cli to skip GraphQL errors? The query works fine within the sourcegraph webapp.

I cannot give a case to reproduce because this depends on our corporate data

Copy link

linear bot commented Feb 27, 2025

@kmalakoff
Copy link
Author

I ended up using the trace flags for the cli and manually calling source graph over http using graphql syntax and then getting the package.jon contents over http directly from gitlab

I’m not sure what the problem was, but maybe an inconsistent state in source graph? Basically, your graphql query adds the content field to the file and for the failing repo, it found an instance of “some-package” in the package.json, but couldn’t return the full content of the package.json via the content graph field.

I work at Indeed and if you want to troubleshoot this and have access to our instance, I can share the query for you to reproduce

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

No branches or pull requests

1 participant