elastic-ci-stack-for-aws
elastic-ci-stack-for-aws copied to clipboard
[log-collector] date: invalid option -- 'v'
Describe the bug https://github.com/buildkite/elastic-ci-stack-for-aws/blame/master/utils/log-collector#L75
it seems -v-1d is a BSD/OSX syntax and not supported by the GNU data, https://man7.org/linux/man-pages/man1/date.1.html
Steps To Reproduce Steps to reproduce the behavior:
- ./log-collector -s foo -i bar
Expected behavior Exit code 0
Actual behaviour
++ date -v-1d +%s000
date: invalid option -- 'v'
Try 'date --help' for more information.
+ logAge=
Stack parameters (please complete the following information):
- AWS Region: us-west-1
- Version https://github.com/buildkite/elastic-ci-stack-for-aws/blob/44c48c1b68c8b8690f08a4cf0fd9f4802e963997/utils/log-collector
Additional context
date --date="1day" "+%s000" worked for me
$ date --version
date (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
Oh yep that makes sense. We'll hopefully get to a fix in the next week. Thanks for reporting this @jl-applied 👍
@jl-applied thanks for reporting this! It should be fixed now, but please let us know if you're running into issues!