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

v3: podSpecPatch can result in failed workflow #5897

Closed
alexec opened this issue May 12, 2021 · 3 comments · Fixed by #5899
Closed

v3: podSpecPatch can result in failed workflow #5897

alexec opened this issue May 12, 2021 · 3 comments · Fixed by #5899
Assignees
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Milestone

Comments

@alexec
Copy link
Contributor

alexec commented May 12, 2021

Pod "deploy-pipeline-kq79f-807066115" is invalid: [spec.containers[0].env[0].valueFrom: Invalid value: "": may not be specified when value is not empty, spec.containers[1].env[0].valueFrom: Invalid value: "": may not be specified when value is not empty

This workflow fails:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hello-world-
  labels:
    workflows.argoproj.io/archive-strategy: "false"
spec:
  entrypoint: whalesay
  templates:
  - name: whalesay
    podSpecPatch: |
      {"containers":[{"name":"main","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}},{"name":"wait","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}}]}
    container:
      image: docker/whalesay:latest
      command: [cowsay]
      args: ["hello world"]
@alexec alexec added this to the v3.0 milestone May 12, 2021
@alexec
Copy link
Contributor Author

alexec commented May 12, 2021

You can fix this issue by changing the order of containers in podSpecPatch:

BAD:

      {"containers":[{"name":"main","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}},{"name":"wait","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}}]}

GOOD:

      {"containers":[{"name":"wait","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}},{"name":"main","resources":{"limits":{"cpu":"500m","memory":"250Mi"}}}]}

@alexec
Copy link
Contributor Author

alexec commented May 12, 2021

Could have been introduced by:

fix(controller): Fix podSpecPatch (#5360) d828717

@alexec alexec self-assigned this May 13, 2021
@alexec
Copy link
Contributor Author

alexec commented May 13, 2021

Created an upstream issue. golang/go#46146

@alexec alexec added the type/regression Regression from previous behavior (a specific type of bug) label May 13, 2021
@alexec alexec linked a pull request May 13, 2021 that will close this issue
alexec added a commit that referenced this issue May 13, 2021
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@sarabala1979 sarabala1979 mentioned this issue May 13, 2021
35 tasks
sarabala1979 pushed a commit that referenced this issue May 14, 2021
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@alexec alexec mentioned this issue May 21, 2021
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant