feat(ci): fix nightly-ci build (#6340)#6339
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (2.89%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6339 +/- ##
============================================
- Coverage 43.50% 43.48% -0.02%
Complexity 6953 6953
============================================
Files 2251 2251
Lines 62010 62010
Branches 8161 8161
============================================
- Hits 26979 26967 -12
- Misses 33290 33303 +13
+ Partials 1741 1740 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR improves CI reliability for E2E “infra” scenarios by normalizing agent installer commands (bash vs sh / PowerShell quirks), making injector-start polling more robust, and refactoring XTM Composer startup into a reusable composite action that’s wired into nightly and composite E2E runs.
Changes:
- Added
normalizeAgentInstallCommand()helper and reused it in infra agent implant E2E specs. - Improved injector “Started” polling by actively reloading + retrying (longer timeout).
- Updated nightly CI to (a) prepare and inject release assets into the packaged backend and (b) run infra E2E on x64 + arm64; refactored XTM Composer startup into
.github/actions/start-xtm-composer.
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 |
|---|---|
openaev-front/tests_e2e/utils/agentInstaller.ts |
New utility to normalize UI-copied installer commands for CI shells (bash/PowerShell). |
openaev-front/tests_e2e/tests/infra/agent-implant.spec.ts |
Uses the new normalization helper before executing the install command. |
openaev-front/tests_e2e/tests/infra/agent-implant-multitenant.spec.ts |
Same normalization applied for the multi-tenant infra scenario. |
openaev-front/tests_e2e/model/integrations/InjectorInstancePage.ts |
More resilient “Started” wait logic using reload + expect().toPass, with higher timeout. |
openaev-front/playwright.nightly.config.ts |
Excludes tests_e2e/tests/infra/** from nightly multi-browser projects. |
.github/workflows/nightly-ci.yml |
Adds release-asset preparation, infra E2E matrix (x64/arm64), and starts XTM Composer in nightly E2E jobs. |
.github/actions/start-xtm-composer/action.yml |
New composite action to start xtm-composer and wait until OpenAEV reports it reachable. |
.github/actions/e2e-tests/action.yml |
Reuses the new start-xtm-composer composite action instead of inline script. |
|
@guillaumejparis with commit 39d9f66 i have a green core-CI + gree nightly-ci see here |
|
I've tried to not add a new playwright.config file |
| start-all-services=true — starts pgsql/elasticsearch/rabbitmq/minio internally (core mode) | ||
| start-search-engine=true — starts only engine + minio; pgsql/rabbitmq are job services (nightly mode) |
There was a problem hiding this comment.
Why making the difference ?
| playwright-extra-args: | ||
| description: Extra CLI args appended to yarn playwright test (e.g. --project=setup --project=chromium --workers=1 --retries=2) | ||
| required: false | ||
| default: '' | ||
| use-playwright-cache: | ||
| description: Cache Playwright browser binaries between runs (core mode) | ||
| required: false | ||
| default: 'false' | ||
| install-chromium-for-setup: | ||
| description: Also install chromium when browser != chromium (needed for nightly setup project) | ||
| required: false | ||
| default: 'false' | ||
| ci-arch: | ||
| description: Architecture marker exposed as CI_ARCH env var inside Playwright | ||
| required: false | ||
| default: '' | ||
| start-all-services: | ||
| description: Start pgsql + elasticsearch + rabbitmq + minio via docker run (core mode) | ||
| required: false | ||
| default: 'false' | ||
| start-search-engine: | ||
| description: Start only search engine + minio (nightly mode; pgsql/rabbitmq are job services) | ||
| required: false | ||
| default: 'false' | ||
| engine-name: | ||
| description: Search engine name — elasticsearch or opensearch (used when start-search-engine=true) | ||
| required: false | ||
| default: 'elasticsearch' | ||
| engine-image: | ||
| description: Search engine Docker image (used when start-search-engine=true) | ||
| required: false | ||
| default: '' | ||
| wait-for-jar-artifact: | ||
| description: Poll GitHub API until openaev-api-jar artifact is ready before downloading (core mode) | ||
| required: false | ||
| default: 'false' | ||
| app-readiness-check: | ||
| description: api-me waits for GET /api/me HTTP 200 (core); port waits for port 8080 (nightly) | ||
| required: false | ||
| default: 'port' | ||
| app-log-artifact-name: | ||
| description: Name for the uploaded application log artifact | ||
| required: false | ||
| default: 'app-log' | ||
| playwright-report-artifact-name: | ||
| description: Override name for Playwright report artifact (defaults to playwright-report-{browser}) | ||
| required: false | ||
| default: '' | ||
| upload-coverage: | ||
| description: Upload E2E coverage artifact (core chrome mode) | ||
| required: false | ||
| default: 'false' |
There was a problem hiding this comment.
do we really need all these new conf ?
There was a problem hiding this comment.
guillaumejparis
left a comment
There was a problem hiding this comment.
I made a lot of comments if you need help, I can help
There was a problem hiding this comment.
Is this kind of defeating the purpose of testing that the agent installation works if we make changes on the commands ?
There was a problem hiding this comment.
This can definitely be simplified to only take the search engine + playwright config (nightly arm or nightly x64 or the core one)
I think we need to align the nightly on how works the orignal e2e action not trying to do what we were doing (that may be outdated) in nightly
| - uses: actions/checkout@v7 | ||
| - uses: ./.github/actions/frontend-build | ||
|
|
||
| prepare-release-assets: |
There was a problem hiding this comment.
Can't we do a composite action with that ? To reuse everywhere needed
| with: | ||
| download-release-assets: 'true' | ||
|
|
||
| e2e-infra-tests: |
There was a problem hiding this comment.
i'm unsure why we need to isolate infra tests in nightly build
| await this.startedChip.waitFor({ | ||
| state: 'visible', | ||
| await expect(async () => { | ||
| await this.page.reload(); |
There was a problem hiding this comment.
Do we not have real time on this, why forcing a reload ?
|
closing this one in favor of https://github.com/OpenAEV-Platform/openaev/pull/6457/changes which is cherry picked branch with only relevant changes |

Proposed changes
Testing Instructions
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...