fix(crafter): surface auto-discovery validation errors#2983
Conversation
9241f71 to
2c1b24b
Compare
|
@waveywaves is this ready to be reviewed? |
2c1b24b to
7fb43ea
Compare
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pkg/attestation/crafter/crafter.go">
<violation number="1" location="pkg/attestation/crafter/crafter.go:670">
P2: DNS-1123 invalid-name errors are generic errors and are not treated as terminal in auto-detect, so they are retried and wrapped by the generic auto-discovery failure instead of being surfaced immediately.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
7fb43ea to
a1b71af
Compare
|
@javirln Yes, this is ready for review! All commits are GPG-signed and rebased on latest main. Sorry for the delayed reply. |
|
@migmartri Would you be able to take a look at this one? It fixes a variable shadowing bug where DNS-1123 validation errors get silently masked in AddMaterialContractFree (issue #2394). All commits GPG-signed, CI green, cubic-dev-ai's finding already addressed. Happy to answer any questions! |
|
Thanks @waveywaves . Check my comment for the actual fix. #2394 is not about DNS names, but just surfacing the error as you did in that line. Please check. |
a1b71af to
0e8c50d
Compare
|
Thanks @jiparis — you're right, the DNS-1123 regex was out of scope. Stripped the PR back to just the two relevant changes:
All the unrelated changes (gracefulGitRepoHead refactor, policyEvalMatches removal, RunCollectors optimization) are gone. One file, 13 insertions, 7 deletions. |
0e8c50d to
6d1a3bb
Compare
6d1a3bb to
80f7d34
Compare
80f7d34 to
7a7bc0f
Compare
7a7bc0f to
d9e64ff
Compare
|
Addressed the latest feedback: dropped the outer Validated with: go test ./pkg/attestation/crafter/... |
Stop probing material kinds when auto-detection hits a protovalidate ValidationError. Schema-level failures, such as invalid material names, are not kind mismatches and should be surfaced directly. Fixes: chainloop-dev#2394 Assisted-by: pi Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
d9e64ff to
f315e32
Compare
|
Thanks @waveywaves ! |
Summary
AddMaterialContractFreereturns aprotovalidate.ValidationError.Fixes #2394
Assisted-by: pi