-
Notifications
You must be signed in to change notification settings - Fork 52
feat: Enable policy docs link in Tekton tasks #3196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -280,6 +280,7 @@ spec: | |||
| - "--workers" | ||||
| - "$(params.WORKERS)" | ||||
| - "--strict=false" | ||||
| - "--show-policy-docs-link=true" | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Task usage:"
rg -n --fixed-strings 'show-policy-docs-link' \
tasks/verify-conforma-konflux-vsa-ta/0.1/verify-conforma-konflux-vsa-ta.yaml
echo
echo "CLI flag registrations (validate commands):"
rg -n --fixed-strings 'show-policy-docs-link' cmd/validate || true
echo
echo "Validate image flags file context:"
sed -n '470,620p' cmd/validate/image.go | rg -n --fixed-strings 'show-policy-docs-link' || trueRepository: conforma/cli Length of output: 238 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Context around YAML line 283 and 340 ==="
sed -n '275,290p' tasks/verify-conforma-konflux-vsa-ta/0.1/verify-conforma-konflux-vsa-ta.yaml | cat -n
echo
sed -n '332,347p' tasks/verify-conforma-konflux-vsa-ta/0.1/verify-conforma-konflux-vsa-ta.yaml | cat -n
echo
echo "=== Full validate command file structure ==="
find cmd/validate -type f -name "*.go" | sort
echo
echo "=== Check for flag registration patterns in all validate files ==="
rg -n "show.policy|PolicyDocs|policy.*docs" cmd/validate || echo "No matches found"
echo
echo "=== Search for flag registration in full image.go file ==="
wc -l cmd/validate/image.go
rg -n "show-policy" cmd/validate/image.go || echo "Not found in image.go"
echo
echo "=== Check if validate vsa exists ==="
find cmd/validate -name "*vsa*" -o -name "*vsa*.go"Repository: conforma/cli Length of output: 2254 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== vsa.go flag registration section ==="
# Look for where flags are registered (typically Flags() section or cmd.Flags().X patterns)
rg -A 20 "func.*Cmd\(\)|PersistentFlags\(\)|Flags\(\)" cmd/validate/vsa.go | head -80
echo
echo "=== image.go flag registration section ==="
rg -A 20 "func.*Cmd\(\)|PersistentFlags\(\)|Flags\(\)" cmd/validate/image.go | head -80
echo
echo "=== Check if flag appears in any other files in repo ==="
rg -l "show-policy-docs-link" --type go --type yaml . 2>/dev/null || echo "Only in YAML task file"Repository: conforma/cli Length of output: 8602 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Searching for show-successes in image.go to find where output flags are ==="
rg -n "show-successes" cmd/validate/image.go
echo
echo "=== Searching for all flag definitions containing 'show' in image.go ==="
rg -n 'cmd.Flags.*"show' cmd/validate/image.go
echo
echo "=== Full validation: search entire codebase for --show-policy-docs-link registration ==="
rg -n "show.policy.docs.link|show-policy-docs-link" cmd/ || echo "Not found in cmd/"Repository: conforma/cli Length of output: 590
Lines 283 and 340 use this flag, but a comprehensive search of Remove both occurrences until CLI support is available: Remove unsupported flags- - "--show-policy-docs-link=true"Apply to both line 283 (validate vsa) and line 340 (validate image). 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||
| - "--fallback-public-key" | ||||
| - "$(params.PUBLIC_KEY)" | ||||
| - "--output" | ||||
|
|
@@ -336,6 +337,7 @@ spec: | |||
| - "--timeout=100h" | ||||
| - "--strict=false" | ||||
| - "--show-successes" | ||||
| - "--show-policy-docs-link=true" | ||||
| - "--effective-time=$(params.EFFECTIVE_TIME)" | ||||
| - "--extra-rule-data=pipeline_intention=release" | ||||
| - "--extra-rule-data=$(params.EXTRA_RULE_DATA)" | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: conforma/cli
Length of output: 167
🏁 Script executed:
Repository: conforma/cli
Length of output: 445
🏁 Script executed:
Repository: conforma/cli
Length of output: 83
🏁 Script executed:
Repository: conforma/cli
Length of output: 341
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
# Examine image.go structure to find flag definitions head -100 cmd/validate/image.goRepository: conforma/cli
Length of output: 3574
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 4332
🏁 Script executed:
Repository: conforma/cli
Length of output: 6227
🏁 Script executed:
Repository: conforma/cli
Length of output: 206
🏁 Script executed:
Repository: conforma/cli
Length of output: 425
🏁 Script executed:
Repository: conforma/cli
Length of output: 4737
🏁 Script executed:
Repository: conforma/cli
Length of output: 1141
🏁 Script executed:
Repository: conforma/cli
Length of output: 616
🏁 Script executed:
Repository: conforma/cli
Length of output: 5339
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 840
🏁 Script executed:
Repository: conforma/cli
Length of output: 423
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 110
🏁 Script executed:
Repository: conforma/cli
Length of output: 1503
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 343
🏁 Script executed:
Repository: conforma/cli
Length of output: 905
🏁 Script executed:
Repository: conforma/cli
Length of output: 40
🏁 Script executed:
Repository: conforma/cli
Length of output: 884
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
🏁 Script executed:
Repository: conforma/cli
Length of output: 38
Guard this flag by CLI capability to avoid
unknown flagfailuresLine 393 uses a flag that is not implemented in the CLI. The
--show-policy-docs-linkflag was added to the task file but is not registered incmd/validate/image.goor handled in the format options. Conditionally append it only when supported.Compatibility-safe patch
cmd_args+=( --rekor-url="${REKOR_HOST}" --workers="${WORKERS}" --info="${INFO}" --timeout=0 --strict=false --show-successes=true - --show-policy-docs-link=true --effective-time="${EFFECTIVE_TIME}" --extra-rule-data="${EXTRA_RULE_DATA}" --retry-max-wait="${RETRY_MAX_WAIT}" --retry-max-retry="${RETRY_MAX_RETRY}" --retry-duration="${RETRY_DURATION}" --retry-factor="${RETRY_FACTOR}" --retry-jitter="${RETRY_JITTER}" --output="text=${HOMEDIR}/text-report.txt?show-successes=false" --output="json=${HOMEDIR}/report-json.json" --output="appstudio=$(results.TEST_OUTPUT.path)" ) + + if ec validate image --help 2>&1 | grep -q -- '--show-policy-docs-link'; then + cmd_args+=(--show-policy-docs-link=true) + fi🤖 Prompt for AI Agents