Skip to content

Commit

Permalink
Support node v20 on pds distribution (#2157)
Browse files Browse the repository at this point in the history
* upgrade node to v20, better-sqlite3 to v9

* fix tests, deps for node v20

* build

* add io_uring setting to pds dockerfile
  • Loading branch information
devinivy authored Feb 10, 2024
1 parent 758de87 commit d0be052
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push-pds-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- pds-pipethrough
- pds-node-v20
env:
REGISTRY: ghcr.io
USERNAME: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@did-plc/lib": "^0.0.1",
"@did-plc/server": "^0.0.1",
"axios": "^0.27.2",
"better-sqlite3": "^7.6.2",
"better-sqlite3": "^9.4.0",
"chalk": "^5.0.1",
"dotenv": "^16.0.3",
"express": "^4.18.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/pds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@atproto/xrpc": "workspace:^",
"@atproto/xrpc-server": "workspace:^",
"@did-plc/lib": "^0.0.4",
"better-sqlite3": "^7.6.2",
"better-sqlite3": "^9.4.0",
"bytes": "^3.1.2",
"compression": "^1.7.4",
"cors": "^2.8.5",
Expand Down Expand Up @@ -77,7 +77,7 @@
"@atproto/bsky": "workspace:^",
"@atproto/dev-env": "workspace:^",
"@atproto/lex-cli": "workspace:^",
"@atproto/pds-entryway": "npm:@atproto/[email protected].2",
"@atproto/pds-entryway": "npm:@atproto/[email protected].3",
"@did-plc/server": "^0.0.1",
"@types/cors": "^2.8.12",
"@types/disposable-email": "^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/tests/crud.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ describe('crud operations', () => {
record: {
text: 'x',
createdAt: new Date().toISOString(),
deepObject: createDeepObject(4000),
deepObject: createDeepObject(3000),
},
}),
)
Expand Down
4 changes: 4 additions & 0 deletions packages/pds/tests/entryway.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,17 @@ const createEntryway = async (
bskyAppViewCdnUrlPattern: 'http://cdn.appview.com/%s/%s/%s',
jwtSecret: randomStr(8, 'base32'),
repoSigningKeyK256PrivateKeyHex: await getPrivateHex(signingKey),
modServiceUrl: 'https://mod.invalid',
modServiceDid: 'did:example:invalid',
...config,
}
const cfg = pdsEntryway.envToCfg(env)
const secrets = pdsEntryway.envToSecrets(env)
const server = await pdsEntryway.PDS.create(cfg, secrets)
await server.ctx.db.migrateToLatestOrThrow()
await server.start()
// @TODO temp hack because entryway teardown calls signupActivator.run() by mistake
server.ctx.signupActivator.run = server.ctx.signupActivator.destroy
return server
}

Expand Down
4 changes: 4 additions & 0 deletions packages/pds/tests/transfer-repo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,17 @@ const createEntryway = async (
bskyAppViewCdnUrlPattern: 'http://cdn.appview.com/%s/%s/%s',
jwtSecret: randomStr(8, 'base32'),
repoSigningKeyK256PrivateKeyHex: await getPrivateHex(signingKey),
modServiceUrl: 'https://mod.invalid',
modServiceDid: 'did:example:invalid',
...config,
}
const cfg = pdsEntryway.envToCfg(env)
const secrets = pdsEntryway.envToSecrets(env)
const server = await pdsEntryway.PDS.create(cfg, secrets)
await server.ctx.db.migrateToLatestOrThrow()
await server.start()
// @TODO temp hack because entryway teardown calls signupActivator.run() by mistake
server.ctx.signupActivator.run = server.ctx.signupActivator.destroy
return server
}

Expand Down
Loading

0 comments on commit d0be052

Please sign in to comment.