-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Getting Error: assignment to entry in nil map when hooks are used #11521
Comments
@GeunSam2 Would you like to take a look at this? |
i'll check it ASAP. |
OK, thanks! But I cannot reproduce this problem when use following k8s versions:
My install procedure is the same as Quick Start. metadata:
name: issue-11521
namespace: argo
uid: 36dae1b5-6e21-4218-8948-e9e93591a306
resourceVersion: '1069'
generation: 4
creationTimestamp: '2023-08-06T14:09:37Z'
labels:
workflows.argoproj.io/completed: 'true'
workflows.argoproj.io/creator: system-serviceaccount-argo-argo-server
workflows.argoproj.io/phase: Succeeded
annotations:
workflows.argoproj.io/pod-name-format: v2
managedFields:
- manager: argo
operation: Update
apiVersion: argoproj.io/v1alpha1
time: '2023-08-06T14:09:37Z'
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:labels:
.: {}
f:workflows.argoproj.io/creator: {}
f:spec: {}
- manager: workflow-controller
operation: Update
apiVersion: argoproj.io/v1alpha1
time: '2023-08-06T14:09:57Z'
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:workflows.argoproj.io/pod-name-format: {}
f:labels:
f:workflows.argoproj.io/completed: {}
f:workflows.argoproj.io/phase: {}
f:status: {}
spec:
templates:
- name: main
inputs: {}
outputs: {}
metadata: {}
steps:
- - name: step1
template: hello
arguments: {}
- name: hello
inputs: {}
outputs: {}
metadata: {}
container:
name: ''
image: alpine:3.6
command:
- sh
- '-c'
args:
- echo 'hello'
resources: {}
- name: send-status
inputs:
parameters:
- name: state
outputs: {}
metadata: {}
container:
name: ''
image: alpine:3.6
command:
- sh
- '-c'
args:
- echo '{{inputs.parameters.state}}'
resources: {}
entrypoint: main
arguments: {}
hooks:
exit:
template: send-status
arguments:
parameters:
- name: state
value: INPROGRESS
running:
template: send-status
arguments:
parameters:
- name: state
value: SUCCESSFUL
expression: workflow.status == "Running"
status:
phase: Succeeded
startedAt: '2023-08-06T14:09:37Z'
finishedAt: '2023-08-06T14:09:57Z'
progress: 3/3
nodes:
issue-11521:
id: issue-11521
name: issue-11521
displayName: issue-11521
type: Steps
templateName: main
templateScope: local/issue-11521
phase: Succeeded
startedAt: '2023-08-06T14:09:37Z'
finishedAt: '2023-08-06T14:09:47Z'
progress: 2/2
resourcesDuration:
cpu: 6
memory: 6
children:
- issue-11521-3920630365
- issue-11521-3187500750
outboundNodes:
- issue-11521-3430472454
issue-11521-2012696352:
id: issue-11521-2012696352
name: issue-11521.onExit
displayName: issue-11521.onExit
type: Pod
templateName: send-status
templateScope: local/issue-11521
phase: Succeeded
startedAt: '2023-08-06T14:09:47Z'
finishedAt: '2023-08-06T14:09:50Z'
progress: 1/1
resourcesDuration:
cpu: 4
memory: 4
inputs:
parameters:
- name: state
value: INPROGRESS
outputs:
exitCode: '0'
hostNodeName: k3d-k3s-default-server-0
issue-11521-3187500750:
id: issue-11521-3187500750
name: issue-11521.hooks.running
displayName: issue-11521.hooks.running
type: Pod
templateName: send-status
templateScope: local/issue-11521
phase: Succeeded
startedAt: '2023-08-06T14:09:37Z'
finishedAt: '2023-08-06T14:09:40Z'
progress: 1/1
resourcesDuration:
cpu: 3
memory: 3
inputs:
parameters:
- name: state
value: SUCCESSFUL
outputs:
exitCode: '0'
hostNodeName: k3d-k3s-default-server-0
issue-11521-3430472454:
id: issue-11521-3430472454
name: issue-11521[0].step1
displayName: step1
type: Pod
templateName: hello
templateScope: local/issue-11521
phase: Succeeded
boundaryID: issue-11521
startedAt: '2023-08-06T14:09:37Z'
finishedAt: '2023-08-06T14:09:40Z'
progress: 1/1
resourcesDuration:
cpu: 3
memory: 3
outputs:
exitCode: '0'
hostNodeName: k3d-k3s-default-server-0
issue-11521-3920630365:
id: issue-11521-3920630365
name: issue-11521[0]
displayName: '[0]'
type: StepGroup
templateScope: local/issue-11521
phase: Succeeded
boundaryID: issue-11521
startedAt: '2023-08-06T14:09:37Z'
finishedAt: '2023-08-06T14:09:47Z'
progress: 1/1
resourcesDuration:
cpu: 3
memory: 3
children:
- issue-11521-3430472454
conditions:
- type: PodRunning
status: 'False'
- type: Completed
status: 'True'
resourcesDuration:
cpu: 10
memory: 10
artifactRepositoryRef:
default: true
artifactRepository: {}
artifactGCStatus:
notSpecified: true |
Yes I did clean install (upgrade) using namespace-install.yaml file from releases page (3.4.9) |
Thank you! Does not resolved completely, but my observation is following:
spec:
templates:
- name: main
inputs: {}
outputs: {}
metadata: {}
steps:
- - name: step1
template: argosay
arguments: {}
- name: argosay
inputs: {}
outputs: {}
metadata: {}
container:
name: ''
image: argoproj/argosay:v2
command:
- /bin/sh
- '-c'
args:
- /argosay
resources: {}
entrypoint: main
arguments: {}
hooks:
running:
template: argosay
arguments: {}
expression: workflow.status == "Running" |
@sandeepk8s Thank you from the bottom of my heart for your patient debugging process. |
…11535) Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Pre-requisites
:latest
What happened/what you expected to happen?
When I upgraded from 3.4.4 to 3.4.9. I'm encountering an error saying
Error: assignment to entry in nil map
I found that a recent change in operator.go is causing the issue
https://github.com/argoproj/argo-workflows/blame/cb1713d01542a7233d9bcb6646cc3c3409c5d870/workflow/controller/operator.go#L405
I have tested on 3.4.8, the wf is running fine but on 3.4.9 it is throwing error
I suspect the reason is hooks. There's a sample wf below to reproduce the error
Version
3.4.9
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.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: