backstage: Entity Registration cannot process branches with forward slash
Expected Behavior
When testing out registering a service in backstage, say on a feature branch feature/my-awesome-feature, the user should be able to register by passing https://github.com/MyOrg/my-service/blob/feature/my-awesome-feature/catalog-info.yaml to the entity registration form
Current Behavior
Instead, the user will get the following error
Unable to read url, NotFoundError: https://github.com/MyOrg/my-service/blob/feature/my-awesome-feature/catalog-info.yaml could not be read as https://api.github.com/repos/MyOrg/my-service/contents/backstage/catalog-info.yaml?ref=feature, 404 Not Found
my-awesome-feature looks as though it is being truncated from ?ref=...
Possible Solution
Haven’t looked into it, but presumably a simple fix of just not truncating, and perhaps URL encoding the /?
Steps to Reproduce
- Create a branch with a
/in the name - Attempt to register an entity on that branch in Backstage
Context
Honestly, not a blocker, since 99/100 you are either going to have the entity registered on a scaffolding event or are going to track the head branch, but for testing this can be a bit of a rough start for people trying to be onboarded to backstage.
Your Environment
- NodeJS Version (v12): 12
- Operating System and Version (e.g. Ubuntu 14.04): Mac (though deployed app is running ubuntu… 18?)
- Browser Information: Chrome
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 17 (11 by maintainers)
OMG, just found this issue, it killed my last… 3 hours?
Worth fixing 😢
I’ll help keep this issue alive as well to lengthen the stale-check time. I just ran into this at SeatGeek, where my branching pattern also uses a forward-slash on a gitlab instance. I did also figure out the uri-encoding (
/->%2F) of the slash workaround before jumping over here to look for this issue 😃Wanted to add that we’re also hitting this limitation to keep this issue relevant since #2815 was closed as stale.
Related, though potentially not exactly the same: https://github.com/backstage/backstage/issues/2815