Relax restrictions on component names
See original GitHub issueFeature Suggestion
Today, I when ingesting catalog info files I see the error Error: "metadata.name" is not valid; expected a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total but found...
Possible Implementation
Hard to say; I’m not sure why component names are restricted in this way (still very new to Backstage!). I see that supporting / might be tough currently because of the namespace syntax; perhaps namespace would take precedence when parsing such names?
Context
I’m trying to populate backstage with NuGet and npm packages as library-type components. I’d really like to populate backstage with our internal and external package dependencies and link these to our services so we can use Backstage for processes like flagging apps that reference out-of-date/vulnerable package versions and understand usages across our ecosystem.
All of our internal packages (and many external ones we reference) use a scope to avoid name collisions. Therefore, the names are like @<company>/abc-xyz.
In a few cases, we’ve also run into the length limitation; some packages are very verbosely named such as https://www.nuget.org/packages/runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/.
Given that packages have well-known and unique names, I’d really like to just be able to use the true name of the package as the component name rather than mangling the name to meet the restrictions.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)

Top Related StackOverflow Question
Hi!
You can make your own validation rule overrides by using makeValidator and passing that to the catalog builder in your backend setup of the catalog.
However as you say, slashes (and colons) are discouraged and may lead to breakage in unexpected places.
The reason that this is kind of restricted is that it’s more than a name - it’s the unique ID of the entity (together with namespace and kind).
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.