📜 Description
When attempting to import a catalog-info.yaml from GitHub that has "blob" in its path or that references another catalog-info.yaml with "blob" in its path the Backstage server fails with a 400.
👍 Expected behavior
The catalog-info.yaml should be able to be imported.
👎 Actual Behavior with Screenshots
The catalog-info.yaml fails to pass analysis and cannot be imported.

{
"error": {
"name": "InputError",
"message": "Error: Unable to read url, Error: Request failed for https://raw.githubusercontent.com/csuich2/backstage-catalog-test/tree/main/pkg/catalog-info.yaml/, 400 Bad Request",
"stack": "InputError: Error: Unable to read url, Error: Request failed for https://raw.githubusercontent.com/csuich2/backstage-catalog-test/tree/main/pkg/catalog-info.yaml/, 400 Bad Request\n at DefaultLocationService.processEntities (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/DefaultLocationService.ts:110:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at DefaultLocationService.dryRunCreateLocation (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/DefaultLocationService.ts:148:32)\n at <anonymous> (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/createRouter.ts:253:24)"
},
"request": {
"method": "POST",
"url": "/locations?dryRun=true"
},
"response": {
"statusCode": 400
}
}
I originally found this on Backstage 1.22.2 and found the warning below. Note: This error originally occurred on a private project so I've manually updated the log message to match my reproduction repo.
[1] 2024-06-13T22:39:49.905Z catalog warn Unable to read url, NotFoundError: Request failed for https://api.github.com/repos/csuich2/backstage-catalog-test/tree/main/pkg/contents/catalog-info.yaml?ref=meta, 404 Not Found type=plugin entity=location:csuich2/monorepo-locations location=url:https://git.corp.tanium.com/csuich2/backstage-catalog-test/tree/main/catalog-info.yaml
👟 Reproduction steps
See https://github.com/csuich2/backstage-catalog-test for reproduction steps and catalog-info.yaml files.
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
Reproduced on both Backstage 1.22.2 and 1.27.7.
👀 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?
None
📜 Description
When attempting to import a catalog-info.yaml from GitHub that has "blob" in its path or that references another catalog-info.yaml with "blob" in its path the Backstage server fails with a 400.
👍 Expected behavior
The catalog-info.yaml should be able to be imported.
👎 Actual Behavior with Screenshots
The catalog-info.yaml fails to pass analysis and cannot be imported.
{ "error": { "name": "InputError", "message": "Error: Unable to read url, Error: Request failed for https://raw.githubusercontent.com/csuich2/backstage-catalog-test/tree/main/pkg/catalog-info.yaml/, 400 Bad Request", "stack": "InputError: Error: Unable to read url, Error: Request failed for https://raw.githubusercontent.com/csuich2/backstage-catalog-test/tree/main/pkg/catalog-info.yaml/, 400 Bad Request\n at DefaultLocationService.processEntities (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/DefaultLocationService.ts:110:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at DefaultLocationService.dryRunCreateLocation (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/DefaultLocationService.ts:148:32)\n at <anonymous> (/Users/chris.suich/code/backstage/node_modules/@backstage/plugin-catalog-backend/src/service/createRouter.ts:253:24)" }, "request": { "method": "POST", "url": "/locations?dryRun=true" }, "response": { "statusCode": 400 } }I originally found this on Backstage 1.22.2 and found the warning below. Note: This error originally occurred on a private project so I've manually updated the log message to match my reproduction repo.
👟 Reproduction steps
See https://github.com/csuich2/backstage-catalog-test for reproduction steps and catalog-info.yaml files.
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
Reproduced on both Backstage 1.22.2 and 1.27.7.
👀 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?
None