Repository navigation
Conversation
When Chains can't sign a run it only sets chains.tekton.dev/signed=failed, so users without access to the controller logs can't tell why. Emit a Warning event on the TaskRun or PipelineRun with the error, using reason SigningRetrying while retries are left and SigningFailed once Chains gives up. The message is capped at 1024 bytes. Document it in signing.md. Fixes tektoncd#984 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2137 +/- ##
==========================================
+ Coverage 80.23% 80.29% +0.05%
==========================================
Files 59 59
Lines 3395 3410 +15
==========================================
+ Hits 2724 2738 +14
- Misses 669 670 +1
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
|
|
||
| ### Why did signing fail? | ||
|
|
||
| When Chains can't sign a run it emits a `Warning` event on the TaskRun or |
There was a problem hiding this comment.
Could you trace the error exits from ObjectSigner.Sign and clarify which failures this event is intended to cover? The docs currently imply an event is emitted for any signing failure, but some errors return before the event-recording path. Please either handle the relevant early-return cases and add focused tests, or narrow the docs to describe the cases that are covered.
Ex: The event is currently emitted only on the accumulated-error path (signing.go, line 289). For example, errors from Rekor client initialization and signer wrapping return directly before reaching that path (signing.go, lines 163–169, lines 193–197).
There was a problem hiding this comment.
Went with narrowing the docs in 3ccae07. They now say the event covers payload, signing, tlog and storage failures, and that early errors (no signable artifacts, Rekor client init, signer wrap) only show up in the controller logs.
|
[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 |
Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Changes
When signing fails, Chains only sets
chains.tekton.dev/signed: failed, so anyone without access to the controller logs has no idea why. This emits a Warning event on the TaskRun/PipelineRun with the error. The reason isSigningRetryingwhile there are retries left andSigningFailedonce Chains gives up, so a plainkubectl describe taskrunshows things like a missing signer or a registry push error.It uses the event recorder the generated reconcilers already put in the context, so there's nothing new to wire up, and it does nothing when there's no recorder. The message is capped at 1024 bytes since a multierror with several storage failures can get long. I added a short note to the troubleshooting section in docs/signing.md.
Fixes #984
/kind feature
Notes
Events expire, so this doesn't replace an annotation if folks want the reason kept on the object. I went with events first since they don't add to the object size (#1076). Happy to add an annotation too if you'd rather have that. Tests are added but I haven't run them locally, CI will be the first run.
I used some help from AI, please don't yell at me. Thx.
Submitter Checklist
functionality, content, code)
Release Notes