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

feat: prevent conflicting names in catalog-info #400

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

jgresty
Copy link
Member

@jgresty jgresty commented Nov 18, 2024

Backstage names need to be unique, there is nothing preventing users from
having the same name across their api specs which would be fine up until we
generate the backstage resources. To prevent us burdening developers with the
chore of renaming them, we can add the api name to the name which is guaranteed
to be unique.

This prevents the underlying issue and emits an error in case there is a different path to this error.

When there are multiple apis defined (eg internal and public) that have specs
with the same name, version, and stability we will generate the same name in
the catalog-info. Since backstage uses the name as the unique identified this
will result in one shadowing the other and not be available in backstage.
Backstage names need to be unique, there is nothing preventing users from
having the same name across their api specs which would be fine up until we
generate the backstage resources. To prevent us burdening developers with the
chore of renaming them, we can add the api name to the name which is guaranteed
to be unique.
@jgresty jgresty requested a review from a team as a code owner November 18, 2024 14:43
Backstage has a limit on names to 63 characters. Truncate long names to fit
this limit.
@jgresty jgresty merged commit abedfe0 into main Nov 18, 2024
12 checks passed
@jgresty jgresty deleted the feat/warn-about-conflicts branch November 18, 2024 15:35
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

Successfully merging this pull request may close these issues.

2 participants