Open arvid-digg opened 3 months ago
Interesting. If you perform the same curl command but without %2F*
at the end, does that solve the problem and give you a reasonable archive back?
If that's the case, then maybe this code needs to be smarter about how much it trims from the URL before trying to read the archive.
@freben If I remove %2F*
at the end, I get an archive containing the system
folder:
archive.tar.gz
|-- domain1
| |-- system1.yaml
| `-- system2.yaml
`-- domain2
`-- system3.yaml
So yes, it seems that piece of code needs to be smarter.
I think that this is pretty related: https://github.com/backstage/backstage/issues/22504
We'd ideally want to move some of that logic up to the URLReader implementations I think :pray:
i have the same issue on azure https://github.com/backstage/backstage/issues/25820
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.
📜 Description
When I point the catalog location towards a local file with a wildcard subfolder, it fetches both
Domain
andSystem
. However, if I point the catalog location towards a GitLab URL, it can't fetchSystem
.Folder structure
Content of import-all.yaml
app-config.local.yaml
Is it possible to fetch wildcard subfolder when using GitLab and URL? We have a workaround but then we need to specify each subfolder in
metadata/system
.👍 Expected behavior
Would love if the GitLab URL could fetch wildcard subfolders.
👎 Actual Behavior with Screenshots
GitLab can't deliver wildcard URLs. It throws error:
SendArchive: copy 'git archive' output: rpc error: code = FailedPrecondition desc = path doesn't exist
. Uri:/api/v4/projects/<redacted>/repository/archive?sha=master\u0026path=metadata%2Fsystem%2F*
👟 Reproduction steps
Curl GitLab with wildcard expression:
curl --header "PRIVATE-TOKEN: <redacted>" \ --url "https://<redacted>/api/v4/projects/<redacted>/repository/archive?sha=master&path=metadata%2Fsystem%2F*"
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
No response
👀 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?
No, but I'm happy to collaborate on a PR with someone else