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

Deployment fails if branch name is too long #226

Open
Aratz opened this issue Mar 6, 2024 · 0 comments
Open

Deployment fails if branch name is too long #226

Aratz opened this issue Mar 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Aratz
Copy link
Contributor

Aratz commented Mar 6, 2024

Description

When working on a deployment, a new folder is created at /vulpes/ngi/devel-<username>/<branch_name>.<date>.<commit hash>. However, if the branch name is too long, the ansible task [archive-verify-ws : install archive-verify service] will fail, probably because the path to the conda environment is too long. From some quick experiments, I found out this starts happening from 36 characters long.

Proposed solution

One solution could be to trunk the branch name when creating this folder. Since the folder name also contains the commit hash and the date, the risk of collision should be pretty low. There is still a risk that this problem occurs if the folder structure in the deployment folder is really deep.

Steps to reproduce:

git checkout main
ansible-playbook -i inventory.yml  install.yml -e deployment_environment=devel -e site=upps -t archive-verify
# Ultimately fails at but succeeds at task "archive-verify-ws : install archive-verify service"

git checkout -b branch_with_a_extremely_lengthy_name
ansible-playbook -i inventory.yml  install.yml -e deployment_environment=devel -e site=upps -t archive-verify
# Fails at task "archive-verify-ws : install archive-verify service":
# fatal: [deploy]: FAILED! => {"changed": false, "cmd": ["/vulpes/ngi/devel-adrienc/branch_with_a_extremely_lengthy_name.240306.414b002/sw/anaconda/envs/archive-verify-ws/bin/pip", "install", "-U", "."], "msg": "\n:stderr: env: ‘python3.9’: No such file or directory\n"}
@Aratz Aratz added the bug Something isn't working label Mar 6, 2024
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

1 participant