Skip to content

Conversation

@NDStrahilevitz
Copy link
Collaborator

@NDStrahilevitz NDStrahilevitz commented Nov 18, 2025

1. Explain what the PR does

d4365b8 feat(pr): variable runner label

Define runs-on label with a repository variable and a fallback.
This should allow us to override the runner label for PRs merging from
origin branches.

f09c5a1 chore: refactor github actions

Split up many of the jobs to modular actions.

2. Explain how to test it

Tests should run the same as before.

3. Other comments

@NDStrahilevitz NDStrahilevitz force-pushed the split_pr_workflow_actions branch 2 times, most recently from 3d4a61c to c9c1040 Compare November 18, 2025 15:19
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.51%. Comparing base (034cbab) to head (d4365b8).
⚠️ Report is 50 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5055      +/-   ##
==========================================
+ Coverage   29.72%   30.51%   +0.79%     
==========================================
  Files         234      232       -2     
  Lines       26186    25957     -229     
==========================================
+ Hits         7785     7922     +137     
+ Misses      17864    17496     -368     
- Partials      537      539       +2     
Flag Coverage Δ
unit 30.51% <ø> (+0.79%) ⬆️
see 19 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NDStrahilevitz NDStrahilevitz force-pushed the split_pr_workflow_actions branch from c9c1040 to 94ca6ab Compare November 20, 2025 08:50
@NDStrahilevitz NDStrahilevitz marked this pull request as ready for review November 20, 2025 09:02
Copilot finished reviewing on behalf of NDStrahilevitz November 20, 2025 09:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors GitHub Actions workflow by extracting repeated setup and testing steps into modular composite actions. The changes improve maintainability by centralizing common logic and replacing inline bash matrix generation with a declarative JSON data file.

Key Changes

  • Extracted repeated setup steps into reusable composite actions (setup-tracee-alpine, setup-tracee-ubuntu)
  • Consolidated test execution logic into dedicated actions (run-unit-tests, run-integration-tests, run-e2e-tests)
  • Replaced inline bash script for kernel matrix generation with a JSON data file and a dedicated composite action

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/pr.yaml Replaced inline setup and testing steps with calls to new composite actions across multiple jobs
.github/data/kernel-test-matrix.json New JSON data file containing kernel test configurations (AMI IDs, architectures, names)
.github/actions/setup-tracee-alpine/action.yaml New composite action for Alpine Linux environment setup (Git ownership, dependencies)
.github/actions/setup-tracee-ubuntu/action.yaml New composite action for Ubuntu environment setup (Git installation, ownership, dependencies)
.github/actions/run-unit-tests/action.yaml New composite action to run unit tests and upload codecov results
.github/actions/run-integration-tests/action.yaml New composite action to run integration tests and upload codecov results
.github/actions/run-e2e-tests/action.yaml New composite action for E2E tests with artifact handling and failure detection
.github/actions/generate-kernel-matrix/action.yaml New composite action to generate kernel test matrix from JSON data file using jq
Comments suppressed due to low confidence (1)

.github/workflows/pr.yaml:490

  • The matrix field 'sufix' is misspelled. It should be 'suffix' to follow standard English spelling. Note: This issue depends on fixing the spelling in the generate-kernel-matrix action.
      - graas_ami-${{ matrix.ami }}_${{ github.event.number }}${{ github.run_attempt }}-${{ github.run_id }}_${{ matrix.sufix }}


# Read the JSON file and add timestamp suffix to each entry
timestamp=$(date +%s)
matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {sufix: $ts, job_name: .name}]' "$DATA_FILE")
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The field 'sufix' is misspelled. It should be 'suffix' to follow standard English spelling.

Suggested change
matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {sufix: $ts, job_name: .name}]' "$DATA_FILE")
matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {suffix: $ts, job_name: .name}]' "$DATA_FILE")

Copilot uses AI. Check for mistakes.
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM. Let's discuss next steps.

@NDStrahilevitz
Copy link
Collaborator Author

LGTM. Let's discuss next steps.

I will first try to see if the reusable workflows we've discussed offline fits the purpose here and fixes the relevant sync conflicts. If it does I will refactor this PR accordingly.

@NDStrahilevitz NDStrahilevitz force-pushed the split_pr_workflow_actions branch from fe835fc to a205714 Compare November 25, 2025 11:22
Split up many of the jobs to modular actions.
Define runs-on label with a repository variable and a fallback.
This should allow us to override the runner label for PRs merging from
origin branches.
@NDStrahilevitz NDStrahilevitz force-pushed the split_pr_workflow_actions branch from d21bf0a to d4365b8 Compare November 25, 2025 12:46
@NDStrahilevitz NDStrahilevitz merged commit 284a2be into aquasecurity:main Nov 25, 2025
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants