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

prepending ExecutorScriptSourcePath breaks using script with args without command #4782

Closed
MrFreezeex opened this issue Dec 19, 2020 · 0 comments · Fixed by #4884
Closed
Labels
Milestone

Comments

@MrFreezeex
Copy link
Contributor

MrFreezeex commented Dec 19, 2020

Summary

We use a script with an args with sh (and not a command). Our image has an entrypoint and exec the rest of the arguments with something like exec "$@".
The PR #4492 breaks these types of workflows (see the example below).

I don't know what should be the right behavior but executing the entrypoint before a script is pretty convenient. For instance, we use it to do some privileged actions and then we drop privileges before executing the workflow's script.

Diagnostics

What Kubernetes provider are you using? Baremetal

What version of Argo Workflows are you running? v2.12.2

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: test-args-script
spec:
  entrypoint: test
  templates:
  - name: test
    script:
      image: mrfreezeex/test-argow-script:v1
      args: [sh]
      source: |
        echo "This message won't be shown!"

My test image is built using these files :

Dockerfile :

FROM alpine

COPY entrypoint.sh entrypoint.sh

ENTRYPOINT entrypoint.sh
CMD echo hello

entrypoint.sh :

#!/bin/sh

exec "$@"

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants