Skip to content

Commit

Permalink
chore(release): Test v7.50.8 (#10334)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Georg Bremer <[email protected]>
Co-authored-by: Nick O'Ferrall <[email protected]>
Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Krick <[email protected]>
Co-authored-by: Rafael Romero <[email protected]>
Co-authored-by: Rafa <[email protected]>
Co-authored-by: Jordan Husney <[email protected]>
Co-authored-by: Bruce Tian <[email protected]>
Co-authored-by: Terry Acker <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: snyk-bot <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Dale Bumblis <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
16 people authored Oct 10, 2024
1 parent fc2c0e6 commit f3f3519
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.50.7"
".": "7.50.8"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows conventions [outlined here](http://keepachangelog.com/).

## [7.50.8](https://github.com/ParabolInc/parabol/compare/v7.50.7...v7.50.8) (2024-10-10)


### Changed

* **rethinkdb:** TeamInvitation: Phase 2 ([#10326](https://github.com/ParabolInc/parabol/issues/10326)) ([f8486ba](https://github.com/ParabolInc/parabol/commit/f8486bae6feeeb7a69088a864e8277c53d052061))

## [7.50.7](https://github.com/ParabolInc/parabol/compare/v7.50.6...v7.50.7) (2024-10-10)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.50.7",
"version": "7.50.8",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down
4 changes: 2 additions & 2 deletions packages/chronos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chronos",
"version": "7.50.7",
"version": "7.50.8",
"description": "A cron job scheduler",
"author": "Matt Krick <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/chronos#readme",
Expand All @@ -25,6 +25,6 @@
},
"dependencies": {
"cron": "^2.3.1",
"parabol-server": "7.50.7"
"parabol-server": "7.50.8"
}
}
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.50.7",
"version": "7.50.8",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parabol-embedder",
"version": "7.50.7",
"version": "7.50.8",
"description": "A service that computes embedding vectors from Parabol objects",
"author": "Jordan Husney <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/embedder#readme",
Expand Down
6 changes: 3 additions & 3 deletions packages/gql-executor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gql-executor",
"version": "7.50.7",
"version": "7.50.8",
"description": "A Stateless GraphQL Executor",
"author": "Matt Krick <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/gqlExecutor#readme",
Expand All @@ -26,8 +26,8 @@
},
"dependencies": {
"dd-trace": "^4.2.0",
"parabol-client": "7.50.7",
"parabol-server": "7.50.7",
"parabol-client": "7.50.8",
"parabol-server": "7.50.8",
"undici": "^5.26.2"
}
}
2 changes: 1 addition & 1 deletion packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "integration-tests",
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.50.7",
"version": "7.50.8",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <[email protected]> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.50.7",
"version": "7.50.8",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down Expand Up @@ -122,7 +122,7 @@
"oauth-1.0a": "^2.2.6",
"openai": "^4.53.0",
"oy-vey": "^0.12.1",
"parabol-client": "7.50.7",
"parabol-client": "7.50.8",
"pg": "^8.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import {Kysely, PostgresDialect, sql} from 'kysely'
import {r} from 'rethinkdb-ts'
import connectRethinkDB from '../../database/connectRethinkDB'
import getPg from '../getPg'

export async function up() {
await connectRethinkDB()
const pg = new Kysely<any>({
dialect: new PostgresDialect({
pool: getPg()
})
})

try {
console.log('Adding index')
await r
.table('TeamInvitation')
.indexCreate('updatedAtId', (row: any) => [row('expiresAt'), row('id')])
.run()
await r.table('TeamInvitation').indexWait().run()
} catch {
// index already exists
}

console.log('Adding index complete')

const MAX_PG_PARAMS = 65545
const PG_COLS = [
'id',
'acceptedAt',
'acceptedBy',
'createdAt',
'expiresAt',
'email',
'invitedBy',
'isMassInvite',
'meetingId',
'teamId',
'token'
] as const
type TeamInvitation = {
[K in (typeof PG_COLS)[number]]: any
}
const BATCH_SIZE = Math.trunc(MAX_PG_PARAMS / PG_COLS.length)

let curUpdatedAt = new Date()
let curId = r.minval

const insertRow = async (row) => {
try {
await pg
.insertInto('TeamInvitation')
.values(row)
.onConflict((oc) => oc.doNothing())
.execute()
} catch (e) {
if (e.constraint === 'fk_teamId') {
console.log('TeamInvitation has no team, skipping insert', row.id)
return
}
if (e.constraint === 'fk_meetingId') {
console.log('TeamInvitation has no meeting, skipping insert', row.id)
return
}
if (e.constraint === 'fk_acceptedBy') {
console.log('TeamInvitation has no acceptedBy user, skipping insert', row.id)
return
}
if (e.constraint === 'fk_invitedBy') {
console.log('TeamInvitation has no invitedBy user, skipping insert', row.id)
return
}
throw e
}
}
for (let i = 0; i < 1e6; i++) {
console.log('inserting row', i * BATCH_SIZE, String(curUpdatedAt), String(curId))
const rawRowsToInsert = (await r
.table('TeamInvitation')
.between([curUpdatedAt, curId], [r.maxval, r.maxval], {
index: 'updatedAtId',
leftBound: 'open',
rightBound: 'closed'
})
.orderBy({index: 'updatedAtId'})
.limit(BATCH_SIZE)
.pluck(...PG_COLS)
.run()) as TeamInvitation[]

const rowsToInsert = rawRowsToInsert.map((row) => {
const {
id,
acceptedAt,
acceptedBy,
createdAt,
expiresAt,
email,
invitedBy,
isMassInvite,
meetingId,
teamId,
token
} = row as any
return {
id,
acceptedAt,
acceptedBy,
createdAt,
expiresAt,
email,
invitedBy,
isMassInvite,
meetingId,
teamId,
token
}
})

if (rowsToInsert.length === 0) break
const lastRow = rowsToInsert[rowsToInsert.length - 1]
curUpdatedAt = lastRow.expiresAt
curId = lastRow.id
await Promise.all(rowsToInsert.map(async (row) => insertRow(row)))
}
}

export async function down() {
const pg = new Kysely<any>({
dialect: new PostgresDialect({
pool: getPg()
})
})
await sql`TRUNCATE TABLE "TeamInvitation" CASCADE`.execute(pg)
}

0 comments on commit f3f3519

Please sign in to comment.