Skip to content

Commit

Permalink
Add TEP - 0047-pipeline-task-display-name
Browse files Browse the repository at this point in the history
  • Loading branch information
itewk committed Jan 29, 2021
1 parent 66cecae commit 2356c19
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 0 deletions.
147 changes: 147 additions & 0 deletions teps/0047-pipeline-task-display-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
status: proposed
title: Pipeline Task Display Name
creation-date: '2021-01-28'
last-updated: '2021-01-28'
authors:
- '@itewk'
---

# TEP-0047: Pipeline Task Display Name
---


<!-- toc -->
- [Summary](#summary)
- [Motivation](#motivation)
- [Goals](#goals)
- [Non-Goals](#non-goals)
- [Use Cases (optional)](#use-cases-optional)
- [Requirements](#requirements)
- [Proposal](#proposal)
- [Notes/Caveats (optional)](#notescaveats-optional)
- [Risks and Mitigations](#risks-and-mitigations)
- [User Experience (optional)](#user-experience-optional)
- [Performance (optional)](#performance-optional)
- [Design Details](#design-details)
- [Test Plan](#test-plan)
- [Design Evaluation](#design-evaluation)
- [Drawbacks](#drawbacks)
- [Alternatives](#alternatives)
- [Infrastructure Needed (optional)](#infrastructure-needed-optional)
- [Upgrade &amp; Migration Strategy (optional)](#upgrade--migration-strategy-optional)
- [References (optional)](#references-optional)
<!-- /toc -->

## Summary

A task in a Pipeline is currently represented in the UI using a field (`name`) that is meant to be
machine readable, not human readable. There should be the addition of a new
optional field (`displayName`) to describe Pipeline tasks that are human readable.

## Motivation

Simple version, humans want to read task names formatted for human's not computers, and they want
to see the full task name rendered in their UI.


The longer version, the end user of a Tekton pipeline can vary including but not limited to
application developer, to security professional, to compliance officer,
service reliability engineer, product manager, and beyond. The farther
you move away from the application developer the more important human
understanding of the CI/CD process is important.

Currently if a product manager or auditor was to look at a Tekton Pipeline run rendered in UI
that would be presented with a bunch of truncated machine readable task names, no spaces, no
capitalization, and the entire task name isn't even readable beyond 20 or so characters.

Compare this to other tools in this space, Jenkins, GitLab CI, GitHub Actions, etc.
Their renderings of their workflows are meant to be human consumable. Their task names have
the option to be rendered in a human consumable format with use of any characters and fully
rendered for context.

### Goals

* Add a `Pipeline.tasks.*.displayName` (or similar) field that allows any text and
if provided will be rendered when displaying Tekton Pipeline in UI rather then the
machine readable `Pipeline.tasks.*.name` field.
* Ideally when rendering this new display name it will be fully rendered rather then the
current truncation to 20 characters that is currently happening.

### Non-Goals

To be determined.

### Use Cases (optional)

Pipeline writers can specify a display name for any/all tasks, if supplied that display name
will be rendered in UI rather then the machine readable `name` field value.

#### Example
```
kind: PipelineRun
spec:
pipelineSpec:
tasks:
- name: echo-message
displayName: Echo Message
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
echo "Hi!"
```

## Requirements

New display name filed would be optional and accept any unicode character

## Proposal

Add `Pipeline.tasks.*.displayName` and update Tekton rendering to use that field rather then
`Pipeline.tasks.*.name` when provided.

### Notes/Caveats (optional)

None.

### Risks and Mitigations

If pursue always rendering the full display name, for extremly large stings could start to cause
rendering issues. Mitigations would be to look out how other similar tools solve this problem.

### User Experience (optional)

None.

### Performance (optional)

Non predicted.

## Design Details

Suggested new parameter would be `Pipeline.tasks.*.displayName` and the required changes to the
Tekton Pipeline rendering to take advantage of the new field.

## Test Plan

To be determined.

## Design Evaluation
This affects UX making Tekton pipeline run rendering more end user consumable.

## Drawbacks
None.

## Alternatives
None.

## Infrastructure Needed (optional)
None.

## Upgrade & Migration Strategy (optional)
None.

## References (optional)
https://github.com/tektoncd/pipeline/issues/3466#issuecomment-767786717
1 change: 1 addition & 0 deletions teps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ This is the complete list of Tekton teps:
|[TEP-0036](0036-start-measuring-tekton-pipelines-performance.md) | Start Measuring Tekton Pipelines Performance | proposed | 2020-11-20 |
|[TEP-0037](0037-remove-gcs-fetcher.md) | Remove `gcs-fetcher` image | proposed | 2021-01-27 |
|[TEP-0045](0045-whenexpressions-in-finally-tasks.md) | WhenExpressions in Finally Tasks | implementable | 2021-01-28 |
|[TEP-0047](0047-pipeline-task-display-name.md) | Pipeline Task Display Name | proposed | 2021-01-28 |

0 comments on commit 2356c19

Please sign in to comment.