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

hooks failed to run because it was already open (on NixOS) #2734

Closed
MathisWellmann opened this issue Apr 18, 2024 · 0 comments · Fixed by #2736
Closed

hooks failed to run because it was already open (on NixOS) #2734

MathisWellmann opened this issue Apr 18, 2024 · 0 comments · Fixed by #2736

Comments

@MathisWellmann
Copy link

MathisWellmann commented Apr 18, 2024

I tried using some plugins (docker, docker-compose, etc) in my pipeline as such:

steps:
  - label: ":docker: :rust: build"
    command: RUSTFLAGS="-D warnings" cargo build
    plugins:
      - docker-compose#v3.0.3:
          run: node
    agents:
      queue: nixos

Which is executed by the agent on a nixos host, which successfully runs all my other pipelines, but this setup fails to run with the following message:

$ /var/buildkite/plugins/github-com-buildkite-plugins-docker-compose-buildkite-plugin-v3-0-3/hooks/pre-checkout
🚨 Error: The plugin docker-compose pre-checkout hook failed to run because it was already open. We couldn't find out what process had the hook open
🚨 Error: error running "/tmp/buildkite-agent-bootstrap-hook-runner-1100140013": fork/exec /tmp/buildkite-agent-bootstrap-hook-runner-1100140013: no such file or directory

@tomowatt gave insight into why this is happening here: buildkite-plugins/docker-compose-buildkite-plugin#434 (comment)

TLDR: The /bin/bash executable exists at a different path in NixOS as it departs from the FHS (File hierarchy standard) to ensure reproducibility. The plugin scripts rely on bash being there and it thus fails.

The only real issue here is that the above error message is cryptic and could be improved.
Fixing the path in the nix package is possible to support existing scripts / plugins.

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

Successfully merging a pull request may close this issue.

1 participant