Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash with gitlab CI/CD component when using version tag @~latest #1519

Open
kbehrends-vincent opened this issue Mar 6, 2025 · 0 comments
Open

Comments

@kbehrends-vincent
Copy link

Minimal .gitlab-ci.yml illustrating the issue

---
include:
  - component: <my_gitlab_component_url>@~latest
Error: Error: Command failed with exit code 1: git archive --remote=ssh://git@<my_gitlab_component_url> ~latest templates/component.yml
remote: fatal: no such ref: ~latest        
fatal: sent error to the client: git upload-archive: archiver died with error
remote: git upload-archive: archiver died with error
    at Function.remoteFileExist (/snapshot/firecow-gitlab-ci-local/src/utils.ts:350:112)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Function.init (/snapshot/firecow-gitlab-ci-local/src/parser-includes.ts:150:31)
    at async e.init (/snapshot/firecow-gitlab-ci-local/src/parser.ts:109:44)
    at async Function.create (/snapshot/firecow-gitlab-ci-local/src/parser.ts:60:9)
    at async _c (/snapshot/firecow-gitlab-ci-local/src/handler.ts:94:18)
    at async Object.handler (/snapshot/firecow-gitlab-ci-local/src/index.ts:33:21)

The problem is caused by git archive. When I run it manually I get the same error

git archive --remote=ssh://git@<my_gitlab_component_url> ~latest templates/component.yml
remote: fatal: no such ref: ~latest
fatal: sent error to the client: git upload-archive: archiver died with error
remote: git upload-archive: archiver died with error

If I use the specific version tag e.g. @1.0.1 the CI works correctly. but using @~latest results in the error described above, while the CI works correctly on a gitlab rummer instance.

Expected behavior
The component should be correctly included

Host information
Ubuntu
gitlab-ci-local 4.57.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant