Skip to content

Implement TEP-0166 Phase 1 controller notices#10299

Open
waveywaves wants to merge 1 commit into
tektoncd:mainfrom
waveywaves:tep0166-phase1
Open

Implement TEP-0166 Phase 1 controller notices#10299
waveywaves wants to merge 1 commit into
tektoncd:mainfrom
waveywaves:tep0166-phase1

Conversation

@waveywaves

Copy link
Copy Markdown
Member

Changes

Implements the Phase 1 scope from TEP-0166 for controller-emitted TaskRun notices.

This adds:

  • v1.Notice and TaskRunStatusFields.Notices
  • enable-notices alpha per-feature flag
  • bounded/deduped controller notice helper on TaskRun status
  • trusted-resources VerificationWarn notices when enable-notices is true
  • generated deepcopy, CRD, OpenAPI, swagger, and API reference updates

Intentionally deferred per the TEP:

  • no step-emitted notice path
  • no entrypoint/termination-message changes
  • no StepState.Notices
  • no PipelineRun notice summary
  • no Succeeded condition message changes

TEP: tektoncd/community#1262

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Testing

go test ./pkg/apis/config ./pkg/apis/pipeline/v1 ./pkg/reconciler/taskrun

Release Notes

Added an alpha `enable-notices` feature flag and `TaskRun.status.notices` for controller-emitted warning and informational notices.

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 17, 2026
@tekton-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from waveywaves after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 17, 2026
@tekton-robot
tekton-robot requested review from dibyom and khrm June 17, 2026 07:40
@waveywaves

Copy link
Copy Markdown
Member Author

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 17, 2026
@waveywaves
waveywaves marked this pull request as ready for review June 23, 2026 10:25
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2026
@waveywaves
waveywaves requested a review from Copilot July 9, 2026 13:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.Notice and TaskRunStatusFields.Notices, plus a bounded/deduped TaskRunStatus.AddControllerNotice helper.
  • Introduce the alpha enable-notices feature flag and extend tests/config testdata to cover it.
  • Emit Warning-level notices for trusted-resources verification warnings when enable-notices is 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.

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2026
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants