Skip to content

feat: enable shared parallel frontend E2E execution with single Solo/back-end setup - #2577

Merged
steven-sheehy merged 2 commits into
hashgraph:mainfrom
yasenltd:refactor_parallel_execution
Apr 7, 2026
Merged

feat: enable shared parallel frontend E2E execution with single Solo/back-end setup#2577
steven-sheehy merged 2 commits into
hashgraph:mainfrom
yasenltd:refactor_parallel_execution

Conversation

@yasenltd

@yasenltd yasenltd commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR refactors the frontend automation execution model so the heavier Playwright/Electron suites can run as one shared parallel E2E slice in CI, instead of splitting them into multiple infrastructure-heavy jobs.

The main goal is to provision Solo and the back end once in CI and reuse that environment across @local-transactions, @organization-basic, and @organization-advanced, while keeping @local-basic as a lightweight standalone slice. To make that safe, the PR adds worker isolation for Electron/Playwright and updates suite hooks so shared-env runs rely on per-worker isolation instead of destructive resets.

Why

The previous setup had a few problems:

  • CI automation was fragmented across too many file-targeted jobs
  • shared suites repeatedly paid the cost of Solo/back-end setup
  • Electron E2E runs were not isolated well enough for multi-worker shared-env execution
  • some organization/settings flows were flaky because of suite-shared state, generic toast selectors, and startup modal interference

What Changed

  • Switched CI automation selection from file-based commands to suite tags plus --grep
  • Split automation execution into:
    • Automation | Local Basic for @local-basic
    • Automation | Shared E2E for @local-transactions|@organization-basic|@organization-advanced
  • Configured the shared E2E job to start Solo and the back end once and reuse them for all shared suites in that job
  • Added Playwright/Electron worker isolation using worker-specific:
    • userData directories
    • session partitions
    • remote debugging ports
    • single-instance-lock bypass when needed
  • Updated front-end runtime code to honor those isolation settings
  • Updated automation hooks to activate/cleanup shared-env isolation and avoid destructive resets when PLAYWRIGHT_SHARED_ENV=true
  • Added targeted deflake fixes in organization/settings flows:
    • more deterministic observer selection
    • seeded organization transaction cache reset
    • safer negative account-ID test setup
    • toast assertions by variant instead of generic .v-toast__text
    • more reliable dismissal of the startup “Important Note” modal
  • Kept a few unstable advanced organization scenarios explicitly skipped instead of letting them fail nondeterministically
  • Updated automation/README.md to document local/CI execution, hooks, and launch/attach limitations
  • Included small supporting front-end Prisma/test config fixes needed for this branch

What To Review

The most important areas to review are:

  1. .github/workflows/test-frontend.yaml
    • suite split
    • shared E2E job shape
    • Solo/back-end started once and reused
  2. Automation isolation changes
    • automation/utils/playwrightIsolation.ts
    • automation/utils/sharedTestEnvironment.ts
    • automation/utils/electronAppLauncher.ts
  3. Front-end runtime support for isolated Electron workers
    • main process isolation/session/userData handling
  4. Suite hook updates and shared-env behavior in the automation tests
  5. Targeted deflake changes in organization/settings flows

The README and Prisma-related changes are supporting changes, not the main review focus.

Related issue(s):
Fixes #2594

@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (cfb8075) to head (ba7a9f4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2577   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         183      184    +1     
  Lines        7410     7446   +36     
  Branches     1464     1479   +15     
=======================================
+ Hits         7407     7443   +36     
  Misses          3        3           
Files with missing lines Coverage Δ
front-end/src/main/db/__mocks__/prisma.ts 100.00% <100.00%> (ø)
front-end/src/main/db/init.ts 100.00% <100.00%> (ø)
front-end/src/main/db/prisma.ts 100.00% <100.00%> (ø)
front-end/src/main/index.ts 100.00% <100.00%> (ø)
front-end/src/main/services/localUser/index.ts 100.00% <100.00%> (ø)
front-end/src/main/utils/playwrightIsolation.ts 100.00% <100.00%> (ø)
front-end/src/main/windows/mainWindow.ts 100.00% <100.00%> (ø)

Impacted file tree graph

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

@yasenltd yasenltd changed the title feat: automation parallelism experiment feat: enable shared parallel frontend E2E execution with single Solo/back-end setup Apr 3, 2026
@yasenltd
yasenltd force-pushed the refactor_parallel_execution branch from 69369e5 to 1ac9942 Compare April 3, 2026 09:36
@yasenltd yasenltd changed the title feat: enable shared parallel frontend E2E execution with single Solo/back-end setup feat: Refactor frontend automation for shared parallel E2E isolation Apr 3, 2026
@yasenltd yasenltd changed the title feat: Refactor frontend automation for shared parallel E2E isolation feat: enable shared parallel frontend E2E execution with single Solo/back-end setup Apr 3, 2026
@yasenltd
yasenltd marked this pull request as ready for review April 3, 2026 10:25
@yasenltd
yasenltd requested review from a team as code owners April 3, 2026 10:25
@steven-sheehy steven-sheehy added this to the v0.28.0 milestone Apr 6, 2026
@steven-sheehy steven-sheehy added Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. Tests labels Apr 6, 2026
svienot
svienot previously approved these changes Apr 7, 2026

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

This looks good to me.
I have not been able to test locally because of some instabilities which also manifest on main branch for me, so these are not caused by the changes in this PR.
Since tests all pass in CI and locally for @yasenltd I think we are good to go.

@yasenltd
yasenltd force-pushed the refactor_parallel_execution branch from 7631c12 to 3a29d90 Compare April 7, 2026 14:31
@yasenltd
yasenltd requested a review from svienot April 7, 2026 14:32
@steven-sheehy

Copy link
Copy Markdown
Member

Need to merge from main and change imports to use hiero-ledger/sdk

…back-end setup

Signed-off-by: yasenltd <yasenltd@gmail.com>
@yasenltd
yasenltd force-pushed the refactor_parallel_execution branch from e6b38df to 2f80d02 Compare April 7, 2026 17:22
Signed-off-by: yasenltd <yasenltd@gmail.com>

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

LGTM

@steven-sheehy
steven-sheehy merged commit 36fdae5 into hashgraph:main Apr 7, 2026
29 of 32 checks passed
Kolpic pushed a commit that referenced this pull request Apr 15, 2026
…back-end setup (#2577)

This PR refactors the frontend automation execution model so the heavier Playwright/Electron suites can run as one shared parallel E2E slice in CI, instead of splitting them into multiple infrastructure-heavy jobs.

The main goal is to provision Solo and the back end once in CI and reuse that environment across @local-transactions, @organization-basic, and @organization-advanced, while keeping @local-basic as a lightweight standalone slice. To make that safe, the PR adds worker isolation for Electron/Playwright and updates suite hooks so shared-env runs rely on per-worker isolation instead of destructive resets.

- Switched CI automation selection from file-based commands to suite tags plus `--grep`
- Split automation execution into:
  - `Automation | Local Basic` for `@local-basic`
  - `Automation | Shared E2E` for `@local-transactions|@organization-basic|@organization-advanced`
- Configured the shared E2E job to start Solo and the back end once and reuse them for all shared suites in that job
- Added Playwright/Electron worker isolation using worker-specific:
  - `userData` directories
  - session partitions
  - remote debugging ports
  - single-instance-lock bypass when needed
- Updated front-end runtime code to honor those isolation settings
- Updated automation hooks to activate/cleanup shared-env isolation and avoid destructive resets when `PLAYWRIGHT_SHARED_ENV=true`
- Added targeted deflake fixes in organization/settings flows:
  - more deterministic observer selection
  - seeded organization transaction cache reset
  - safer negative account-ID test setup
  - toast assertions by variant instead of generic `.v-toast__text`
  - more reliable dismissal of the startup “Important Note” modal
- Kept a few unstable advanced organization scenarios explicitly skipped instead of letting them fail nondeterministically
- Updated `automation/README.md` to document local/CI execution, hooks, and launch/attach limitations
- Included small supporting front-end Prisma/test config fixes needed for this branch

---------

Signed-off-by: yasenltd <yasenltd@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable shared parallel frontend E2E execution with single Solo/back-end setup

3 participants