Skip to content

Upgrade local dev to use electric beta.15 #1699

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
merged 1 commit into from
Feb 13, 2025
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
18 changes: 15 additions & 3 deletions apps/webapp/test/realtimeClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
const client = new RealtimeClient({
electricOrigin,
keyPrefix: "test:realtime",
redis: redis.options,
redis: {
host: redis.options.host,
port: redis.options.port,
tlsDisabled: true,
},
expiryTimeInSeconds: 5,
cachedLimitProvider: {
async getCachedLimit() {
Expand Down Expand Up @@ -146,7 +150,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
const client = new RealtimeClient({
electricOrigin,
keyPrefix: "test:realtime",
redis: redis.options,
redis: {
host: redis.options.host,
port: redis.options.port,
tlsDisabled: true,
},
expiryTimeInSeconds: 5,
cachedLimitProvider: {
async getCachedLimit() {
Expand Down Expand Up @@ -225,7 +233,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
const client = new RealtimeClient({
electricOrigin,
keyPrefix: "test:realtime",
redis: redis.options,
redis: {
host: redis.options.host,
port: redis.options.port,
tlsDisabled: true,
},
expiryTimeInSeconds: 5,
cachedLimitProvider: {
async getCachedLimit() {
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ services:
# - "REDIS_CLUSTER_CREATOR=yes"

electric:
image: electricsql/electric:1.0.0-beta.1@sha256:2262f6f09caf5fa45f233731af97b84999128170a9529e5f9b9b53642308493f
image: electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810
restart: always
environment:
DATABASE_URL: postgresql://postgres:postgres@database:5432/postgres?sslmode=disable
Expand Down
2 changes: 1 addition & 1 deletion internal-packages/testcontainers/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function createElectricContainer(
)}:5432/${postgresContainer.getDatabase()}?sslmode=disable`;

const container = await new GenericContainer(
"electricsql/electric:1.0.0-beta.1@sha256:2262f6f09caf5fa45f233731af97b84999128170a9529e5f9b9b53642308493f"
"electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810"
)
.withExposedPorts(3000)
.withNetwork(network)
Expand Down
13 changes: 1 addition & 12 deletions references/nextjs-realtime/src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@ export async function triggerExampleTask() {
id: randomUUID(),
});

const publicToken = await auth.createPublicToken({
scopes: {
read: {
runs: [handle.id],
},
},
expirationTime: "2s",
});

console.log("Setting the run JWT in a cookie", publicToken);

// Set JWT in a secure, HTTP-only cookie
cookies().set("run_token", publicToken);
cookies().set("run_token", handle.publicAccessToken);

// Redirect to the details page
redirect(`/runs/${handle.id}`);
Expand Down