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

🐛 Bug Report: GET locations by entity API call does not work #24660

Open
2 tasks done
lunzmann1120 opened this issue May 6, 2024 · 2 comments
Open
2 tasks done

🐛 Bug Report: GET locations by entity API call does not work #24660

lunzmann1120 opened this issue May 6, 2024 · 2 comments
Labels
area:catalog Related to the Catalog Project Area bug Something isn't working

Comments

@lunzmann1120
Copy link

📜 Description

The GET locations by entity API call referenced here is always returning a 404 location not found error, even when we have verified the component exists and the location exists. The exact error we get is "Found no location with type component and target default/zzz-test".
After further investigation into Backstage's code, we believe the error is coming from line 148 in DefaultLocationStore.ts. It seems it is passing the entityRefString to the parseLocationRef method when it should be passing the locationKeyValue.

image

👍 Expected behavior

The GET location by entity API call should return the id, type, and target of a Location based on the kind, namespace, and name of an entity.

👎 Actual Behavior with Screenshots

404 error even when the data is verified to be correct.

image
image

👟 Reproduction steps

Make an API call to the catalog using the GET location by entity call: "/locations/by-entity/{kind}/{namespace}/{name}" and see that even when the inputs are correct it only returns a 404 error.

📃 Provide the context for the Bug.

No response

🖥️ Your Environment

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@lunzmann1120 lunzmann1120 added the bug Something isn't working label May 6, 2024
@aramissennyeydd
Copy link
Contributor

👋 , I think you're right on! Would you be open to submitting a PR to fix this as well as add tests?

@lunzmann1120
Copy link
Author

Yeah I can do that if you agree that seems to be the issue. I'll get on that and submit it soon.

@vinzscam vinzscam added the area:catalog Related to the Catalog Project Area label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants