Skip to content

feat(ci): fix nightly-ci build (#6340)#6339

Closed
corinnekrych wants to merge 17 commits into
mainfrom
nigthly-build-fix
Closed

feat(ci): fix nightly-ci build (#6340)#6339
corinnekrych wants to merge 17 commits into
mainfrom
nigthly-build-fix

Conversation

@corinnekrych

Copy link
Copy Markdown
Contributor

Proposed changes

Testing Instructions

  1. Step-by-step how to test
  2. Environment or config notes

Related issues

  • Closes #ISSUE-NUMBER

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

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

@github-actions github-actions Bot added the filigran team Item from the Filigran team. label Jun 22, 2026
@corinnekrych corinnekrych changed the title feat(ci): linux ci run bash shell feat(ci): linux ci run bash shell {#6340) Jun 22, 2026
@corinnekrych corinnekrych changed the title feat(ci): linux ci run bash shell {#6340) feat(ci): linux ci run bash shell (#6340) Jun 22, 2026
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.48%. Comparing base (ccd7cf7) to head (7be188c).

❌ 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     
Flag Coverage Δ
backend 65.73% <ø> (ø)
e2e 18.26% <ø> (-0.41%) ⬇️
frontend 2.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@corinnekrych corinnekrych marked this pull request as ready for review June 22, 2026 13:31
Copilot AI review requested due to automatic review settings June 22, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread .github/workflows/nightly-ci.yml
@corinnekrych

Copy link
Copy Markdown
Contributor Author

@guillaumejparis with commit 39d9f66 i have a green core-CI + gree nightly-ci see here

@corinnekrych

Copy link
Copy Markdown
Contributor Author

I've tried to not add a new playwright.config file
I'm going to do a refactor to have one common action e2e-test for both nightly and core-ci

@corinnekrych

Copy link
Copy Markdown
Contributor Author

Green build for 59c5d66 for core-ci and nightly-ci in here

Comment on lines +5 to +6
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why making the difference ?

Comment on lines +15 to +66
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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we really need all these new conf ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to try to have a common e2e-test action shared by qualitygate and nightly build.
Screenshot 2026-06-23 at 14 45 51

2 options:
1/ we try to align then a bit more: all task to upload coverage, algn start-all-services vs start-search-engine etc..
2/ i rollback my last commit and we keep those separate

which route you prefer?

@corinnekrych corinnekrych changed the title feat(ci): linux ci run bash shell (#6340) feat(ci): fix nightly-ci build (#6340) Jun 24, 2026

@guillaumejparis guillaumejparis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I made a lot of comments if you need help, I can help

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this kind of defeating the purpose of testing that the agent installation works if we make changes on the commands ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't we do a composite action with that ? To reuse everywhere needed

with:
download-release-assets: 'true'

e2e-infra-tests:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we not have real time on this, why forcing a reload ?

@corinnekrych

Copy link
Copy Markdown
Contributor Author

closing this one in favor of https://github.com/OpenAEV-Platform/openaev/pull/6457/changes which is cherry picked branch with only relevant changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants