-
Notifications
You must be signed in to change notification settings - Fork 8
update the tests_groups #703
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
Conversation
📝 WalkthroughWalkthroughThe GitHub Actions workflow is refactored to replace environment-variable-based test requirement passing with a CORRELATION_ID-based payload mechanism, updating dispatch parameters and run discovery logic while maintaining existing control flow. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/incluster-comp-pr-merged.yaml:
- Around line 193-201: The workflow declares a required input REQUIRED_TESTS and
exports it as TEST_NAMES via the export_tests_to_env step, but the GH dispatch
hardcodes tests_groups=NODE_AGENT_E2E instead of using that input; either remove
the UNUSED input and its export/output (REQUIRED_TESTS, export_tests_to_env,
TEST_NAMES) if NODE_AGENT_E2E is intentional, or modify the dispatch payload to
use the exported/available variable (TEST_NAMES/REQUIRED_TESTS) for
client_payload[tests_groups] so the dispatch uses the declared tests input.
| echo "Dispatching E2E tests with correlation_id: ${CORRELATION_ID}" | ||
| echo "Using test group: NODE_AGENT_E2E" | ||
|
|
||
| gh api "repos/armosec/shared-workflows/dispatches" \ | ||
| -f event_type="e2e-test-trigger" \ | ||
| -f "client_payload[correlation_id]=${{ steps.dispatch-info.outputs.correlation_id }}" \ | ||
| -f "client_payload[correlation_id]=${CORRELATION_ID}" \ | ||
| -f "client_payload[github_repository]=${GITHUB_REPOSITORY}" \ | ||
| -f "client_payload[environment]=production" \ | ||
| -f "client_payload[tests]=${REQUIRED_TESTS_JSON}" \ | ||
| -f "client_payload[tests_groups]=NODE_AGENT_E2E" \ |
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:
#!/bin/bash
# Check if REQUIRED_TESTS or TEST_NAMES is referenced elsewhere in the repository
echo "=== Checking for REQUIRED_TESTS usage ==="
rg -n "REQUIRED_TESTS" --type yaml
echo ""
echo "=== Checking for TEST_NAMES usage ==="
rg -n "TEST_NAMES" --type yamlRepository: kubescape/node-agent
Length of output: 144
🏁 Script executed:
#!/bin/bash
# Read the workflow file to verify the lines mentioned in the review
echo "=== Checking workflow file structure ==="
wc -l .github/workflows/incluster-comp-pr-merged.yaml
echo ""
echo "=== Lines 36-39 (REQUIRED_TESTS input) ==="
sed -n '36,39p' .github/workflows/incluster-comp-pr-merged.yaml
echo ""
echo "=== Lines 69 (TEST_NAMES output) ==="
sed -n '69p' .github/workflows/incluster-comp-pr-merged.yaml
echo ""
echo "=== Lines 156-163 (export_tests_to_env step) ==="
sed -n '156,163p' .github/workflows/incluster-comp-pr-merged.yaml
echo ""
echo "=== Lines 191-201 (dispatch with correlation_id) ==="
sed -n '191,201p' .github/workflows/incluster-comp-pr-merged.yamlRepository: kubescape/node-agent
Length of output: 1383
REQUIRED_TESTS input is declared as required but not used in the dispatch.
The workflow input REQUIRED_TESTS (lines 36-39) is marked as required and exported to TEST_NAMES (lines 156-163 and line 69), but the dispatch command hardcodes tests_groups=NODE_AGENT_E2E instead of using the input value.
If the hardcoded test group is intentional, remove the unused REQUIRED_TESTS input (or make it optional) and remove the export_tests_to_env step and TEST_NAMES output declaration. Otherwise, update the dispatch to use the input value.
🤖 Prompt for AI Agents
In @.github/workflows/incluster-comp-pr-merged.yaml around lines 193 - 201, The
workflow declares a required input REQUIRED_TESTS and exports it as TEST_NAMES
via the export_tests_to_env step, but the GH dispatch hardcodes
tests_groups=NODE_AGENT_E2E instead of using that input; either remove the
UNUSED input and its export/output (REQUIRED_TESTS, export_tests_to_env,
TEST_NAMES) if NODE_AGENT_E2E is intentional, or modify the dispatch payload to
use the exported/available variable (TEST_NAMES/REQUIRED_TESTS) for
client_payload[tests_groups] so the dispatch uses the declared tests input.
Overview
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.