Skip to content

Conversation

valAndre07
Copy link
Contributor

@valAndre07 valAndre07 commented Sep 15, 2025

Changes

Before this commit, a step in a task is currently represented in the UI using a field (name) that is meant to be machine readable, not human readable. So new field are added to Step for display name.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

add displayName field to Step.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 15, 2025
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 15, 2025
@valAndre07 valAndre07 force-pushed the issue-9032-add-support-for-step-display-name branch 2 times, most recently from 6510629 to fe8cd47 Compare September 15, 2025 08:32
@valAndre07
Copy link
Contributor Author

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 15, 2025
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!
Just a small comment about tests, otherwise it looks good.

description: The sum of the two provided integers
steps:
- name: sum
displayName: Do the sum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this to the example.

I think it would be good to have this is some more tests for the various cases:

  • displayName set in an inline step in a Task
  • displayName set in an inline step embedded in a Pipeline or TaskRun, or else

Could you add this to the v1beta1 tests too please?
It would be nice to use displayName somewhere in unit tests too, at least the task conversion one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will try to add more tests 👍
I was able to test in my cluster that the resolver returned the displayName of the step, but then I cannot find the displayName of the step in the taskrun. Can you indicate me in the code where/how the TaskRun is created with the resolver content please ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afrittoli I added some tests but I would like help to understand the errors reported by the CI

- [`workingDir`](#declaring-workingdir)
- [`securityContext`](#declaring-securitycontext)
- [`volumeMounts`](#declaring-volumemounts)
- [`displayName`](#declaring-displayName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice, we already had this on the StepActions, but no documented, thanks for fixing that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I thought my changes will also apply to StepAction as they are semantically Step.
I can't find StepAction in pipeline/pkg/apis/pipeline/v1 to try to apply displayName

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StepActions are only in beta for now, and they already include a description field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about displayName, not description 😃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the field name is different, but description is meant as user-facing text to UIs, so it feels like having both would be redundant. Description is also missing in the docs.

// Description is a user-facing description of the stepaction that may be
// used to populate a UI.
// +optional
Description string `json:"description,omitempty"`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added description field in doc 👍

@waveywaves
Copy link
Member

@valAndre07 Thank you for this PR. Please make sure that all of your changes in the end are in one commit and you are following the commit message standards and are using conventional commit messages. https://github.com/tektoncd/community/blob/main/standards.md#commit-messages

@jerop jerop removed their request for review September 15, 2025 16:05
@valAndre07 valAndre07 force-pushed the issue-9032-add-support-for-step-display-name branch 7 times, most recently from ac7bde9 to daa90a3 Compare September 22, 2025 09:05
@valAndre07
Copy link
Contributor Author

@afrittoli @waveywaves Can I have some help to understand why these pipelines are failing ? 🙏 :

  • ci / e2e-tests / e2e tests (k8s-latest-minus-one, alpha) (pull_request)
  • ci / e2e-tests / e2e tests (k8s-latest-minus-three, alpha) (pull_request)
  • ci / e2e-tests / e2e tests (k8s-latest, alpha) (pull_request)
  • ci / e2e-tests / e2e tests (k8s-oldest, beta) (pull_request)

@vdemeester
Copy link
Member

/retest

@vdemeester
Copy link
Member

@valAndre07 they might be "flaky" test 🙃 😓

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2025
@waveywaves waveywaves self-assigned this Sep 29, 2025
@waveywaves
Copy link
Member

/retest

@valAndre07 valAndre07 force-pushed the issue-9032-add-support-for-step-display-name branch from daa90a3 to 9a84f2e Compare October 1, 2025 11:17
A step in a task is currently represented in the UI using a field (name).
That is meant to be machine readable, not human readable.

A new field displayName is added to Step.
@valAndre07 valAndre07 force-pushed the issue-9032-add-support-for-step-display-name branch from 9a84f2e to 92b782f Compare October 3, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants