Skip to content

Commit

Permalink
chore(release): Test v7.37.8 (#9900)
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: Matt Krick <[email protected]>
Co-authored-by: snyk-bot <[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: Rafa <[email protected]>
Co-authored-by: Georg Bremer <[email protected]>
Co-authored-by: Bartosz Jarocki <[email protected]>
Co-authored-by: Marcus Wermuth <[email protected]>
Co-authored-by: Jordan Husney <[email protected]>
Co-authored-by: Rafael Romero <[email protected]>
Co-authored-by: Bruce Tian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Dale Bumblis <[email protected]>
Co-authored-by: Mohd Muneeb <[email protected]>
Co-authored-by: Muneeb-Ventures <[email protected]>
Co-authored-by: Terry Acker <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
19 people authored Jun 27, 2024
1 parent 28da6d7 commit ba81227
Show file tree
Hide file tree
Showing 24 changed files with 70 additions and 96 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.37.6"
".": "7.37.8"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).

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

## [7.37.8](https://github.com/ParabolInc/parabol/compare/v7.37.7...v7.37.8) (2024-06-27)


### Fixed

* timeline ordering ([#9898](https://github.com/ParabolInc/parabol/issues/9898)) ([9f5f38c](https://github.com/ParabolInc/parabol/commit/9f5f38c250fbb1d0af4aaed8526c19f0fc6fd111))

## [7.37.7](https://github.com/ParabolInc/parabol/compare/v7.37.6...v7.37.7) (2024-06-27)


### Changed

* **rethinkdb:** TimelineEvent: Phase 3 ([#9876](https://github.com/ParabolInc/parabol/issues/9876)) ([77b56ad](https://github.com/ParabolInc/parabol/commit/77b56ad296bd3ff69f2a8f3440a34a7b5f34c0cf))

## [7.37.6](https://github.com/ParabolInc/parabol/compare/v7.37.5...v7.37.6) (2024-06-27)


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.37.6",
"version": "7.37.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.37.6",
"version": "7.37.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.37.6"
"parabol-server": "7.37.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.37.6",
"version": "7.37.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.37.6",
"version": "7.37.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.37.6",
"version": "7.37.8",
"description": "A Stateless GraphQL Executor",
"author": "Matt Krick <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/gqlExecutor#readme",
Expand All @@ -27,8 +27,8 @@
},
"dependencies": {
"dd-trace": "^4.2.0",
"parabol-client": "7.37.6",
"parabol-server": "7.37.6",
"parabol-client": "7.37.8",
"parabol-server": "7.37.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.37.6",
"version": "7.37.8",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions packages/server/database/rethinkDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import SuggestedActionTryTheDemo from './types/SuggestedActionTryTheDemo'
import Task from './types/Task'
import TemplateDimension from './types/TemplateDimension'
import TemplateScale from './types/TemplateScale'
import TimelineEvent from './types/TimelineEvent'

export type RethinkSchema = {
AgendaItem: {
Expand Down Expand Up @@ -187,10 +186,6 @@ export type RethinkSchema = {
type: TemplateScale
index: 'teamId'
}
TimelineEvent: {
type: TimelineEvent
index: 'userIdCreatedAt' | 'meetingId'
}
}

export type DBType = {
Expand Down
14 changes: 14 additions & 0 deletions packages/server/dataloader/foreignKeyLoaderMakers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,17 @@ export const retroReflectionsByGroupId = foreignKeyLoaderMaker(
.execute()
}
)

export const timelineEventsByMeetingId = foreignKeyLoaderMaker(
'timelineEvents',
'meetingId',
async (meetingIds) => {
const pg = getKysely()
return pg
.selectFrom('TimelineEvent')
.selectAll()
.where('meetingId', 'in', meetingIds)
.where('isActive', '=', true)
.execute()
}
)
4 changes: 4 additions & 0 deletions packages/server/dataloader/primaryKeyLoaderMakers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ export const selectRetroReflections = () =>
export const retroReflections = primaryKeyLoaderMaker((ids: readonly string[]) => {
return selectRetroReflections().where('id', 'in', ids).execute()
})

export const timelineEvents = primaryKeyLoaderMaker((ids: readonly string[]) => {
return getKysely().selectFrom('TimelineEvent').selectAll().where('id', 'in', ids).execute()
})
14 changes: 0 additions & 14 deletions packages/server/dataloader/rethinkForeignKeyLoaderMakers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import TimelineEventCheckinComplete from 'parabol-server/database/types/TimelineEventCheckinComplete'
import TimelineEventRetroComplete from 'parabol-server/database/types/TimelineEventRetroComplete'
import getRethink from '../database/rethinkDriver'
import {RDatum} from '../database/stricterR'
import RethinkForeignKeyLoaderMaker from './RethinkForeignKeyLoaderMaker'
Expand Down Expand Up @@ -182,18 +180,6 @@ export const templateDimensionsByTemplateId = new RethinkForeignKeyLoaderMaker(
)
}
)
export const timelineEventsByMeetingId = new RethinkForeignKeyLoaderMaker(
'timelineEvents',
'meetingId',
async (meetingIds) => {
const r = await getRethink()
return r
.table('TimelineEvent')
.getAll(r.args(meetingIds), {index: 'meetingId'})
.filter({isActive: true})
.run() as Promise<TimelineEventCheckinComplete[] | TimelineEventRetroComplete[]>
}
)

export const slackAuthByUserId = new RethinkForeignKeyLoaderMaker(
'slackAuths',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ export const tasks = new RethinkPrimaryKeyLoaderMaker('Task')
export const teamMembers = new RethinkPrimaryKeyLoaderMaker('TeamMember')
export const teamInvitations = new RethinkPrimaryKeyLoaderMaker('TeamInvitation')
export const templateDimensions = new RethinkPrimaryKeyLoaderMaker('TemplateDimension')
export const timelineEvents = new RethinkPrimaryKeyLoaderMaker('TimelineEvent')
15 changes: 5 additions & 10 deletions packages/server/graphql/mutations/archiveTimelineEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {GraphQLID, GraphQLNonNull} from 'graphql'
import {SubscriptionChannel} from 'parabol-client/types/constEnums'
import TimelineEventCheckinComplete from 'parabol-server/database/types/TimelineEventCheckinComplete'
import TimelineEventRetroComplete from 'parabol-server/database/types/TimelineEventRetroComplete'
import getRethink from '../../database/rethinkDriver'
import {TimelineEventEnum} from '../../database/types/TimelineEvent'
import getKysely from '../../postgres/getKysely'
import {getUserId, isTeamMember} from '../../utils/authorization'
Expand All @@ -25,7 +24,6 @@ const archiveTimelineEvent = {
{timelineEventId}: {timelineEventId: string},
{authToken, dataLoader, socketId: mutatorId}: GQLContext
) => {
const r = await getRethink()
const operationId = dataLoader.share()
const subOptions = {mutatorId, operationId}
const viewerId = getUserId(authToken)
Expand Down Expand Up @@ -59,14 +57,11 @@ const archiveTimelineEvent = {
.load(meetingId)
const eventIds = meetingTimelineEvents.map(({id}) => id)
const pg = getKysely()
await Promise.all([
pg
.updateTable('TimelineEvent')
.set({isActive: false})
.where('id', 'in', eventIds)
.execute(),
r.table('TimelineEvent').getAll(r.args(eventIds)).update({isActive: false}).run()
])
await pg
.updateTable('TimelineEvent')
.set({isActive: false})
.where('id', 'in', eventIds)
.execute()
meetingTimelineEvents.map((event) => {
const {id: timelineEventId, userId} = event
publish(
Expand Down
5 changes: 1 addition & 4 deletions packages/server/graphql/mutations/endCheckIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ export default {
)
const timelineEventId = events[0]!.id
const pg = getKysely()
await Promise.all([
pg.insertInto('TimelineEvent').values(events).execute(),
r.table('TimelineEvent').insert(events).run()
])
await pg.insertInto('TimelineEvent').values(events).execute()
if (team.isOnboardTeam) {
const teamLeadUserId = await r
.table('TeamMember')
Expand Down
5 changes: 1 addition & 4 deletions packages/server/graphql/mutations/endSprintPoker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ export default {
})
)
const pg = getKysely()
await Promise.all([
pg.insertInto('TimelineEvent').values(events).execute(),
r.table('TimelineEvent').insert(events).run()
])
await pg.insertInto('TimelineEvent').values(events).execute()

const data = {
meetingId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ const bootstrapNewUser = async (
)
.insertInto('TimelineEvent')
.values(joinEvent)
.execute(),
r.table('TimelineEvent').insert(joinEvent).run()
.execute()
])

// Identify the user so user properties are set before any events are sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export default async function createTeamAndLeader(user: IUser, newTeam: ValidNew
r.table('MeetingSettings').insert(meetingSettings).run(),
// denormalize common fields to team member
insertNewTeamMember(user, teamId),
r.table('TimelineEvent').insert(timelineEvent).run(),
addTeamIdToTMS(userId, teamId)
])
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ const safeEndRetrospective = async ({
)
const timelineEventId = events[0]!.id
const pg = getKysely()
await Promise.all([
pg.insertInto('TimelineEvent').values(events).execute(),
r.table('TimelineEvent').insert(events).run()
])
await pg.insertInto('TimelineEvent').values(events).execute()

if (team.isOnboardTeam) {
const teamLeadUserId = await r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ const safeEndTeamPrompt = async ({
)
const timelineEventId = events[0]!.id
const pg = getKysely()
await Promise.all([
pg.insertInto('TimelineEvent').values(events).execute(),
r.table('TimelineEvent').insert(events).run()
])
await pg.insertInto('TimelineEvent').values(events).execute()
summarizeTeamPrompt(meeting, context)
analytics.teamPromptEnd(completedTeamPrompt, meetingMembers, responses, dataLoader)
checkTeamsLimit(team.orgId, dataLoader)
Expand Down
12 changes: 1 addition & 11 deletions packages/server/graphql/private/mutations/backupOrganization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,7 @@ const backupOrganization: MutationResolvers['backupOrganization'] = async (_sour
r.or(row('teamId').default(null).eq(null), r(teamIds).contains(row('teamId')))
)
.coerceTo('array')
.do((items: RValue) => r.db(DESTINATION).table('SuggestedAction').insert(items)),
timelineEvent: (
r
.table('TimelineEvent')
.filter((row: RDatum) => r(userIds).contains(row('userId'))) as any
)
.filter((row: RValue) =>
r.branch(row('teamId'), r(teamIds).contains(row('teamId')), true)
)
.coerceTo('array')
.do((items: RValue) => r.db(DESTINATION).table('TimelineEvent').insert(items))
.do((items: RValue) => r.db(DESTINATION).table('SuggestedAction').insert(items))
})
}),
meetingIds: r
Expand Down
6 changes: 0 additions & 6 deletions packages/server/graphql/private/mutations/hardDeleteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ const hardDeleteUser: MutationResolvers['hardDeleteUser'] = async (
.getAll(r.args(teamIds), {index: 'teamId'})
.filter((row: RValue) => row('createdBy').eq(userIdToDelete))
.delete(),
timelineEvent: r
.table('TimelineEvent')
.between([userIdToDelete, r.minval], [userIdToDelete, r.maxval], {
index: 'userIdCreatedAt'
})
.delete(),
agendaItem: r
.table('AgendaItem')
.getAll(r.args(teamIds), {index: 'teamId'})
Expand Down
33 changes: 15 additions & 18 deletions packages/server/graphql/types/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ import {
MAX_RESULT_GROUP_SIZE
} from '../../../client/utils/constants'
import groupReflections from '../../../client/utils/smartGroup/groupReflections'
import getRethink from '../../database/rethinkDriver'
import {RDatum} from '../../database/stricterR'
import MeetingMemberType from '../../database/types/MeetingMember'
import OrganizationType from '../../database/types/Organization'
import OrganizationUserType from '../../database/types/OrganizationUser'
import SuggestedActionType from '../../database/types/SuggestedAction'
import TimelineEvent from '../../database/types/TimelineEvent'
import getKysely from '../../postgres/getKysely'
import {getUserId, isSuperUser, isTeamMember} from '../../utils/authorization'
import getMonthlyStreak from '../../utils/getMonthlyStreak'
import getRedis from '../../utils/getRedis'
Expand Down Expand Up @@ -217,7 +215,6 @@ const User: GraphQLObjectType<any, GQLContext> = new GraphQLObjectType<any, GQLC
{after, first, teamIds, eventTypes},
{authToken, dataLoader}: GQLContext
) => {
const r = await getRethink()
const viewerId = getUserId(authToken)

// VALIDATE
Expand All @@ -244,21 +241,21 @@ const User: GraphQLObjectType<any, GQLContext> = new GraphQLObjectType<any, GQLC
: accessibleTeamIds

if (viewerId !== id && !isSuperUser(authToken)) return null
const dbAfter = after ? new Date(after) : r.maxval
const events = await r
.table('TimelineEvent')
.between([viewerId, r.minval], [viewerId, dbAfter], {
index: 'userIdCreatedAt'
})
.filter({isActive: true})
.filter((t: RDatum<TimelineEvent>) =>
eventTypes ? r.expr(eventTypes).contains(t('type')) : true
)
.filter((t: RDatum) => r.expr(validTeamIds).contains(t('teamId')))
.orderBy(r.desc('createdAt'))
const dbAfter = after ? new Date(after) : new Date('3000-01-01')
const minVal = new Date(0)

const pg = getKysely()
const events = await pg
.selectFrom('TimelineEvent')
.selectAll()
.where('userId', '=', viewerId)
.where((eb) => eb.between('createdAt', minVal, dbAfter))
.where('isActive', '=', true)
.where('teamId', 'in', validTeamIds)
.$if(!!eventTypes, (db) => db.where('type', 'in', eventTypes))
.orderBy('createdAt', 'desc')
.limit(first + 1)
.coerceTo('array')
.run()
.execute()
const edges = events.slice(0, first).map((node) => ({
cursor: node.createdAt,
node
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.37.6",
"version": "7.37.8",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down Expand Up @@ -123,7 +123,7 @@
"oauth-1.0a": "^2.2.6",
"openai": "^4.24.1",
"oy-vey": "^0.12.1",
"parabol-client": "7.37.6",
"parabol-client": "7.37.8",
"pg": "^8.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down

0 comments on commit ba81227

Please sign in to comment.