Conversation
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
📝 WalkthroughWalkthroughExtended the workflow dispatch payload for E2E system tests by including Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Summary:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/incluster-comp-pr-merged.yaml:
- Around line 291-293: The e2e-test-trigger dispatch payloads are inconsistent:
the dispatch in this workflow now includes client_payload fields component_name,
image_tag, and image_name while other dispatchers (e.g.,
kubescape-cli-e2e-tests.yaml) do not; pick one fix—either update every
e2e-test-trigger dispatcher to include the same three fields (component_name,
image_tag, image_name) so payloads are uniform, or modify the receiving reusable
workflow in armosec/shared-workflows (and its documented contract) to accept
optional/missing component_name/image_tag/image_name and provide sensible
defaults; locate the dispatch invocations and the receiver entrypoint (the
e2e-test-trigger workflow and the shared-workflows receiver) and implement the
chosen option so all dispatchers and the receiver agree on the schema.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1bf00e3f-329b-4117-84f9-ab958778b8c9
📒 Files selected for processing (1)
.github/workflows/incluster-comp-pr-merged.yaml
| -f "client_payload[component_name]=${{ inputs.COMPONENT_NAME }}" \ | ||
| -f "client_payload[image_tag]=${{ needs.docker-build.outputs.IMAGE_TAG_PRERELEASE }}" \ | ||
| -f "client_payload[image_name]=${{ inputs.IMAGE_NAME }}" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Inspecting repository_dispatch payloads for e2e-test-trigger..."
rg -n -C3 'event_type="e2e-test-trigger"|client_payload\[(component_name|image_tag|image_name)\]' .github/workflows
echo
echo "Expected result:"
echo "- All e2e-test-trigger dispatchers include component_name/image_tag/image_name,"
echo " OR receiver-side defaults are documented and implemented."Repository: kubescape/workflows
Length of output: 2871
Resolve payload field inconsistency across e2e-test-trigger dispatchers before merging.
Lines 291–293 add component_name, image_tag, and image_name to the payload, but kubescape-cli-e2e-tests.yaml (line 141) dispatches the same event type without these fields. Either:
- Update all
e2e-test-triggerdispatchers to include all fields consistently, or - Ensure the receiver in
armosec/shared-workflowshas documented, implemented defaults for missing fields and can handle both payload schemas.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/incluster-comp-pr-merged.yaml around lines 291 - 293, The
e2e-test-trigger dispatch payloads are inconsistent: the dispatch in this
workflow now includes client_payload fields component_name, image_tag, and
image_name while other dispatchers (e.g., kubescape-cli-e2e-tests.yaml) do not;
pick one fix—either update every e2e-test-trigger dispatcher to include the same
three fields (component_name, image_tag, image_name) so payloads are uniform, or
modify the receiving reusable workflow in armosec/shared-workflows (and its
documented contract) to accept optional/missing
component_name/image_tag/image_name and provide sensible defaults; locate the
dispatch invocations and the receiver entrypoint (the e2e-test-trigger workflow
and the shared-workflows receiver) and implement the chosen option so all
dispatchers and the receiver agree on the schema.
|
Summary:
|
Summary by CodeRabbit