Error on BusyBox - `unrecognized: -ignore_readdir_race`
Just thought I'd report this. Hoping it can be solved by installing findutils. Great plugin btw!
find: unrecognized: -ignore_readdir_race
--
| BusyBox v1.28.4 (2018-12-31 18:05:13 UTC) multi-call binary.
Hey @ianks . Thanks for the report. I'm a bit unfamiliar with busybox thing. It seems it's an executable that covers many UNIX tools according to about page. Also according to that page, BusyBox has fewer options than the original ones.
If I understand correctly, you managed to fix this case by installing findutils? Or should I install that via this plugin at some point?
Other option which I only want to do at last stage, is to drop that option for BusyBox if detected.
So it looks like installing findutils did not work. The image I am use inherits from cimg/base:2020.09, which I believe comes from Ubuntu. So not sure why it is not working.
Instead, maybe we could use -exec with rm -f in the find command?
Sad to hear that didn't work out as expected. I have an Ubuntu 20.04 LTS which is findutils installed and find -ignore_readdir_race works perfectly.
Instead, maybe we could use
-execwithrm -fin the find command?
Yep. I think that will work too.
I think:
find "${CACHE_PREFIX}" -type f -mtime +"${DAYS}" -exec rm -f {} \;
will be sufficient.
Will push a new version now.
@ianks could you please test against master branch? - gencer/cache#master:
@gencer the original issue was solved, but now i'm getting: tar: unrecognized option: ignore-failed-read
~i'm reading the --warning=no-file-changed might be better~
this does not work either :/
here's what works for me 😄
https://github.com/gencer/cache-buildkite-plugin/compare/master...ianks:master
@ianks generally removing --ignore-failed-read is a bad idea. However, we can make an exception for busybox. I've added busybox checking to the tar creation.
I have pushed changes to master branch. Could you please test against that branch? Please note that, if you already checkout that branch on your test machine, it might be good idea to delete plugins/*cache* folder before testing. Because buildkite will not checkout master branch twice.
Released via v2.3.6.
I'm getting the same --ignore-failed-read
[node] - 🔍 Locating source: v1-cache-node-6e9bee060e2c317a3c65153c5b9ec16bb1c80c3b
--
| [node] - 🔍 Locating cache: node_modules
| tar: unrecognized option: ignore-failed-read
| BusyBox v1.31.1 () multi-call binary.
|
| Usage: tar c\|x\|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...
|
| Create, extract, or list files from a tar file
|
| c Create
| x Extract
| t List
| -f FILE Name of TARFILE ('-' for stdin/out)
| -C DIR Change to DIR before operation
| -v Verbose
| -O Extract to stdout
| -m Don't restore mtime
| -o Don't restore user:group
| -k Don't replace existing files
| -Z (De)compress using compress
| -z (De)compress using gzip
| -J (De)compress using xz
| -j (De)compress using bzip2
| -a (De)compress using lzma
| -h Follow symlinks
| -T FILE File with names to include
| -X FILE File with glob patterns to exclude
| --exclude PATTERN Glob pattern to exclude
| 🚨 Error: The plugin cache post-command hook exited with status 1
Here is my plugin config:
- gencer/cache#v2.4.8:
id: node
backend: tarball
compress: true
key: "v1-cache-{{ id }}-{{ checksum 'yarn.lock' }}" # Calculate whole 'app/javascript' recursively
restore-keys:
- 'v1-cache-{{ id }}-'
paths:
- node_modules
@rasouza Somehow, BusyBox check fails on your system. It thinks, it is standard GNU Bash therefore uses that argument. Let me see what I can do.
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.
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.
Good bot but bad decision. Not stale. ❤️
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.
Not stale. I am warning you if you stale this one more time i'll kill you and make it look like an accident.
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.
Bad bot. Not Stale
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.
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.