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.

- [`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 3 times, most recently from 92b782f to b05705f Compare October 7, 2025 08:36
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 b05705f to 24fa5bb Compare October 8, 2025 08:53
@valAndre07
Copy link
Contributor Author

valAndre07 commented Oct 8, 2025

@waveywaves @vdemeester Can you help me understand why pipelines are failing ? I rebase my branch with main but still have errors 😢

@afrittoli
Copy link
Member

@waveywaves @vdemeester Can you help me understand why pipelines are failing ? I rebase my branch with main but still have errors 😢

As @vdemeester mentioned, we're currently struggling with some flaky tests, hopefully it will get better soon. In the meanwhile retesting may help.

@afrittoli
Copy link
Member

/retest

1 similar comment
@afrittoli
Copy link
Member

/retest

Copy link
Member

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Hi @valAndre07! 👋 😸

Thank you for your contribution! 🥇

That is a useful thing. I have only a remark on the tests and a general question about validation.

Is there also an invalid displayName? Do we want to limit the length to 255 for example?

@afrittoli @waveywaves

})
}
}
func TestTaskValidateStepWithDisplayName(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

I think there is no need for a table driven test if its only one test case. You can untangle the test, same for the v1beta1 test below.

tests := []struct {
name string
t *v1.Task
wc func(context.Context) context.Context
Copy link
Member

Choose a reason for hiding this comment

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

This property is unused, you can safely remove it 😸

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.

6 participants