Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/deploy-relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ on:
branches:
- main
# Redeploys main after a variable or secret change. Alchemy redeploys the
# Worker when a value it reads changes, so force is rarely needed, and it
# replaces the Postgres runtime role (alchemy-run/alchemy#1832).
# Worker when a value it reads changes, so force is rarely needed.
workflow_dispatch:
inputs:
force:
description: Redeploy every resource, including ones with no detected changes. Replaces the Postgres runtime role.
description: Redeploy every resource, including ones with no detected changes.
type: boolean
default: false

Expand Down
4 changes: 1 addition & 3 deletions docs/operations/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ Required `production` environment secrets:

After changing a variable or secret, run the **Deploy T3 Connect relay** workflow manually from
`main` with **force** unchecked. Alchemy compares the values the Worker reads and redeploys it when
one changed. Check **force** only to redeploy resources with no detected change: a forced run also
replaces the Postgres runtime role and its password
([alchemy-run/alchemy#1832](https://github.com/alchemy-run/alchemy/issues/1832)).
one changed. Check **force** only to redeploy resources with no detected change.

The account-scoped repository credentials are consumed by Alchemy while provisioning relay stages; they
are not bound into the relay Worker. The production deployment uses an Axiom personal access token,
Expand Down
8 changes: 4 additions & 4 deletions infra/relay/alchemy.run.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// @effect-diagnostics anyUnknownInErrorContext:off layerMergeAllWithDependencies:off - Alchemy provider helpers expose framework-owned any requirements.
import * as Alchemy from "alchemy";
import * as Output from "alchemy/Output";
import * as Axiom from "alchemy/Axiom";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Drizzle from "alchemy/Drizzle";
import * as Axiom from "@alchemy.run/axiom";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Drizzle from "@alchemy.run/drizzle";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Planetscale from "alchemy/Planetscale";
import * as Planetscale from "@alchemy.run/planetscale";

import { PublishClientConfig, tokenDigest } from "./src/clientConfig.ts";
import * as RelayDb from "./src/db.ts";
Expand Down
6 changes: 5 additions & 1 deletion infra/relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@alchemy.run/axiom": "catalog:",
"@alchemy.run/cloudflare": "catalog:",
"@alchemy.run/drizzle": "catalog:",
"@alchemy.run/planetscale": "catalog:",
"@clerk/backend": "catalog:",
"@distilled.cloud/cloudflare": "catalog:",
"@effect/sql-pg": "catalog:",
Expand All @@ -21,7 +25,7 @@
"@t3tools/client-runtime": "workspace:*",
"@t3tools/contracts": "workspace:*",
"@t3tools/shared": "workspace:*",
"alchemy": "2.0.0-beta.80",
"alchemy": "catalog:",
"drizzle-orm": "1.0.0-rc.5-ab785fc",
"effect": "catalog:"
},
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/agentActivity/ApnsDeliveryQueue.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as NodeCryptoLayer from "@effect/platform-node/NodeCrypto";
import { describe, expect, it } from "@effect/vitest";
import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Redacted from "effect/Redacted";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/agentActivity/ApnsDeliveryQueue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Crypto from "effect/Crypto";
import * as Context from "effect/Context";
import * as DateTime from "effect/DateTime";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/agentActivity/FcmDeliveries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Layer from "effect/Layer";
import * as Redacted from "effect/Redacted";
import * as Schema from "effect/Schema";
import * as Stream from "effect/Stream";
import type * as Cloudflare from "alchemy/Cloudflare";
import type * as Cloudflare from "@alchemy.run/cloudflare";
import * as FcmDeliveryQueueConsumer from "./FcmDeliveryQueueConsumer.ts";

import * as RelayConfiguration from "../Config.ts";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/agentActivity/FcmDeliveryQueueConsumer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as Cloudflare from "alchemy/Cloudflare";
import type * as Cloudflare from "@alchemy.run/cloudflare";
import * as Effect from "effect/Effect";

import * as FcmDeliveries from "./FcmDeliveries.ts";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/agentActivity/FcmDeliveryQueueSender.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as Cloudflare from "alchemy/Cloudflare";
import type * as Cloudflare from "@alchemy.run/cloudflare";
import * as Context from "effect/Context";
import type * as Effect from "effect/Effect";

Expand Down
6 changes: 3 additions & 3 deletions infra/relay/src/db.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PgClient } from "@effect/sql-pg/PgClient";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Drizzle from "alchemy/Drizzle";
import * as Planetscale from "alchemy/Planetscale";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Drizzle from "@alchemy.run/drizzle";
import * as Planetscale from "@alchemy.run/planetscale";
import * as Alchemy from "alchemy";
import * as RemovalPolicy from "alchemy/RemovalPolicy";
import type { EffectPgDatabase } from "drizzle-orm/effect-postgres";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as NodeServices from "@effect/platform-node/NodeServices";

