Skip to content

Commit 4a18cd4

Browse files
committed
refactor: remove Repository CR pipelinerun_status field
Remove the Status []RepositoryRunStatus field from the Repository CR to eliminate informer cache churn caused by updating the CR on every PipelineRun completion. CLI commands now query PipelineRuns directly via label selectors instead of reading repo status. - Delete updateRepoRunStatus reconciler method and call site - Rewrite MixLivePRandRepoStatus to query only PipelineRuns - Fix pre-existing bug: copy CompletionTime in PR conversion - Remove pipelinerun_status schema and printcolumns from CRD - Delete dead code: ShowLastSHA, ShowStatus, ShowLastAge - Update deepcopy, test helpers, informer transform, golden files Signed-off-by: Zaki Shaikh <zashaikh@redhat.com> Assisted-by: Claude Opus 4.6 (via Claude Code)
1 parent 5438a1e commit 4a18cd4

43 files changed

Lines changed: 657 additions & 1339 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/300-repositories.yaml

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,10 @@ spec:
2424
group: pipelinesascode.tekton.dev
2525
versions:
2626
- name: v1alpha1
27-
subresources:
28-
status: {}
2927
additionalPrinterColumns:
3028
- jsonPath: .spec.url
3129
name: URL
3230
type: string
33-
- name: Succeeded
34-
type: string
35-
jsonPath: '.pipelinerun_status[-1].conditions[?(@.type=="Succeeded")].status'
36-
- name: Reason
37-
type: string
38-
jsonPath: '.pipelinerun_status[-1].conditions[?(@.type=="Succeeded")].reason'
39-
- name: StartTime
40-
type: date
41-
jsonPath: ".pipelinerun_status[-1].startTime"
42-
- name: CompletionTime
43-
type: date
44-
jsonPath: ".pipelinerun_status[-1].completionTime"
4531
served: true
4632
storage: true
4733
schema:
@@ -65,112 +51,6 @@ spec:
6551
type: string
6652
metadata:
6753
type: object
68-
pipelinerun_status:
69-
items:
70-
properties:
71-
annotations:
72-
additionalProperties:
73-
type: string
74-
description: |-
75-
Annotations is additional Status fields for the Resource to save some
76-
additional State as well as convey more information to the user. This is
77-
roughly akin to Annotations on any k8s resource, just the reconciler conveying
78-
richer information outwards.
79-
type: object
80-
completionTime:
81-
description: CompletionTime is the time the PipelineRun completed.
82-
format: date-time
83-
type: string
84-
conditions:
85-
description: Conditions the latest available observations of a resource's current state.
86-
items:
87-
description: |-
88-
Condition defines a readiness condition for a Knative resource.
89-
See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
90-
properties:
91-
lastTransitionTime:
92-
description: |-
93-
LastTransitionTime is the last time the condition transitioned from one status to another.
94-
We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic
95-
differences (all other things held constant).
96-
type: string
97-
message:
98-
description: A human readable message indicating details about the transition.
99-
type: string
100-
reason:
101-
description: The reason for the condition's last transition.
102-
type: string
103-
severity:
104-
description: |-
105-
Severity with which to treat failures of this type of condition.
106-
When this is not specified, it defaults to Error.
107-
type: string
108-
status:
109-
description: Status of the condition, one of True, False, Unknown.
110-
type: string
111-
type:
112-
description: Type of condition.
113-
type: string
114-
required:
115-
- status
116-
- type
117-
type: object
118-
type: array
119-
event_type:
120-
description: EventType is the event type of that run
121-
type: string
122-
failure_reason:
123-
additionalProperties:
124-
description: TaskInfos contains information about a task.
125-
properties:
126-
completion_time:
127-
format: date-time
128-
type: string
129-
display_name:
130-
type: string
131-
log_snippet:
132-
type: string
133-
message:
134-
type: string
135-
name:
136-
type: string
137-
reason:
138-
type: string
139-
required:
140-
- name
141-
type: object
142-
description: CollectedTaskInfos is the information about tasks
143-
type: object
144-
logurl:
145-
description: LogURL is the full URL to the log for this run.
146-
type: string
147-
observedGeneration:
148-
description: |-
149-
ObservedGeneration is the 'Generation' of the Service that
150-
was last processed by the controller.
151-
format: int64
152-
type: integer
153-
pipelineRunName:
154-
description: PipelineRunName is the name of the PipelineRun
155-
type: string
156-
sha:
157-
description: SHA is the name of the SHA that has been tested
158-
type: string
159-
sha_url:
160-
description: SHA the URL of the SHA to view it
161-
type: string
162-
startTime:
163-
description: StartTime is the time the PipelineRun is actually started.
164-
format: date-time
165-
type: string
166-
target_branch:
167-
description: TargetBranch is the target branch of that run
168-
type: string
169-
title:
170-
description: Title is the title of the commit SHA that has been tested
171-
type: string
172-
type: object
173-
type: array
17454
spec:
17555
description: |-
17656
RepositorySpec defines the desired state of a Repository, including its URL,

docs/content/docs/api/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ This section provides reference documentation for Pipelines-as-Code custom resou
1111

1212
- [Repository CR]({{< relref "repository" >}}) -- The core custom resource that connects Pipelines-as-Code to your Git repository.
1313
- [Repository Spec]({{< relref "repository-spec" >}}) -- Detailed field reference for the Repository `spec`.
14-
- [Repository Status]({{< relref "repository-status" >}}) -- Field reference for the Repository `pipelinerun_status`.
1514
- [ConfigMap Reference]({{< relref "configmap" >}}) -- Global settings that apply to all repositories.
1615
- [Settings Reference]({{< relref "settings" >}}) -- Repository-level settings for authorization, provider behavior, and AI analysis.

docs/content/docs/api/repository-status.md

Lines changed: 0 additions & 248 deletions
This file was deleted.

0 commit comments

Comments
 (0)