🐛 Bug Report: Register entity stored on GitLab fails if the branch name has "/" #16172
Closed
2 tasks done
Labels
bug
Something isn't working
📜 Description
When I try to register an entity on the "Register an existing component" page, if the source branch has
/
for example,feat/test-x
the register fails. This happens especially with GitLab, when I tested it with GitHub I got the expected behavior.👍 Expected behavior
The entity should be registered successfully, with the location pointing to the correct branch, regardless of the branch name.
👎 Actual Behavior with Screenshots
When I register an entity stored on GitLab and the name of the branch in the repository has a / the register fails with a 404 error.
👟 Reproduction steps
1- Create a repository on GitLab
2- Create a branch with a name that contains
/
, e.gfeat/test-x
3 - Add a
catalog-info.yaml
file to this branch4 - Try to register this entity in the "Register an existing component" interface
and then you will get the error
📃 Provide the context for the Bug.
I suspect this is because the "/" is not escaped, so the GitLab API requests to an endpoint that doesn't exist.
🖥️ Your Environment
OS: Linux 5.15.11-76051511-generic - linux/x64
node: v18.13.0
yarn: 1.22.19
cli: 0.22.1 (installed)
backstage: 1.10.0
Dependencies:
@backstage/app-defaults 1.1.0
@backstage/backend-app-api 0.3.1
@backstage/backend-common 0.18.1
@backstage/backend-plugin-api 0.3.1
@backstage/backend-tasks 0.4.2
@backstage/catalog-client 1.3.0
@backstage/catalog-model 1.1.5
@backstage/cli-common 0.1.11
@backstage/cli 0.22.1
@backstage/config-loader 1.1.8
@backstage/config 1.0.6
@backstage/core-app-api 1.4.0
@backstage/core-components 0.12.3
@backstage/core-plugin-api 1.3.0
@backstage/errors 1.1.4
@backstage/integration-aws-node 0.1.1
@backstage/integration-react 1.1.9
@backstage/integration 1.4.2
@backstage/plugin-api-docs 0.8.14
@backstage/plugin-app-backend 0.3.41
@backstage/plugin-auth-backend 0.17.4
@backstage/plugin-auth-node 0.2.10
@backstage/plugin-catalog-backend 1.7.1
@backstage/plugin-catalog-common 1.0.10
@backstage/plugin-catalog-graph 0.2.26
@backstage/plugin-catalog-import 0.9.4
@backstage/plugin-catalog-node 1.3.2
@backstage/plugin-catalog-react 1.2.4
@backstage/plugin-catalog 1.7.2
@backstage/plugin-github-actions 0.5.14
@backstage/plugin-org 0.6.4
@backstage/plugin-permission-common 0.7.3
@backstage/plugin-permission-node 0.7.4
@backstage/plugin-permission-react 0.4.9
@backstage/plugin-proxy-backend 0.2.35
@backstage/plugin-scaffolder-backend 1.10.1
@backstage/plugin-scaffolder-common 1.2.4
@backstage/plugin-scaffolder-react 1.0.1
@backstage/plugin-scaffolder 1.10.1
@backstage/plugin-search-backend-module-pg 0.5.2
@backstage/plugin-search-backend-node 1.1.2
@backstage/plugin-search-backend 1.2.2
@backstage/plugin-search-common 1.2.1
@backstage/plugin-search-react 1.4.0
@backstage/plugin-search 1.0.7
@backstage/plugin-tech-radar 0.6.0
@backstage/plugin-techdocs-backend 1.5.2
@backstage/plugin-techdocs-module-addons-contrib 1.0.9
@backstage/plugin-techdocs-node 1.4.5
@backstage/plugin-techdocs-react 1.1.2
@backstage/plugin-techdocs 1.4.3
@backstage/plugin-user-settings 0.6.2
@backstage/release-manifests 0.0.8
@backstage/test-utils 1.2.4
@backstage/theme 0.2.16
@backstage/types 1.0.2
@backstage/version-bridge 1.0.3
Done in 0.63s.
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: