-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
1.9.0
-
None
-
False
-
-
False
-
-
Description of problem:
When unregistering entities using the unregister-catalog-entities MCP tool, it fails to find existing locations by the given URL, if the location was registered as a location yaml (rather than auto-generated from a catalog-info.yaml import).
Comparing the two types of location resources shows that there's a difference in the target field in both (screenshots attached). The location yaml entity will typically have multiple fields under target, each entry corresponding to a catalog entity yaml. Whereas the generated location yaml created from a catalog-info.yaml on import will just
The unregister catalog entities tool assumes that the passed in location URL will match the target in the location yaml, if such an entity is present.
Instead, I wonder if we could search based on the `backstage.io/managed-by-location` annotation, as that seems to consistently match the expected URL.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Register a location yaml (e.g. https://github.com/redhat-ai-dev/ai-lab-template/blob/main/all.yaml)
- Attempt to use the `unregister-catalog-entities` tool to unregister, using that same URL, it will fail and give a 500 server error message
Actual results:
The unregistration fails
Expected results:
The unregistration succeeds
Reproducibility (Always/Intermittent/Only Once):
Always