-
Notifications
You must be signed in to change notification settings - Fork 140
feat(runner): isolate runtime deps to fix workspace monorepo failures #1381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Michael Price (michael-pr)
wants to merge
13
commits into
main
Choose a base branch
from
wiz-10907-potential-incompatibility-with-other-monorepo-and-single
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6e6b2c6
feat(runner): add runtimeEnv managed-deps domain
michael-pr 9b51d57
fix(runner): harden managed runtime readiness checks
michael-pr 225c519
refactor(runner): defer runtime install + share resolveDepsRoot helper
michael-pr 445f49a
refactor(runner): dedupe runtime-deps helpers and extract flowsRun de…
michael-pr e9b905f
feat(runner): support QAWOLF_RUNTIME_DIR to relocate managed runtime
michael-pr 6a5ba87
test(runner): assert resolve() in QAWOLF_RUNTIME_DIR absolute-path case
michael-pr e4722c6
feat(runner): add `install clear` to reset managed runtime cache
michael-pr a7ba8f4
fix(cli): keep install clear confirm on the Clack timeline
michael-pr 7d5bf2e
fix(cli): use arrow-key confirm for destructive prompts
michael-pr e69f87f
fix(cli): show a spinner while clearing the runtime cache
michael-pr 9a37746
fix(runner): resolve flow imports via managed-deps symlink and binary…
michael-pr 0c5813e
fix(runner): use Windows junction for managed-deps symlink and assert…
michael-pr b22b080
fix(runner): isolate per-run staging and guard managed-runtime deletion
michael-pr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { makePeekFlowMeta } from "~/domains/flows/expand.js"; | ||
| import { findFlowStamp as defaultFindFlowStamp } from "~/shell/manifest/lookup.js"; | ||
| import { installBrowserList } from "~/domains/install/browsers.js"; | ||
| import { defaultSpawn } from "~/shell/spawn.js"; | ||
| import { resolvePlaywrightCli } from "~/shell/playwright.js"; | ||
| import { runAndroidFlow as defaultRunAndroidFlow } from "~/domains/runner/runAndroidFlow.js"; | ||
| import { runWebFlow as defaultRunWebFlow } from "~/domains/runner/runWebFlow.js"; | ||
| import { makePooledDispatch } from "~/domains/runner/makePooledDispatch.js"; | ||
| import type { createAndroidDeps } from "~/domains/runner/runAndroidFlowDeps.js"; | ||
| import type { RunWebFlowDeps } from "~/domains/runner/runWebFlow.js"; | ||
| import type { | ||
| FlowsRunDeps, | ||
| FlowsRunFlags, | ||
| } from "~/domains/runner/runInternals.js"; | ||
| import type { CommandContext } from "~/shell/commandContext.js"; | ||
|
|
||
| import { buildRunReporter } from "./buildRunReporter.js"; | ||
|
|
||
| type BuildFlowsRunDepsArgs = { | ||
| ctx: CommandContext; | ||
| resolvedDir: string; | ||
| android: ReturnType<typeof createAndroidDeps>; | ||
| runWebFlowDeps: RunWebFlowDeps; | ||
| flags: FlowsRunFlags; | ||
| }; | ||
|
|
||
| /** | ||
| * Assembles the runner dependency bundle for `flowsRun`. Identical across the | ||
| * local (`flows run`) and hybrid (`--env`) entry points, so both share this | ||
| * single builder. `runWebFlowDeps` is resolved by the caller (it is async and | ||
| * the injection point for tests) and passed in already awaited. | ||
| */ | ||
| export function buildFlowsRunDeps(args: BuildFlowsRunDepsArgs): FlowsRunDeps { | ||
| const { ctx, resolvedDir, android, runWebFlowDeps, flags } = args; | ||
| return { | ||
| peekFlowMeta: makePeekFlowMeta(ctx.fs), | ||
| installBrowsers: (innerCtx, browsers) => | ||
| installBrowserList(innerCtx, browsers, { | ||
| spawn: defaultSpawn, | ||
| platform: process.platform, | ||
| playwrightCliPath: resolvePlaywrightCli(resolvedDir, process.platform), | ||
| }), | ||
| runWebFlow: defaultRunWebFlow, | ||
| runWebFlowDeps, | ||
| runAndroidFlow: defaultRunAndroidFlow, | ||
| runAndroidFlowDeps: android.deps, | ||
| bootAndroid: android.boot, | ||
| shutdownAndroid: android.shutdown, | ||
| createPooledDispatch: makePooledDispatch(resolvedDir), | ||
| findFlowStamp: defaultFindFlowStamp, | ||
| warn: (message) => ctx.ui.warn(message), | ||
| logger: ctx.log("runner"), | ||
| // Route reporter output through ctx.ui so streamed test logs stay inside the run's timeline. | ||
| reporter: buildRunReporter(flags, { | ||
| fs: ctx.fs, | ||
| stdout: { write: (text: string) => ctx.ui.write(text) }, | ||
| stderr: { write: (text: string) => ctx.ui.write(text) }, | ||
| }), | ||
| now: () => Date.now(), | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.