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

ENV Merge Bug #12424

Closed
3 tasks done
shuangkun opened this issue Dec 29, 2023 · 1 comment · Fixed by #12426
Closed
3 tasks done

ENV Merge Bug #12424

shuangkun opened this issue Dec 29, 2023 · 1 comment · Fixed by #12426
Assignees
Labels
area/controller Controller issues, panics P3 Low priority type/bug

Comments

@shuangkun
Copy link
Member

shuangkun commented Dec 29, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

I want the workflow work well.

but when I submit and get it:
image

Version

latest

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

workflow-controller-configmap:  

data:
    mainContainer: |
      env:
      - name: ENV1
        value: "env1"
      - name: ENV2
        value: "env2"
---
apiVersion: v1
stringData:
  sec: testenv
kind: Secret
metadata:
  name: mysecret
  namespace: default
type: Opaque
---
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: scripts-python-
spec:
  entrypoint: python-script-example
  templates:
  - name: python-script-example
    steps:
    - - name: generate
        template: gen-random-int
    - - name: print
        template: print-message
        arguments:
          parameters:
          - name: message
            value: "{{steps.generate.outputs.result}}"

  - name: gen-random-int
    script:
      image: python:alpine3.6
      command: [python]
      name: ""
      env:
      - name: MY_ENV
        valueFrom:
          secretKeyRef:
            name: mysecret
            key: sec
      source: |
        import random
        i = random.randint(1, 100)
        print(i)

  - name: print-message
    inputs:
      parameters:
      - name: message
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["echo result was: {{inputs.parameters.message}}"]

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

time="2023-12-29T09:36:39.686Z" level=warning msg="Non-transient error: Pod \"scripts-python-szr4c-gen-random-int-1950539070\" is invalid: spec.containers[1].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty"
time="2023-12-29T09:36:39.686Z" level=info msg="Failed to create pod scripts-python-szr4c(0)[0].generate(0) (scripts-python-szr4c-gen-random-int-1950539070): Pod \"scripts-python-szr4c-gen-random-int-1950539070\" is invalid: spec.containers[1].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty" namespace=default workflow=scripts-python-szr4c
time="2023-12-29T09:36:39.686Z" level=warning msg="Non-transient error: Pod \"scripts-python-szr4c-gen-random-int-1950539070\" is invalid: spec.containers[1].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty"
time="2023-12-29T09:36:39.686Z" level=error msg="Mark error node" error="Pod \"scripts-python-szr4c-gen-random-int-1950539070\" is invalid: spec.containers[1].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty" namespace=default nodeName="scripts-python-szr4c(0)[0].generate(0)" workflow=scripts-python-szr4c

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 29, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 29, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
@terrytangyuan
Copy link
Member

Thanks for documenting the issue and submitting a PR!

shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 30, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 30, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 30, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
shuangkun added a commit to AliyunContainerService/argo-workflows that referenced this issue Dec 30, 2023
…argoproj#12424

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
terrytangyuan pushed a commit that referenced this issue Jan 12, 2024
 #12424 (#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
@agilgur5 agilgur5 added area/controller Controller issues, panics P3 Low priority labels Jan 14, 2024
isubasinghe pushed a commit to isubasinghe/argo-workflows that referenced this issue Feb 27, 2024
 argoproj#12424 (argoproj#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
isubasinghe pushed a commit to isubasinghe/argo-workflows that referenced this issue Feb 27, 2024
 argoproj#12424 (argoproj#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
isubasinghe pushed a commit to isubasinghe/argo-workflows that referenced this issue Feb 27, 2024
 argoproj#12424 (argoproj#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
isubasinghe pushed a commit to isubasinghe/argo-workflows that referenced this issue Feb 28, 2024
 argoproj#12424 (argoproj#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Signed-off-by: Isitha Subasinghe <isubasinghe@student.unimelb.edu.au>
isubasinghe pushed a commit to isubasinghe/argo-workflows that referenced this issue Mar 12, 2024
 argoproj#12424 (argoproj#12426)

Signed-off-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
@shuangkun shuangkun self-assigned this Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics P3 Low priority type/bug
Projects
None yet
3 participants