temporalio / temporalio/ui

E2E teardown can leave Temporal dev server running after partial setup failure

Open
#3,915 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
431
Forks
179
Avg merge
2d 9h
Merged PRs (30d)
71

Description

Describe the bug

If E2E global setup partially succeeds and then fails while creating the UI server,
global teardown can throw while cleaning up an uninitialized dependency.

When that happens, later cleanup does not run and the Temporal dev server started
by the test process can remain running after Playwright exits.

To Reproduce

  1. Build the E2E assets normally.

  2. Temporarily move the UI assets so the Go UI server build fails:

    mv server/ui/assets server/ui/assets.bak

  3. Run:

    pnpm test:e2e tests/e2e/schedules.spec.ts --project="chromium desktop"

  4. Observe the UI server build failure.

  5. Observe a secondary teardown error.

  6. Check for the Temporal process / listening ports after the Playwright command exits.

Expected behavior

Teardown should be safe after partial dependency initialization.

The original setup failure should remain visible, and any dependencies that were
successfully started should still be shut down.

Desktop

  • OS: Ubuntu
  • Browser: Chromium via Playwright
  • UI version: 2.54.1

Additional context

In the failing path, the Temporal dev server has already started before UI server
creation fails.

The secondary teardown failure prevents temporal.shutdown() from being reached,
leaving the E2E-started Temporal process listening on ports 7233/7234.

I have a local fix and regression coverage and can open a PR if this approach is acceptable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the E2E global setup and teardown used by pnpm test:e2e, then reproduce the failure with tests/e2e/schedules.spec.ts and the missing server/ui/assets directory. Verify that the original UI server build error remains visible, successfully started dependencies are cleaned up, and the Temporal process no longer leaves ports 7233/7234 listening.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, playwright, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.