Repository navigation
fix(relay): production deploys no longer hang while computing the plan #30513
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
Merged
+76
−38
Merged
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| diff --git a/lib/Schema.js b/lib/Schema.js | ||
| index c24265b3c23237d846c7b8ff249cb6c23452ec31..744c7bce4de464d472b183b3c9c25987b67b3a5e 100644 | ||
| --- a/lib/Schema.js | ||
| +++ b/lib/Schema.js | ||
| @@ -7,6 +7,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte | ||
| return path; | ||
| }; | ||
| import * as crypto from "node:crypto"; | ||
| +import * as NodePath from "node:path"; | ||
| import * as Artifacts from "alchemy/Artifacts"; | ||
| import { isResolved } from "alchemy/Diff"; | ||
| import { Interaction } from "alchemy/Interaction"; | ||
| @@ -150,7 +151,9 @@ Effect.tryPromise({ | ||
| // A `drizzle-kit/cli` command as an Effect, failing on a thrown or reported error. | ||
| const command = (name) => Effect.fn(`drizzleKit.${name}`)(function* (options) { | ||
| const cli = yield* importModule("drizzle-kit/cli"); | ||
| - const result = yield* callDrizzleKit(name, () => cli[name](options)); | ||
| + // drizzle-kit reads snapshots as `./${path}`, which breaks an absolute `out`. | ||
| + const kitOptions = { ...options, out: NodePath.relative(process.cwd(), options.out) || "." }; | ||
| + const result = yield* callDrizzleKit(name, () => cli[name](kitOptions)); | ||
| if (result.status === "error") { | ||
| return yield* new DrizzleKitFailed({ command: name, cause: result.error }); | ||
| } | ||
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,15 @@ | ||
| diff --git a/lib/Artifacts.js b/lib/Artifacts.js | ||
| index 648209c089f984dc45bd5eba0788130c9813a1d6..c66b5433427498ced6c91ee7c371ad8295f6205a 100644 | ||
| --- a/lib/Artifacts.js | ||
| +++ b/lib/Artifacts.js | ||
| @@ -81,8 +81,8 @@ export const cached = (id) => (eff) => Effect.gen(function* () { | ||
| return cached; | ||
| } | ||
| yield* artifacts.set(id, Deferred.await(deferred)); | ||
| - const result = yield* eff; | ||
| - yield* Deferred.succeed(deferred, result); | ||
| + // Settle waiters on failure too, or every later caller hangs. | ||
| + const result = yield* eff.pipe(Effect.onExit((exit) => Deferred.done(deferred, exit))); | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| yield* artifacts.set(id, result); | ||
| return result; | ||
| }); | ||
Oops, something went wrong.
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.