import { describe, expect, it } from "@effect/vitest";
import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
import * as Fiber from "effect/Fiber";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/environments/ManagedEndpointProvider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as CloudflareRetry from "@distilled.cloud/cloudflare/Retry";
import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Arr from "effect/Array";
import * as Cause from "effect/Cause";
import * as Clock from "effect/Clock";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/hooks/HookInboxObject.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as SqliteClient from "@effect/sql-sqlite-do/SqliteClient";
import type * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Clock from "effect/Clock";
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/monitoring.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Alchemy from "alchemy";
import * as Axiom from "alchemy/Axiom";
import * as Axiom from "@alchemy.run/axiom";
import * as Output from "alchemy/Output";
import * as Config from "effect/Config";
import * as Effect from "effect/Effect";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/observability.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Alchemy from "alchemy";
import * as Axiom from "alchemy/Axiom";
import * as Axiom from "@alchemy.run/axiom";
import * as Output from "alchemy/Output";
import * as Cause from "effect/Cause";
import * as Effect from "effect/Effect";
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/queues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";

export const RelayApnsDeliveryDeadLetterQueue = Cloudflare.Queues.Queue(
"RelayApnsDeliveryDeadLetterQueue",
Expand Down
10 changes: 5 additions & 5 deletions infra/relay/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Alchemy from "alchemy";
import * as Axiom from "alchemy/Axiom";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Drizzle from "alchemy/Drizzle/Postgres";
import * as Axiom from "@alchemy.run/axiom";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Drizzle from "@alchemy.run/drizzle/Postgres";
import * as Config from "effect/Config";
import * as Cause from "effect/Cause";
import * as DateTime from "effect/DateTime";
Expand Down Expand Up @@ -170,8 +170,8 @@ export const layer = Api.make(
const cloudMintPublicKey = yield* cloudMintKeyPair.publicKey;
const hyperdrive = yield* Cloudflare.Hyperdrive.Connect(yield* RelayDb.RelayHyperdrive);
// Named statements collide behind Hyperdrive transaction pooling (Effect-TS/effect#8320); use unnamed statements.
const db = yield* Drizzle.Postgres(hyperdrive.connectionString, undefined, {
prepare: false,
const db = yield* Drizzle.Postgres(hyperdrive.connectionString, {
client: { prepare: false },
});

const managedEndpointTunnelBinding = yield* Cloudflare.Tunnel.ReadWriteTunnel();
Expand Down
2 changes: 1 addition & 1 deletion infra/relay/src/zone.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Alchemy from "alchemy";
import { adopt } from "alchemy/AdoptPolicy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Config from "effect/Config";
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
Expand Down
4 changes: 2 additions & 2 deletions infra/task-cache/alchemy.run.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { adopt } from "alchemy/AdoptPolicy";
import * as Alchemy from "alchemy";
import * as Axiom from "alchemy/Axiom";
import * as Axiom from "@alchemy.run/axiom";
import * as Layer from "effect/Layer";
import { Observability } from "./src/observability.ts";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Effect from "effect/Effect";
import * as Secrets from "alchemy/Secrets";
import { WriterSecrets } from "./src/deploymentConfig.ts";
Expand Down
4 changes: 3 additions & 1 deletion infra/task-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"writers": "node scripts/manage.ts"
},
"dependencies": {
"alchemy": "2.0.0-beta.80",
"@alchemy.run/axiom": "catalog:",
"@alchemy.run/cloudflare": "catalog:",
"alchemy": "catalog:",
"effect": "catalog:",
"jose": "catalog:"
},
Expand Down
2 changes: 1 addition & 1 deletion infra/task-cache/src/observability.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Axiom from "alchemy/Axiom";
import * as Axiom from "@alchemy.run/axiom";
import * as Output from "alchemy/Output";
import * as Effect from "effect/Effect";
import { cacheName } from "./resources.ts";
Expand Down
2 changes: 1 addition & 1 deletion infra/task-cache/src/resources.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Alchemy from "alchemy";
import { adopt } from "alchemy/AdoptPolicy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import { retain } from "alchemy/RemovalPolicy";
import * as Effect from "effect/Effect";
import * as NodeURL from "node:url";
Expand Down
4 changes: 2 additions & 2 deletions infra/task-cache/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Axiom from "alchemy/Axiom";
import * as Axiom from "@alchemy.run/axiom";
import { Observability } from "./observability.ts";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Config from "effect/Config";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
Expand Down
110 changes: 0 additions & 110 deletions patches/alchemy@2.0.0-beta.80.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patches/alchemy@2.0.0-beta.84.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/Test/Vitest.js b/lib/Test/Vitest.js
index 48cce71..ae67044 100644
--- a/lib/Test/Vitest.js
+++ b/lib/Test/Vitest.js
@@ -3,7 +3,7 @@ import { it } from "@effect/vitest";
import * as Effect from "effect/Effect";
import * as Exit from "effect/Exit";
import * as Scope from "effect/Scope";
-import { afterAll as vitestAfterAll, afterEach as vitestAfterEach, beforeAll as vitestBeforeAll, beforeEach as vitestBeforeEach, } from "vitest";
+import { afterAll as vitestAfterAll, afterEach as vitestAfterEach, beforeAll as vitestBeforeAll, beforeEach as vitestBeforeEach, } from "vite-plus/test";
import * as Core from "./Core.js";
export { executeWhenReady, getWhenReady, guardContentType, guardedFetchLayer, rpcClientLayer, WorkerNotReady, } from "./Http.js";
export const defaultStage = Core.defaultStage;
Loading
Loading