argoproj / argoproj/argo-workflows

Using ⁠display-name prevents step names from being evaluated in ⁠hooks.expression

Closed
#14,914 3 comments 3 reactions 0 assignees View on GitHub
type/regression
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

### Pre-requisites

- [x] I have double-checked my configuration
- [x] I have tested with the `:latest` image tag (i.e. `quay.io/argoproj/workflow-controller:latest`) and can confirm the issue still exists on `:latest`. If not, I have explained why, **in detail**, in my description below.
- [x] I have searched existing issues and could not find a match for this bug
- [ ] I'd like to contribute the fix myself (see [contributing guide](https://github.com/argoproj/argo-workflows/blob/main/docs/CONTRIBUTING.md))

### What happened? What did you expect to happen?

Using ⁠`display-name` prevents step names from being evaluated in ⁠`hooks.expression`.
And then, the ⁠`hooks` remain Pending and nothing happens.
If `⁠display-name` is removed, it will be evaluated correctly.

Image

### Version(s)

v.3.7.2

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

```YAML
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: unsolvable-display-name-with-hooks
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: step1
template: echo
arguments:
parameters:
- name: message
value: "test"
hooks:
test:
expression: steps["step1"].status == "Failed"
template: failed

- name: echo
annotations:
workflows.argoproj.io/display-name: "test-step"
inputs:
parameters:
- name: message
container:
image: "alpine"
command: ["sh", "-c"]
args:
- |
echo "{{inputs.parameters.message}}"
exit 1

- name: failed
container:
image: "alpine"
command: ["sh", "-c"]
args:
- |
echo "failed"
```

### Logs from the workflow controller

```text
none
```

### Logs from in your workflow's wait container

```text
none
```

Contributor guide

Open the contributing guide

Research direction

Start with the provided minimal workflow and its `main` entrypoint, especially the `display-name` annotation and `hooks.expression` referencing `steps["step1"]`. Trace how the controller resolves step names for hook expressions, then run the reproduction and confirm the hook evaluates and completes instead of remaining Pending when the display name is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.