Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use displayName if set for showing task status #1413

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Sep 5, 2023

The displayName field has been introduced since Tekton Pipeline 0.47.x, use this when showing the task breakdown status.

Screenshot, assuming a pipelineSpecs looking like this:

  pipelineSpec:
    tasks:
      - name: noop-task
        displayName: "A failure"
        taskSpec:
          steps:
            - name: noop-task
              image: registry.access.redhat.com/ubi9/ubi-micro
              script: |
                echo "hello from main"
                exit 1
      - name: noop-task2
        displayName: "A success"
        taskSpec:
          steps:
            - name: noop-task
              image: registry.access.redhat.com/ubi9/ubi-micro
              script: |
                exit 0
      - name: no-display-name
        taskSpec:
          steps:
            - name: noop-task
              image: registry.access.redhat.com/ubi9/ubi-micro
              script: |
                exit 0

It would show the displayName if set or fallback to just taskName otherwise:

image
image

Changes

Submitter Checklist

  • πŸ“ A good commit message is important for other reviewers to understand the context of your change. Please refer to How to Write a Git Commit Message for more details how to write beautiful commit messages. We rather have the commit message in the PR body and the commit message instead of an external website.
  • β™½ Run make test before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and do pre-commit install in the root of this repo).
  • ✨ We heavily rely on linters to get our code clean and consistent, please ensure that you have run make lint before submitting a PR. The markdownlint error can get usually fixed by running make fix-markdownlint (make sure it's installed first)
  • πŸ“– If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
  • πŸ§ͺ 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
  • 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
  • πŸ”Ž If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch coverage: 57.89% and project coverage change: +0.01% πŸŽ‰

Comparison is base (9170a22) 61.28% compared to head (bb48c6e) 61.30%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1413      +/-   ##
==========================================
+ Coverage   61.28%   61.30%   +0.01%     
==========================================
  Files         136      136              
  Lines       10064    10081      +17     
==========================================
+ Hits         6168     6180      +12     
- Misses       3398     3402       +4     
- Partials      498      499       +1     
Files Changed Coverage Ξ”
pkg/reconciler/status.go 59.43% <0.00%> (-2.34%) ⬇️
pkg/kubeinteraction/status/task_status.go 65.71% <66.66%> (+0.14%) ⬆️
pkg/sort/task_status.go 80.43% <100.00%> (+1.86%) ⬆️

... and 1 file with indirect coverage changes

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@chmouel chmouel force-pushed the use-displayname-when-it-s-set-for-showing-task-sta branch 4 times, most recently from 76ad849 to ddcd2a8 Compare September 5, 2023 14:08
The displayName field has been introduced since Tekton Pipeline 0.47.x, use this
when showing the task breakdown status.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@chmouel chmouel force-pushed the use-displayname-when-it-s-set-for-showing-task-sta branch from ddcd2a8 to bb48c6e Compare September 5, 2023 14:16
Copy link
Contributor

@sm43 sm43 left a comment

Choose a reason for hiding this comment

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

does it needs to be behind feature flag? or by default is fine?
by default is fine though by me, its just creates inconsistency when display name is not there

@chmouel
Copy link
Member Author

chmouel commented Sep 5, 2023

seems to be by default ! (as i have it available) it otherwise fallback to name if not set

@savitaashture
Copy link
Member

/lgtm

πŸŽ‰

@savitaashture
Copy link
Member

Verified PR so merging now

@savitaashture savitaashture merged commit bb6f4b1 into openshift-pipelines:main Sep 7, 2023
6 checks passed
@chmouel chmouel deleted the use-displayname-when-it-s-set-for-showing-task-sta branch September 7, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants