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

GraphQL API returns invalid repository and tree URLs for repo with spaces in name (not percent-encoded) #15667

Closed
felixfbecker opened this issue Nov 11, 2020 · 3 comments
Assignees
Labels
api Sourcegraph GraphQL API bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. customer Important issues reported or desired by a customer. estimate/0.5d

Comments

@felixfbecker
Copy link
Contributor

This is the root cause of #15615, which affects https://app.hubspot.com/contacts/2762526/company/1085513342.

Repro:

  1. Go to https://k8s.sgdev.org/sourcegraph.visualstudio.com/Test%20Repo
  2. Check the network tab for the RepositoryRedirect and ResolveRev queries.

Actual:
RepositoryRedirect has repositoryRedirect.url: "/sourcegraph.visualstudio.com/Test Repo"
ResolveRev has repositoryRedirect.commit.tree.url: "/sourcegraph.visualstudio.com/Test Repo"

which are invalid URLs and cause React client routing to break.

Expected:
Both should be "/sourcegraph.visualstudio.com/Test%20Repo"

@felixfbecker felixfbecker added bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. api Sourcegraph GraphQL API team/cloud labels Nov 11, 2020
@github-actions
Copy link
Contributor

Heads up @tsenart - the "team/cloud" label was applied to this issue.

@unknwon unknwon self-assigned this Nov 12, 2020
@unknwon unknwon added this to the Cloud 2020-11-04 milestone Nov 12, 2020
@unknwon unknwon added the customer Important issues reported or desired by a customer. label Nov 12, 2020
@felixfbecker
Copy link
Contributor Author

@unknwon I found the resolvers at fault and pushed a PR here to save you time: #15745

However, I am not sure if I did everything correctly regarding code layout and testing. Do you want to take the PR over and push any changes or additional tests that should be done?

@unknwon
Copy link
Member

unknwon commented Nov 16, 2020

@felixfbecker Thanks! I'll take it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Sourcegraph GraphQL API bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. customer Important issues reported or desired by a customer. estimate/0.5d
Projects
None yet
Development

No branches or pull requests

2 participants