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

Cache plugins not working #308

Closed
calvinbui opened this issue Apr 18, 2024 · 1 comment
Closed

Cache plugins not working #308

calvinbui opened this issue Apr 18, 2024 · 1 comment

Comments

@calvinbui
Copy link

I am unable to get either the buildkite-plugins/cache-buildkite-plugin or nienbo/cache-buildkite-plugin working.

I have tried placing the cache before and after the kubernetes plugin.

with nienbo/cache, the pre-command hook fails:

2024-04-18 09:28:34 AEST Running plugin cache pre-command hook
2024-04-18 09:28:34 AEST $ /workspace/plugins/buildkite/github-com-nienbo-cache-buildkite-plugin-v2-4-15/hooks/pre-command
2024-04-18 09:28:36 AEST 🚨 Error: The plugin cache pre-command hook failed to run because it was already open. We couldn't find out what process had the hook open

with buildkite-plugins/cache-buildkite-plugin, the post-command hook fails:

2024-04-18 09:50:20 AEST Running plugin cache post-command hook
2024-04-18 09:50:20 AEST $ /workspace/plugins/buildkite/github-com-buildkite-plugins-cache-buildkite-plugin-v1-0-0/hooks/post-command
2024-04-18 09:50:22 AEST 🚨 Error: The plugin cache post-command hook failed to run because it was already open. We couldn't find out what process had the hook open
2024-04-18 09:50:22 AEST 🚨 Error: error running "/tmp/buildkite-agent-hook-wrapper/hook-script-wrapper-2475512101": error starting pty: fork/exec /tmp/buildkite-agent-hook-wrapper/hook-script-wrapper-2475512101: no such file or directory

I am open to other viable solutions as well. We are on EKS, so EFS/FSX volumes would work (ReadWriteMany), but they are expensive to be fast enough and are complicated to work with.

@DrJosh9000
Copy link
Contributor

Hi @calvinbui, thanks for raising the issue. The plugins appear to rely on Bash. Are you using a container image that has Bash installed (at /bin/bash)?

While the stack itself, and the agent, can run in Bashless images like Alpine, most plugins are written assuming Bash is present (since that was a requirement for most of the agent's history).

This should probably be called out in the docs - I suspect it's not clear enough already!

Also there is currently a bug with the agent such that the error message is a bit cryptic when the interpreter specified for a hook isn't present (buildkite/agent#2734).

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

No branches or pull requests

2 participants