Implement TEP-0166 Phase 1 controller notices#10299
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/kind feature |
dc70cd4 to
9cdd3df
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements Phase 1 of TEP-0166 for controller-emitted TaskRun notices by introducing a new v1.Notice API type, wiring it into TaskRun.status.notices, gating emission behind an alpha enable-notices feature flag, and updating generated API artifacts/CRDs/docs accordingly.
Changes:
- Add
v1.NoticeandTaskRunStatusFields.Notices, plus a bounded/dedupedTaskRunStatus.AddControllerNoticehelper. - Introduce the alpha
enable-noticesfeature flag and extend tests/config testdata to cover it. - Emit
Warning-level notices for trusted-resources verification warnings whenenable-noticesis enabled, and regenerate OpenAPI/Swagger/CRDs/API reference docs.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/per_feature_flags_test.go | Adds enable-notices to the alpha per-feature-flag test matrix. |
| test/featureflags.go | Enables enable-notices in the “API flag” test feature-flag map. |
| pkg/reconciler/taskrun/taskrun.go | Emits a controller notice on trusted-resources verification warnings when the feature flag is enabled. |
| pkg/reconciler/taskrun/taskrun_test.go | Adds coverage ensuring notices are emitted (and not emitted) based on enable-notices. |
| pkg/apis/pipeline/v1/zz_generated.deepcopy.go | Adds deepcopy support for Notice and TaskRunStatusFields.Notices. |
| pkg/apis/pipeline/v1/taskrun_types.go | Adds TaskRunStatusFields.Notices []Notice (atomic list) to the v1 API. |
| pkg/apis/pipeline/v1/swagger.json | Regenerates swagger with v1.Notice and notices fields on TaskRun status types. |
| pkg/apis/pipeline/v1/openapi_generated.go | Regenerates kube-openapi definitions to include Notice and notices. |
| pkg/apis/pipeline/v1/notice_types.go | Introduces Notice, NoticeLevel, and TaskRunStatus.AddControllerNotice helper logic (truncate/dedupe/bounds). |
| pkg/apis/pipeline/v1/notice_types_test.go | Unit tests for truncation/deduplication and max-count capping behavior. |
| pkg/apis/config/testdata/feature-flags-invalid-enable-notices.yaml | Adds invalid-config fixture for enable-notices. |
| pkg/apis/config/testdata/feature-flags-all-flags-set.yaml | Adds enable-notices: "true" to the “all flags set” fixture. |
| pkg/apis/config/feature_flags.go | Defines the EnableNotices flag and plumbs it into FeatureFlags. |
| pkg/apis/config/feature_flags_test.go | Extends feature-flag parsing tests to include EnableNotices and its invalid value error. |
| docs/pipeline-api.md | Regenerates API reference documentation to include Notice/NoticeLevel and TaskRun notices. |
| config/config-feature-flags.yaml | Documents and adds enable-notices to the default feature-flags config. |
| config/300-crds/300-taskrun.yaml | Regenerates TaskRun CRD schema to include status.notices and featureFlags enableNotices. |
| config/300-crds/300-pipelinerun.yaml | Regenerates PipelineRun CRD schema to include featureFlags enableNotices. |
Files not reviewed (2)
- pkg/apis/pipeline/v1/openapi_generated.go: Generated file
- pkg/apis/pipeline/v1/zz_generated.deepcopy.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9cdd3df to
c97c8d2
Compare
Changes
Implements the Phase 1 scope from TEP-0166 for controller-emitted TaskRun notices.
This adds:
v1.NoticeandTaskRunStatusFields.Noticesenable-noticesalpha per-feature flagVerificationWarnnotices whenenable-noticesis trueIntentionally deferred per the TEP:
StepState.NoticesTEP: tektoncd/community#1262
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepTesting
go test ./pkg/apis/config ./pkg/apis/pipeline/v1 ./pkg/reconciler/taskrunRelease Notes