Skip to content

Conversation

@anithapriyanatarajan
Copy link
Contributor

Changes

This pull request refines how resource selection and cleanup are handled in the pruner configuration logic.

Selector Matching Logic Improvements

  • Changed the fallback behavior when a resource name does not match: the code now continues to selector-based matching instead of immediately returning, allowing resources to be identified by selectors if the name is not found.
  • Refactored selector matching to ensure that all required labels and annotations specified in the ConfigMap must exist in the resource for a match, using AND logic for both labels and annotations. )
  • Removed unnecessary nested block in GetEnforcedConfigLevelFromNamespaceSpec for clarity.

Test Coverage Enhancements

  • Updated and expanded unit tests to verify that selector matching occurs when a resource name does not exist, and to check the case where neither name nor selector match.

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

Release Notes

NONE

/kind bug

Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 16, 2025
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 16, 2025
@infernus01
Copy link
Member

/approve

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: infernus01

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2025
@infernus01
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2025
@tekton-robot tekton-robot merged commit fe21092 into tektoncd:main Nov 17, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. 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