Skip to content

Commit 5b4ea9b

Browse files
committed
Remove TaskRuns and Runs Fields of PipelineRunStatus
This commit removes `status.taskruns` and `status.runs` for PipelineRunStatus since they have been deprecated. The corresponding usage in the test cases are replaced with `childReferences`.
1 parent d2f075a commit 5b4ea9b

16 files changed

+82
-1136
lines changed

docs/pipeline-api.md

-36
Original file line numberDiff line numberDiff line change
@@ -9612,9 +9612,6 @@ ParamValue
96129612
</table>
96139613
<h3 id="tekton.dev/v1beta1.PipelineRunRunStatus">PipelineRunRunStatus
96149614
</h3>
9615-
<p>
9616-
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.PipelineRunStatusFields">PipelineRunStatusFields</a>)
9617-
</p>
96189615
<div>
96199616
<p>PipelineRunRunStatus contains the name of the PipelineTask for this CustomRun or Run and the CustomRun or Run&rsquo;s Status</p>
96209617
</div>
@@ -9942,36 +9939,6 @@ Kubernetes meta/v1.Time
99429939
</tr>
99439940
<tr>
99449941
<td>
9945-
<code>taskRuns</code><br/>
9946-
<em>
9947-
<a href="#tekton.dev/v1beta1.PipelineRunTaskRunStatus">
9948-
map[string]*github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus
9949-
</a>
9950-
</em>
9951-
</td>
9952-
<td>
9953-
<em>(Optional)</em>
9954-
<p>Deprecated - use ChildReferences instead.
9955-
map of PipelineRunTaskRunStatus with the taskRun name as the key</p>
9956-
</td>
9957-
</tr>
9958-
<tr>
9959-
<td>
9960-
<code>runs</code><br/>
9961-
<em>
9962-
<a href="#tekton.dev/v1beta1.PipelineRunRunStatus">
9963-
map[string]*github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus
9964-
</a>
9965-
</em>
9966-
</td>
9967-
<td>
9968-
<em>(Optional)</em>
9969-
<p>Deprecated - use ChildReferences instead.
9970-
map of PipelineRunRunStatus with the run name as the key</p>
9971-
</td>
9972-
</tr>
9973-
<tr>
9974-
<td>
99759942
<code>pipelineResults</code><br/>
99769943
<em>
99779944
<a href="#tekton.dev/v1beta1.PipelineRunResult">
@@ -10068,9 +10035,6 @@ map[string]string
1006810035
</table>
1006910036
<h3 id="tekton.dev/v1beta1.PipelineRunTaskRunStatus">PipelineRunTaskRunStatus
1007010037
</h3>
10071-
<p>
10072-
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.PipelineRunStatusFields">PipelineRunStatusFields</a>)
10073-
</p>
1007410038
<div>
1007510039
<p>PipelineRunTaskRunStatus contains the name of the PipelineTask for this TaskRun and the TaskRun&rsquo;s Status</p>
1007610040
</div>

docs/pipelineruns.md

+47-189
Original file line numberDiff line numberDiff line change
@@ -403,31 +403,13 @@ status:
403403
type: Succeeded
404404
pipelineSpec:
405405
...
406-
taskRuns:
407-
pr-echo-szzs9-echo-hello:
408-
pipelineTaskName: echo-hello
409-
status:
410-
...
411-
taskSpec:
412-
steps:
413-
- image: ubuntu
414-
name: echo
415-
resources: {}
416-
script: |
417-
#!/usr/bin/env bash
418-
echo "Hello World!"
419-
pr-echo-szzs9-echo-bye:
420-
pipelineTaskName: echo-bye
421-
status:
422-
...
423-
taskSpec:
424-
steps:
425-
- image: ubuntu
426-
name: echo
427-
resources: {}
428-
script: |
429-
#!/usr/bin/env bash
430-
echo "Bye World!"
406+
childReferences:
407+
- name: pr-echo-szzs9-echo-hello
408+
pipelineTaskName: echo-hello
409+
kind: TaskRun
410+
- name: pr-echo-szzs9-echo-bye
411+
pipelineTaskName: echo-bye
412+
kind: TaskRun
431413
```
432414

433415
##### Scope and Precedence
@@ -483,25 +465,11 @@ status:
483465
status: "True"
484466
type: Succeeded
485467
...
486-
taskRuns:
487-
pr-echo-szzs9-echo-hello:
488-
pipelineTaskName: echo-hello
489-
status:
490-
conditions:
491-
- lastTransitionTime: "2022-04-07T12:34:57Z"
492-
message: All Steps have completed executing
493-
reason: Succeeded
494-
status: "True"
495-
type: Succeeded
496-
taskSpec:
497-
steps:
498-
- image: ubuntu
499-
name: echo
500-
resources: {}
501-
script: |
502-
#!/usr/bin/env bash
503-
echo "Sasa World!"
504-
...
468+
childReferences:
469+
- name: pr-echo-szzs9-echo-hello
470+
pipelineTaskName: echo-hello
471+
kind: TaskRun
472+
...
505473
```
506474

507475
##### Default Values
@@ -555,25 +523,11 @@ status:
555523
status: "True"
556524
type: Succeeded
557525
...
558-
taskRuns:
559-
pr-echo-szzs9-echo-hello:
560-
pipelineTaskName: echo-hello
561-
status:
562-
conditions:
563-
- lastTransitionTime: "2022-04-07T12:34:57Z"
564-
message: All Steps have completed executing
565-
reason: Succeeded
566-
status: "True"
567-
type: Succeeded
568-
taskSpec:
569-
steps:
570-
- image: ubuntu
571-
name: echo
572-
resources: {}
573-
script: |
574-
#!/usr/bin/env bash
575-
echo "Hello World!"
576-
...
526+
childReferences:
527+
- name: pr-echo-szzs9-echo-hello
528+
pipelineTaskName: echo-hello
529+
kind: TaskRun
530+
...
577531
```
578532

579533
##### Referenced Resources
@@ -766,21 +720,10 @@ status:
766720
name: write-result
767721
resources: {}
768722
startTime: "2022-09-08T17:21:57Z"
769-
taskRuns:
770-
pipelinerun-object-param-resultpxp59-task1:
771-
pipelineTaskName: task1
772-
status:
773-
completionTime: "2022-09-08T17:22:01Z"
774-
conditions:
775-
- lastTransitionTime: "2022-09-08T17:22:01Z"
776-
message: All Steps have completed executing
777-
reason: Succeeded
778-
status: "True"
779-
type: Succeeded
780-
podName: pipelinerun-object-param-resultpxp59-task1-pod
781-
startTime: "2022-09-08T17:21:57Z"
782-
steps:
783-
- container: step-write-result
723+
childReferences:
724+
- name: pipelinerun-object-param-resultpxp59-task1
725+
pipelineTaskName: task1
726+
kind: TaskRun
784727
...
785728
taskSpec:
786729
steps:
@@ -1054,32 +997,13 @@ status:
1054997
type: Succeeded
1055998
pipelineSpec:
1056999
...
1057-
taskRuns:
1058-
recipe-time-lslt9-fetch-secure-data:
1059-
pipelineTaskName: fetch-secure-data
1060-
status:
1061-
...
1062-
taskSpec:
1063-
steps:
1064-
- image: ubuntu
1065-
name: fetch-and-write-secure
1066-
resources: {}
1067-
script: |
1068-
echo hi >> cat /workspace/shared-data/recipe.txt
1069-
workspaces:
1070-
- name: shared-data
1071-
recipe-time-lslt9-print-the-recipe:
1072-
pipelineTaskName: print-the-recipe
1073-
status:
1074-
...
1075-
taskSpec:
1076-
steps:
1077-
- image: ubuntu
1078-
name: print-secrets
1079-
resources: {}
1080-
script: cat /workspace/shared-data/recipe.txt
1081-
workspaces:
1082-
- name: shared-data
1000+
childReferences:
1001+
- name: recipe-time-lslt9-fetch-secure-data
1002+
pipelineTaskName: fetch-secure-data
1003+
kind: TaskRun
1004+
- name: recipe-time-lslt9-print-the-recipe
1005+
pipelineTaskName: print-the-recipe
1006+
kind: TaskRun
10831007
```
10841008

10851009
##### Workspace Referenced Resources
@@ -1155,26 +1079,10 @@ status:
11551079
type: Succeeded
11561080
pipelineSpec:
11571081
...
1158-
taskRuns:
1159-
recipe-time-v5scg-fetch-the-recipe:
1160-
pipelineTaskName: fetch-the-recipe
1161-
status:
1162-
completionTime: "2022-06-02T19:02:58Z"
1163-
conditions:
1164-
- lastTransitionTime: "2022-06-02T19:02:58Z"
1165-
message: |
1166-
"step-fetch-and-write" exited with code 1 (image: "docker.io/library/ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d"); for logs run: kubectl -n default logs recipe-time-v5scg-fetch-the-recipe-pod -c step-fetch-and-write
1167-
reason: Failed
1168-
status: "False"
1169-
type: Succeeded
1170-
...
1171-
taskSpec:
1172-
steps:
1173-
- image: ubuntu
1174-
name: fetch-and-write
1175-
resources: {}
1176-
script: | # See below: Replacements do not happen.
1177-
echo hi >> $(workspaces.shared-data.path)/recipe.txt
1082+
childReferences:
1083+
- name: recipe-time-v5scg-fetch-the-recipe
1084+
pipelineTaskName: fetch-the-recipe
1085+
kind: TaskRun
11781086
```
11791087

11801088
#### Referenced TaskRuns within Embedded PipelineRuns
@@ -1253,32 +1161,13 @@ status:
12531161
type: Succeeded
12541162
pipelineSpec:
12551163
...
1256-
taskRuns:
1257-
recipe-time-pj6l7-fetch-the-recipe:
1258-
pipelineTaskName: fetch-the-recipe
1259-
status:
1260-
...
1261-
taskSpec:
1262-
steps:
1263-
- image: ubuntu
1264-
name: fetch-and-write
1265-
resources: {}
1266-
script: |
1267-
echo /workspace/shared-data
1268-
workspaces:
1269-
- name: shared-data
1270-
recipe-time-pj6l7-print-the-recipe:
1271-
pipelineTaskName: print-the-recipe
1272-
status:
1273-
...
1274-
taskSpec:
1275-
steps:
1276-
- image: ubuntu
1277-
name: print-secrets
1278-
resources: {}
1279-
script: cat /workspace/shared-data/recipe.txt
1280-
workspaces:
1281-
- name: shared-data
1164+
childReferences:
1165+
- name: recipe-time-pj6l7-fetch-the-recipe
1166+
pipelineTaskName: fetch-the-recipe
1167+
kind: TaskRun
1168+
- name: recipe-time-pj6l7-print-the-recipe
1169+
pipelineTaskName: print-the-recipe
1170+
kind: TaskRun
12821171
```
12831172

12841173
### Specifying `LimitRange` values
@@ -1376,8 +1265,6 @@ Your `PipelineRun`'s `status` field can contain the following fields:
13761265
- `completionTime` - The time at which the `PipelineRun` finished executing, in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
13771266
- [`pipelineSpec`](pipelines.md#configuring-a-pipeline) - The exact `PipelineSpec` used when starting the `PipelineRun`.
13781267
- Optional:
1379-
- `taskRuns` - A map of `TaskRun` names to detailed information about the status of that `TaskRun`. This is deprecated and will be removed in favor of using `childReferences`.
1380-
- `runs` - A map of custom task `Run` names to detailed information about the status of that `Run`. This is deprecated and will be removed in favor of using `childReferences`.
13811268
- [`pipelineResults`](pipelines.md#emitting-results-from-a-pipeline) - Results emitted by this `PipelineRun`.
13821269
- `skippedTasks` - A list of `Task`s which were skipped when running this `PipelineRun` due to [when expressions](pipelines.md#guard-task-execution-using-when-expressions), including the when expressions applying to the skipped task.
13831270
- `childReferences` - A list of references to each `TaskRun` or `Run` in this `PipelineRun`, which can be used to look up the status of the underlying `TaskRun` or `Run`. Each entry contains the following:
@@ -1406,33 +1293,10 @@ conditions:
14061293
status: "True"
14071294
type: Succeeded
14081295
startTime: "2020-05-04T02:00:11Z"
1409-
taskRuns:
1410-
triggers-release-nightly-frwmw-build:
1411-
pipelineTaskName: build
1412-
status:
1413-
completionTime: "2020-05-04T02:10:49Z"
1414-
conditions:
1415-
- lastTransitionTime: "2020-05-04T02:10:49Z"
1416-
message: All Steps have completed executing
1417-
reason: Succeeded
1418-
status: "True"
1419-
type: Succeeded
1420-
podName: triggers-release-nightly-frwmw-build-pod
1421-
resourcesResult:
1422-
- key: commit
1423-
resourceName: git-source-triggers-frwmw
1424-
value: 9ab5a1234166a89db352afa28f499d596ebb48db
1425-
startTime: "2020-05-04T02:05:07Z"
1426-
steps:
1427-
- container: step-build
1428-
imageID: docker-pullable://golang@sha256:a90f2671330831830e229c3554ce118009681ef88af659cd98bfafd13d5594f9
1429-
name: build
1430-
terminated:
1431-
containerID: docker://6b6471f501f59dbb7849f5cdde200f4eeb64302b862a27af68821a7fb2c25860
1432-
exitCode: 0
1433-
finishedAt: "2020-05-04T02:10:45Z"
1434-
reason: Completed
1435-
startedAt: "2020-05-04T02:06:24Z"
1296+
childReferences:
1297+
- name: triggers-release-nightly-frwmw-build
1298+
pipelineTaskName: build
1299+
kind: TaskRun
14361300
```
14371301

14381302
The following tables shows how to read the overall status of a `PipelineRun`.
@@ -1477,16 +1341,10 @@ Skipped Tasks:
14771341
Operator: notin
14781342
Values:
14791343
foo
1480-
Task Runs:
1481-
pipelinerun-to-skip-task-run-this-task:
1482-
Pipeline Task Name: run-this-task
1483-
Status:
1484-
...
1485-
When Expressions:
1486-
Input: foo
1487-
Operator: in
1488-
Values:
1489-
foo
1344+
ChildReferences:
1345+
- Name: pipelinerun-to-skip-task-run-this-task
1346+
Pipeline Task Name: run-this-task
1347+
Kind: TaskRun
14901348
```
14911349

14921350
The name of the `TaskRuns` and `Runs` owned by a `PipelineRun` are univocally associated to the owning resource.

0 commit comments

Comments
 (0)