Skip to content

Install ava @7.x #1321

Open
Open

Description

@josephjclark

When updating ava, tests start to fail (particularly in lightning mock) because some open loop is keeping the process alive.

See branch fix-ava for some insight/madness

Activity

  1. moved this from New Issues to Tech Backlog in Coreon Mar 23, 2026
  2. CaptainAni187 commented on Sep 8, 2026

    @CaptainAni187

    Some data on the hangs, from CI runs on two unrelated PRs of mine (#1531 touches packages/project, #1534 touches ws-worker — neither goes near the integration suite).

    The worker integration job fails by hanging rather than erroring, and it's nondeterministic across runs:

    build 18318:   1 test  pending in test/autoinstall.test.ts
    build 18317:  15 tests pending in test/integration.test.ts
    build 18256:   3 tests pending in test/autoinstall.test.ts
    

    48 tests pass each time; a handful just never resolve and ava times out. In-repo PRs #1527 and #1530 fail the same job, while #1528, #1529, #1532 and #1533 pass, so it isn't fork-specific.

    A likely mechanism, at least for these files: the run() helper wraps everything in a promise that only settles on a run:complete event —

    return new Promise<any>(async (done, reject) => {
      lightning.on('run:complete', (evt) => {
        if (attempt.id === evt.runId) done(lightning.getResult(attempt.id));
      });
      lightning.enqueueRun(attempt);
    });

    reject is destructured but never called, and there's no setTimeout anywhere in either file (grep -c setTimeout autoinstall.test.ts → 0). So if a run never completes — and autoinstall waits on real npm installs of @openfn/language-*@version — nothing settles the promise and the test sits pending until ava's own timeout kills the process. That would also explain why the count varies with network speed.

    Not sending a PR for it: adding timeouts across the integration harness overlaps whatever is on your fix-ava branch, and I can't verify a fix locally without reproducing the flake itself. Happy to take it on if you'd like it separated from the ava upgrade.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Tech Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions