Skip to content

Conversation

@bvolovat
Copy link
Contributor

@bvolovat bvolovat commented Jan 29, 2026

Overview

Summary by CodeRabbit

Release Notes

  • Chores
    • Enhanced CI/CD workflow to improve test correlation and tracking in the deployment pipeline.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Workflow Dispatch Refactoring
.github/workflows/incluster-comp-pr-merged.yaml
Replaced REQUIRED_TESTS_JSON environment variable with CORRELATION_ID-based payload flow. Updated client_payload to use correlation_id and tests_groups (set to NODE_AGENT_E2E) instead of tests. Added explicit log statements for dispatch initiation/completion and adjusted the Find E2E workflow run step to correlate runs via CORRELATION_ID.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • run system test from private repo #700: Modifies the same workflow to switch test dispatching to a correlation_id-based payload, using CORRELATION_ID for dispatch payload fields and run discovery.

Suggested reviewers

  • Naor-Armo

Poem

🐰 A rabbit hops through workflows bright,
Swapping tests for IDs of light,
Correlation blooms where REQUIRED_TESTS grew,
NODE_AGENT_E2E flags shine bold and true,
Dispatch flows cleaner, faster, more right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'update the tests_groups' is generic and vague. It does not clearly convey what the main change is or why it matters. Provide a more specific and descriptive title that highlights the primary objective, such as 'Replace REQUIRED_TESTS with CORRELATION_ID-based workflow dispatch' or 'Refactor E2E test dispatch to use tests_groups and correlation IDs'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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.

Comment on lines +193 to +201
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" \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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 yaml

Repository: 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.yaml

Repository: 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.

@bvolovat bvolovat merged commit a8704e8 into main Jan 29, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants