Skip to content

[release-v0.18.x] perf(cli): use exact match for describe/logs command#1335

Open
divyansh42 wants to merge 1 commit into
tektoncd:release-v0.18.xfrom
divyansh42:cherrypick-11380
Open

[release-v0.18.x] perf(cli): use exact match for describe/logs command#1335
divyansh42 wants to merge 1 commit into
tektoncd:release-v0.18.xfrom
divyansh42:cherrypick-11380

Conversation

@divyansh42
Copy link
Copy Markdown
Member

@divyansh42 divyansh42 commented May 15, 2026

Changes

Cherrypick for #1283
Add GetExactMatch() method to FilterOptions interface to distinguish between exact match filtering (describe/logs) and substring matching (list). This enables faster server-side filtering for operations that query specific resources by name or UID.

Implementation details:

  • Added GetExactMatch() to FilterOptions interface
  • Updated BuildFilterString() to use exact equality (==) when GetExactMatch() is true, otherwise uses contains() for substring matching
  • DescribeOptions and LogsOptions return true for exact matching
  • ListOptions returns false to support partial name searches
  • Updated command help text to document behavior
  • Added test cases covering both list and describe filtering scenarios

When multiple resources match by name, describe/logs commands return the most recent one (ordered by create_time desc). Users can specify
--uid flag to target a specific resource when needed.
Signed-off-by: divyansh42 diagrawa@redhat.com
Assisted-by: Claude Sonnet 4.5 (via Claude Code)

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Tested your changes locally (if this is a code change)
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add 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)
  • Release notes contain the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Enhacement: Improved performance for `describe` and `logs` commands with optimized filtering; when multiple runs share the same name, the most recent one is returned (use `--uid` to  target a specific run) 

Add GetExactMatch() method to FilterOptions interface to distinguish
between exact match filtering (describe/logs) and substring matching
(list). This enables faster server-side filtering for operations that
query specific resources by name or UID.

Implementation details:
- Added GetExactMatch() to FilterOptions interface
- Updated BuildFilterString() to use exact equality (==) when
  GetExactMatch() is true, otherwise uses contains() for substring
  matching
- DescribeOptions and LogsOptions return true for exact matching
- ListOptions returns false to support partial name searches
- Updated command help text to document behavior
- Added test cases covering both list and describe filtering scenarios

When multiple resources match by name, describe/logs commands return                                                                                                                 the most recent one (ordered by create_time desc). Users can specify
--uid flag to target a specific resource when needed.
                                                                                                                                                                                     Signed-off-by: divyansh42 <diagrawa@redhat.com>
Assisted-by: Claude Sonnet 4.5 (via Claude Code)
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 15, 2026
@tekton-robot tekton-robot requested review from enarha and khrm May 15, 2026 04:19
@tekton-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign vdemeester after the PR has been reviewed.
You can assign the PR to them by writing /assign @vdemeester in a comment when ready.

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 May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants