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

Filter out empty arguments in container hooks #2633

Merged
merged 1 commit into from
May 31, 2023

Conversation

nikola-jokic
Copy link
Member

When parsing container arguments, we did not check for the empty string. That led to the args array having the first element as an empty string, causing the container hook's container step to fail if we remove entrypoint script as a way to invoke it.

This change does not affect the docker action, since it is created as a command. But if we use containerArgs as an array building container step's Job resource, the command can't be executed. It will be transformed into:

args:
- ""
- "arg1"
- "arg2"
- ...

For more context, please see this comment. ☺️

@nikola-jokic nikola-jokic requested a review from a team as a code owner May 31, 2023 11:01
Copy link
Contributor

@fhammerl fhammerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikola-jokic nikola-jokic merged commit 58f7a37 into main May 31, 2023
10 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/container-hook-fix-empty-args branch May 31, 2023 14:58
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 this pull request may close these issues.

None yet

2 participants