[Catalog] Importing conflicting entities should result in an error
See original GitHub issueExpected Behavior
Our teams register catalogs in Backstage via tagged sources for version controlling the documentation.
A catalog was initially registered from a certain tag (say v1.0.0). This version offers certain code and its associated TechDocs.
A new version from another is now registered (without unregistering the previous version).
Ideally, Backstage should show warning/errors during the Analysis phase of the Catalog Import process if both catalogs are using the same [namespace]/[name]
.
We should then un-register the previous catalog and register via a new source (would be great if a method for making this switch more efficient and automatic exists/can be developed).
Actual Behavior
The catalog from the newly tagged location passes the analysis phase and we can Import it to see its the new location is registered. But in reality, the catalog showcases information about the previously registered tag and we can view this in Inspect Element
as well.
Steps to Reproduce
- Tag your Catalog Repository and register it within Backstage from the tagged location.
https://gitlab.com/[namespace]/[name]/-/blob/1.0.0/catalog-info.yaml
- Make relevant changes to the repository (TechDocs, other catalog metadata, etc. but keeping the
metadata.name
intact) and tag the repository again.
https://gitlab.com/[namespace]/[name]/-/blob/1.1.0/catalog-info.yaml
-
Register the catalog Backstage from the newly tagged location.
-
Backstage showcases information of the previously tagged catalog instead of the latest and doesn’t even give warning/errors while registering an already existing catalog from a new source.
Context
The issue affects us given the catalog management becomes tedious and we can have a false sense of documentation and code being showcased in Backstage is the latest. For example, v1.0.0 docs are shown because we thought the v1.0.1 catalog is successfully registered.
Your Environment
-
Browser Information: Google Chrome 97.0.4692.99
-
Backstage v1.0.3
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Yep this doesn’t seem like we’re doing enough checks to highlight conflicts. I’ll retitle the issue to focus on that.
On a separate note, are you managing documentation versions through registering entities on different tags? That does seem like a bit of a pain tbh 😅 . Is it for APIs/TechDocs/something else?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.