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

🐛 Bug Report: Register entity stored on GitLab fails if the branch name has "/" #16172

Closed
2 tasks done
LucasDivino opened this issue Feb 3, 2023 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@LucasDivino
Copy link

📜 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.
image

👟 Reproduction steps

1- Create a repository on GitLab
2- Create a branch with a name that contains /, e.g feat/test-x
3 - Add a catalog-info.yaml file to this branch
4 - 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?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@LucasDivino LucasDivino added the bug Something isn't working label Feb 3, 2023
@amritpalnagrame
Copy link
Contributor

I suspect this issue might be related to #2815.

@LucasDivino
Copy link
Author

That is certainly related to this issue. Sorry for the duplication. Strange that I managed to register the component on GitHub when the branch name has a slash without a problem.

@freben
Copy link
Member

freben commented Feb 6, 2023

Closing as duplicate, thanks for linking to the other one.

@freben freben closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants