Skip to content

Commit 2c67d7d

Browse files
authored
Merge pull request #476 from cipherstash/fix/pin-eql-version
fix: pin EQL install scripts and migrate the bench CI to the postgres-eql image
2 parents 8daf4e3 + c8622e9 commit 2c67d7d

10 files changed

Lines changed: 20 additions & 64 deletions

File tree

.github/workflows/tests-bench.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
- name: Build @cipherstash/stack
5353
run: pnpm exec turbo run build --filter @cipherstash/stack
5454

55-
# Builds the local EQL-enabled Postgres image (local/Dockerfile),
56-
# starts it, and waits for the pg_isready healthcheck to pass.
55+
# Starts the pinned postgres-eql container (PostgreSQL 17 + EQL
56+
# pre-installed) via local/docker-compose.yml; waits for healthcheck.
5757
- name: Start local Postgres (EQL)
5858
working-directory: local
5959
run: docker compose up --wait --wait-timeout 60

local/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

local/create-ci-table.sql

Lines changed: 0 additions & 9 deletions
This file was deleted.

local/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
22
postgres: &postgres
3-
build:
4-
context: .
5-
dockerfile: Dockerfile
3+
# PostgreSQL 17 with CipherStash EQL pre-installed (official image).
4+
# Pinned by tag — bump in lockstep with the EQL version the code targets.
5+
image: ghcr.io/cipherstash/postgres-eql:17-2.2.1
66
environment:
77
PGPORT: 5432
88
POSTGRES_DB: "cipherstash"

local/postgres-entrypoint.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

packages/cli/src/installer/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import { existsSync, readFileSync } from 'node:fs'
22
import { dirname, join, resolve } from 'node:path'
33
import pg from 'pg'
44

5+
// EQL release, pinned to match the EQL payload format this package emits.
6+
// Bump in lockstep with @cipherstash/protect-ffi.
7+
const EQL_VERSION = 'eql-2.2.1'
58
const EQL_INSTALL_URL =
6-
'https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt.sql'
9+
`https://github.com/cipherstash/encrypt-query-language/releases/download/${EQL_VERSION}/cipherstash-encrypt.sql`
710
const EQL_INSTALL_NO_OPERATOR_FAMILY_URL =
8-
'https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt-supabase.sql'
11+
`https://github.com/cipherstash/encrypt-query-language/releases/download/${EQL_VERSION}/cipherstash-encrypt-supabase.sql`
912
const EQL_SCHEMA_NAME = 'eql_v2'
1013

1114
/**

packages/drizzle/GENERATE_EQL_MIGRATION_CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Or use your custom migration workflow.
9898
### Before (manual):
9999
```bash
100100
npx drizzle-kit generate --custom --name=install-eql
101-
curl -sL https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt.sql > drizzle/0001_install-eql.sql
101+
curl -sL https://github.com/cipherstash/encrypt-query-language/releases/download/eql-2.2.1/cipherstash-encrypt.sql > drizzle/0001_install-eql.sql
102102
npx drizzle-kit migrate
103103
```
104104

packages/drizzle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you prefer to install EQL manually:
6464

6565
```bash
6666
npx drizzle-kit generate --custom --name=install-eql
67-
curl -sL https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt.sql > drizzle/0001_install-eql.sql
67+
curl -sL https://github.com/cipherstash/encrypt-query-language/releases/download/eql-2.2.1/cipherstash-encrypt.sql > drizzle/0001_install-eql.sql
6868
npx drizzle-kit migrate
6969
```
7070

packages/drizzle/src/bin/generate-eql-migration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import { readdir } from 'node:fs/promises'
44
import { join, resolve } from 'node:path'
55
import { detectRunner } from './runner.js'
66

7+
// EQL release, pinned to match the EQL payload format this package emits.
8+
// Bump in lockstep with @cipherstash/protect-ffi.
9+
const EQL_VERSION = 'eql-2.2.1'
710
const EQL_INSTALL_URL =
8-
'https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt.sql'
11+
`https://github.com/cipherstash/encrypt-query-language/releases/download/${EQL_VERSION}/cipherstash-encrypt.sql`
912

1013
type CliArgs = {
1114
migrationName: string

packages/protect/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,17 +814,17 @@ CREATE TABLE users (
814814

815815
To enable searchable encryption in PostgreSQL, [install the EQL custom types and functions](https://github.com/cipherstash/encrypt-query-language?tab=readme-ov-file#installation).
816816

817-
1. Download the latest EQL install script:
817+
1. Download the EQL install script. The version is pinned to match this release of Protect.js — install exactly this version:
818818

819819
```sh
820-
curl -sLo cipherstash-encrypt.sql https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt.sql
820+
curl -sLo cipherstash-encrypt.sql https://github.com/cipherstash/encrypt-query-language/releases/download/eql-2.2.1/cipherstash-encrypt.sql
821821
```
822822

823823
Using [Supabase](https://supabase.com/)? We ship an EQL release specifically for Supabase.
824-
Download the latest EQL install script:
824+
Download the matching Supabase EQL install script:
825825

826826
```sh
827-
curl -sLo cipherstash-encrypt-supabase.sql https://github.com/cipherstash/encrypt-query-language/releases/latest/download/cipherstash-encrypt-supabase.sql
827+
curl -sLo cipherstash-encrypt-supabase.sql https://github.com/cipherstash/encrypt-query-language/releases/download/eql-2.2.1/cipherstash-encrypt-supabase.sql
828828
```
829829

830830
2. Run this command to install the custom types and functions:

0 commit comments

Comments
 (0)