Workflow Rules (WF)¶
Code WF is used for issues closely related to the Workflow.
These issues are likely to cause runtime errors when the workflow is executed.
WF101 Duplicated parameter name¶
The workflow contains multiple input parameters (.spec.arguments.parameters) with the same name.
In the following example, the template message is duplicated:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-
spec:
arguments:
parameters:
- name: message
value: "Hello, World!"
- name: message
value: "Hello, Tugboat!"
WF102 Duplicated artifact name¶
The workflow contains multiple input artifacts (.spec.arguments.artifacts) with the same name.
In the following example, the artifact message is duplicated:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-
spec:
arguments:
artifacts:
- name: message
raw:
data: "Hello, World!"
- name: message
raw:
data: >-
Hello, Tugboat!
WF201 Invalid entrypoint¶
The specified entrypoint does not exist in the workflow.
For instance, the following workflow specifies an entrypoint that does not exist:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-
spec:
entrypoint: non-existent
templates:
- name: hello
container:
image: alpine:latest
WF301 Invalid metric name¶
This rule is triggered when a metric name in a template is invalid.
Argo Workflows provides metrics in both Prometheus and OpenTelemetry formats.
As a result, it must comply with the naming rules of both formats.
This means metric names must begin with a letter and can only contain letters, numbers, and underscores (_).
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: demo-
spec:
metrics:
prometheus:
- name: invalid-metric-name
help: This is an invalid metric name
counter:
value: "1"
WF302 Invalid metric label name¶
This rule is triggered when a metric label name in a template is invalid.
Prometheus label names must start with an alphabetic character and can only contain alphanumeric characters and underscores (_).
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: demo-
spec:
metrics:
prometheus:
- name: demo_count
help: This is an invalid metric name
labels:
- key: invalid-label-name
value: demo_value
counter:
value: "1"
WF303 Redundant metric label¶
Prometheus metric labels with an empty value are treated the same as labels that are not defined. This rule is triggered when a metric label in a template has an empty value.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: demo-
spec:
metrics:
prometheus:
- name: demo_count
help: This is an invalid metric name
labels:
- key: demo_label
value: ""
counter:
value: "1"