-
Notifications
You must be signed in to change notification settings - Fork 463
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
fix: avoid setting DELETE_AT_EXIT
multiple times
#2619
fix: avoid setting DELETE_AT_EXIT
multiple times
#2619
Conversation
2db2e61
to
16ff54f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wyardley! We should also bump the dev-tools image patch version https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/infra/build/Makefile#L59
(do not merge as-is)
/gcbrun |
@bharathkkb - Thoughts on |
Bumped the tag |
/gcbrun |
1 similar comment
/gcbrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @wyardley!
LGTM, just waiting on @bharathkkb for opinion on --will-cite
Thanks for the PR @wyardley! My thinking is we can do an initial
|
Fixes GoogleCloudPlatform#2618 - Check if `DELETE_AT_EXIT` is set in `setup_trap_handler()` before trying to set it, to avoid `DELETE_AT_EXIT: readonly variable` error - Set the `--will-cite` flag for parallel - in some cases, I've seen the citation warning - Add swp to list of file extensions to ignore (for vim) - Small shellcheck fixes (not exhaustive)
92c4fb2
to
bce5c05
Compare
DELETE_AT_EXIT
twice and set parallel --will-cite
DELETE_AT_EXIT
twice
DELETE_AT_EXIT
twiceDELETE_AT_EXIT
multiple times
I'll just remove that part of the change and update the PR title. It only shows up once anyway, IIRC, so no point in making the code more complex for something like this; I guess having it in the beginning might clutter the output marginally less, but not sure it's worth it. Parallel isn't currently enabled in the GitHub actions check (though it's referenced in a Cloudbuild check - not sure if that runs internally, but it's certainly not visible to most of us). I'm not a lawyer, but worth looking at the FAQ as well as the wording in the man page and in the citation notice itself:
My analysis is that it's allowed (though possibly discouraged) to include |
Also, the output from
|
I updated DELETE_AT_EXIT="$(mktemp -d)"
readonly DELETE_AT_EXIT recommended since |
/gcbrun |
Hi @wyardley! A few repos (primarily those with lots of folders) do/will pass The cloudbuild lint are legacy, replaced by the github workflow lint. |
Got it, thanks. Yeah, I'm just not sure that the possible workarounds are much better (for the reason mentioned above); using one of the alternatives to parallel might work, and I could take a pass at that separately if there's interest. I've done something along these lines before, where
Also, I see my old nemesis, that extra newline in validate output is still around 🙃 |
Yeah, I've heard good things about If there was a desire to explore alternates, I'd say |
Fixes #2618
DELETE_AT_EXIT
is set insetup_trap_handler()
before trying to set it, to avoidDELETE_AT_EXIT: readonly variable
error--will-cite
flag for parallel - in some cases, I've seen the citation warningFor the first, not sure if this is the right fix - maybe it would be simpler to avoid having that function get called twice somehow?
Not sure if
--will-cite
will cause any issues licensing-wise, but I think it's allowed?Edit finally saw the error again locally. So this is the problem this is designed to solve: