You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{exitCode}} is not resolved properly in a Workflow metric when the workflow is triggered as a result of an event.
The same metric is emitted correctly when the workflow is submitted manually.
Expected
The {{exitCode}} value should be resolved in a Workflow metric when the workflow is triggered as a result of an event.
Some details
From the Workflow resource, after the workflow completes successfully:
- message: 'unable to substitute parameters for metric ''latest_workflow_status'':
failed to resolve {{exitCode}}'
status: "True"
type: MetricsError
apiVersion: argoproj.io/v1alpha1kind: WorkflowTemplatemetadata:
name: test-workflowtemplatespec:
entrypoint: mainmetrics:
prometheus:
- name: latest_workflow_statushelp: "Exit code of the last triggered workflow in the namespace"labels:
- key: workflow_namespacevalue: "{{ workflow.namespace }}"gauge:
value: "{{exitCode}}"templates:
- name: mainscript:
image: debian:bullseye-slimcommand: [bash]source: | echo "Sleeping" sleep 2 exit 0
When submitting a Workflow with a metric like this manually, the metric is successfully emitted and is not mentioned in the logs.
Version
Workflows v3.5.0 and events v1.8.1
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.
The issue cannot be reproduced by a single Workflow. It only occurs when a Workflow is triggered by a Sensor as a result of an event captured by the EventSource. See example setup in the main issue description.
would be great if u can share the generated workflow manifest where it works (not from events) and the generated workflow manifest where it doesn't work (from events)
Pre-requisites
:latest
What happened/what you expected to happen?
Problem
{{exitCode}}
is not resolved properly in a Workflow metric when the workflow is triggered as a result of an event.The same metric is emitted correctly when the workflow is submitted manually.
Expected
The
{{exitCode}}
value should be resolved in a Workflow metric when the workflow is triggered as a result of an event.Some details
From the Workflow resource, after the workflow completes successfully:
Example setup
Sensor:
WorkflowTemplate:
When submitting a Workflow with a metric like this manually, the metric is successfully emitted and is not mentioned in the logs.
Version
Workflows v3.5.0 and events v1.8.1
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.
The issue cannot be reproduced by a single Workflow. It only occurs when a Workflow is triggered by a Sensor as a result of an event captured by the EventSource. See example setup in the main issue description.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: