Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-12518

Prevent premature namespace teardown and redundant RHDH re-deployments on test failures/worker restarts

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • 1.10.0
    • None
    • Test Framework
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • RHDH Install 3288

      Description:

      When a test fails, Playwright kills the worker process and creates a new one to run the remaining tests. With the current implementation, this causes two issues:

      1. Premature namespace deletion: The worker-scoped fixture's finally block runs when the worker is killed, deleting the Kubernetes namespace before all tests in the spec file have been
      attempted. Remaining tests then fail because the deployment no longer exists.
      2. Redundant re-deployment: Since beforeAll runs again in the new worker, the entire RHDH deployment process repeats from scratch — taking several minutes — even though the deployment was
      already successful and the resources are still running in the cluster.

      This is expected Playwright behavior (workers are killed on failure by design), but the package should handle this lifecycle more efficiently to avoid unnecessary CI time and resource churn.
      The impact is amplified when spec files have expensive pre-deploy setup (external services, setup scripts, data seeding) that also re-executes on every worker restart.

      Acceptance Criteria:

      • All tests in a spec file run against the same deployment, even when some tests fail
      • Namespace cleanup happens only after all tests in a project have completed
      • Expensive setup operations do not re-execute when Playwright restarts a worker
      • No changes required to existing consumer test code for the default case (configure + deploy)

              skhileri Subhash Khileri
              skhileri Subhash Khileri
              RHDH Install
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: