Skip to content

hack: add etcd revision profiling helper - #10834

Open
waveywaves wants to merge 2 commits into
tektoncd:mainfrom
waveywaves:carry/etcd-revision-profile-helper
Open

waveywaves wants to merge 2 commits into
tektoncd:mainfrom
waveywaves:carry/etcd-revision-profile-helper

Conversation

@waveywaves

Copy link
Copy Markdown
Member

Changes

Carries forward the optional profiling helper from #10329 by @thc1006. The extracted implementation commit preserves @thc1006 as its author; the follow-up commit adapts it to current main and addresses the remaining review risks.

Add hack/etcd-revision-profile, an operator helper that reports the per-key write count and current serialized size of a PipelineRun, its TaskRuns, their Pods, and related Events. Reads are pinned to the PipelineRun's etcd revision, membership is checked through owner references and UIDs, and incomplete profiles fail unless explicitly accepted.

The helper lists Events once per namespace, verifies object identity through API rechecks rather than raw-value substring matching, supports encrypted stored values without a verification bypass, and forces the etcdctl v3 API.

The companion profiling guide is in #10826. This PR implements optional deliverable 3 of #10322.

Validation:

  • go test ./hack/etcd-revision-profile -count=1
  • go vet ./hack/etcd-revision-profile
  • golangci-lint v2.12.2 run --modules-download-mode=vendor --max-issues-per-linter=0 --max-same-issues=0 --timeout 5m --new-from-rev=origin/main

/kind feature

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

thc1006 and others added 2 commits September 29, 2026 01:11
Extracted from the helper originally contributed in tektoncd#10329.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
Signed-off-by: waveywaves <11972233+waveywaves@users.noreply.github.com>
@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesnt merit a release note. labels Sep 28, 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.81%. Comparing base (029a632) to head (21c64d0).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10834   +/-   ##
=======================================
  Coverage   90.81%   90.81%           
=======================================
  Files         292      292           
  Lines       22196    22196           
=======================================
  Hits        20158    20158           
  Misses       2036     2036           
  Partials        2        2           
Flag Coverage Δ
unit-tests 90.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@waveywaves

Copy link
Copy Markdown
Member Author

/retest

@waveywaves

Copy link
Copy Markdown
Member Author

cc @vdemeester @aThorp96

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-none Denotes a PR that doesnt merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants