Skip to content

Commit

Permalink
chore(release): Test v7.30.3 (#9725)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Co-authored-by: Rafa <101704572+rafaelromcar-parabol@users.noreply.github.com>
Co-authored-by: Georg Bremer <github@dschoordsch.de>
Co-authored-by: Nick O'Ferrall <nickoferrall@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Krick <matt.krick@gmail.com>
Co-authored-by: Jordan Husney <jordan.husney@gmail.com>
Co-authored-by: adaniels-parabol <71724289+adaniels-parabol@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Dale Bumblis <135627447+dbumblis-parabol@users.noreply.github.com>
Co-authored-by: Bartosz Jarocki <jarocki.bartek@gmail.com>
Co-authored-by: Marcus Wermuth <hello@marcuswermuth.com>
Co-authored-by: Rafael Romero <rafael@parabol.co>
Co-authored-by: Bruce Tian <tianrunhe@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Mohd Muneeb <mr.mohdmuneeb123@gmail.com>
Co-authored-by: Muneeb-Ventures <mohd.muneeb@m0.ventures>
Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
19 people authored May 7, 2024
1 parent 614333c commit 40e5c1b
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 81 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.30.2"
".": "7.30.3"
}
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.30.3](https://github.com/ParabolInc/parabol/compare/v7.30.2...v7.30.3) (2024-05-07)


### Changed

* Add some processRecurrence tracing ([#9723](https://github.com/ParabolInc/parabol/issues/9723)) ([6c4369d](https://github.com/ParabolInc/parabol/commit/6c4369dd2648611883e09f7353c03d9d24ff1b84))

## [7.30.2](https://github.com/ParabolInc/parabol/compare/v7.30.1...v7.30.2) (2024-05-07)


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. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.30.2",
"version": "7.30.3",
"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.30.2",
"version": "7.30.3",
"description": "A cron job scheduler",
"author": "Matt Krick <matt.krick@gmail.com>",
"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.30.2"
"parabol-server": "7.30.3"
}
}
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. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.30.2",
"version": "7.30.3",
"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.30.2",
"version": "7.30.3",
"description": "A service that computes embedding vectors from Parabol objects",
"author": "Jordan Husney <jordan.husney@gmail.com>",
"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.30.2",
"version": "7.30.3",
"description": "A Stateless GraphQL Executor",
"author": "Matt Krick <matt.krick@gmail.com>",
"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.30.2",
"parabol-server": "7.30.2",
"parabol-client": "7.30.3",
"parabol-server": "7.30.3",
"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. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.30.2",
"version": "7.30.3",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
148 changes: 79 additions & 69 deletions packages/server/graphql/private/mutations/processRecurrence.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import tracer from 'dd-trace'
import ms from 'ms'
import {getJSDateFromRRuleDate, getRRuleDateFromJSDate} from 'parabol-client/shared/rruleUtil'
import {SubscriptionChannel} from 'parabol-client/types/constEnums'
Expand Down Expand Up @@ -129,18 +130,20 @@ const processRecurrence: MutationResolvers['processRecurrence'] = async (_source
.between([false, r.minval], [false, now], {index: 'hasEndedScheduledEndTime'})
.run()

const res = await Promise.all(
meetingsToEnd.map((meeting) => {
if (isMeetingTeamPrompt(meeting)) {
return safeEndTeamPrompt({meeting, now, context, r, subOptions})
} else if (isMeetingRetrospective(meeting)) {
return safeEndRetrospective({meeting, now, context})
} else {
return standardError(new Error('Unhandled recurring meeting type'), {
tags: {meetingId: meeting.id, meetingType: meeting.meetingType}
})
}
})
const res = await tracer.trace('processRecurrence.endMeetings', async () =>
Promise.all(
meetingsToEnd.map((meeting) => {
if (isMeetingTeamPrompt(meeting)) {
return safeEndTeamPrompt({meeting, now, context, r, subOptions})
} else if (isMeetingRetrospective(meeting)) {
return safeEndRetrospective({meeting, now, context})
} else {
return standardError(new Error('Unhandled recurring meeting type'), {
tags: {meetingId: meeting.id, meetingType: meeting.meetingType}
})
}
})
)
)

const meetingsEnded = res.filter((res) => !('error' in res)).length
Expand All @@ -149,64 +152,71 @@ const processRecurrence: MutationResolvers['processRecurrence'] = async (_source

// For each active meeting series, get the meeting start times (according to rrule) after the most
// recent meeting start time and before now.
const activeMeetingSeries = await getActiveMeetingSeries()
await Promise.allSettled(
activeMeetingSeries.map(async (meetingSeries) => {
const seriesTeam = await dataLoader.get('teams').loadNonNull(meetingSeries.teamId)
if (seriesTeam.isArchived || !seriesTeam.isPaid) {
return
}

const [seriesOrg, lastMeeting] = await Promise.all([
dataLoader.get('organizations').load(seriesTeam.orgId),
dataLoader.get('lastMeetingByMeetingSeriesId').load(meetingSeries.id)
])

// remove this check after 2024-05-05
if (
lastMeeting?.meetingSeriesId !== meetingSeries.id ||
lastMeeting.teamId !== meetingSeries.teamId
) {
const error = new Error(
'lastMeetingByMeetingSeriesId returned a meeting that does not match the series'
)
sendToSentry(error)
throw error
}

if (seriesOrg.lockedAt) {
return
}

// For meetings that should still be active, start the meeting and set its end time.
// Any subscriptions are handled by the shared meeting start code
const rrule = RRule.fromString(meetingSeries.recurrenceRule)
// technically, RRULE should never return NaN here but there's a bug in the library
// https://github.com/jakubroztocil/rrule/issues/321
if (isNaN(rrule.options.interval)) {
return
}

// Only get meetings that should currently be active, i.e. meetings that should have started
// within the last 24 hours, started after the last meeting in the series, and started before
// 'now'.
const fromDate = lastMeeting
? new Date(Math.max(lastMeeting.createdAt.getTime() + ms('10m'), now.getTime() - ms('24h')))
: new Date(0)
const newMeetingsStartTimes = rrule.between(
getRRuleDateFromJSDate(fromDate),
getRRuleDateFromJSDate(now)
)
for (const startTime of newMeetingsStartTimes) {
const err = await startRecurringMeeting(
meetingSeries,
getJSDateFromRRuleDate(startTime),
dataLoader,
subOptions
const activeMeetingSeries = await tracer.trace(
'processRecurrence.getActiveMeetingSeries',
getActiveMeetingSeries
)
await tracer.trace('processRecurrence.startActiveMeetingSeries', async () =>
Promise.allSettled(
activeMeetingSeries.map(async (meetingSeries) => {
const seriesTeam = await dataLoader.get('teams').loadNonNull(meetingSeries.teamId)
if (seriesTeam.isArchived || !seriesTeam.isPaid) {
return
}

const [seriesOrg, lastMeeting] = await Promise.all([
dataLoader.get('organizations').load(seriesTeam.orgId),
dataLoader.get('lastMeetingByMeetingSeriesId').load(meetingSeries.id)
])

// remove this check after 2024-05-05
if (
lastMeeting?.meetingSeriesId !== meetingSeries.id ||
lastMeeting.teamId !== meetingSeries.teamId
) {
const error = new Error(
'lastMeetingByMeetingSeriesId returned a meeting that does not match the series'
)
sendToSentry(error)
throw error
}

if (seriesOrg.lockedAt) {
return
}

// For meetings that should still be active, start the meeting and set its end time.
// Any subscriptions are handled by the shared meeting start code
const rrule = RRule.fromString(meetingSeries.recurrenceRule)
// technically, RRULE should never return NaN here but there's a bug in the library
// https://github.com/jakubroztocil/rrule/issues/321
if (isNaN(rrule.options.interval)) {
return
}

// Only get meetings that should currently be active, i.e. meetings that should have started
// within the last 24 hours, started after the last meeting in the series, and started before
// 'now'.
const fromDate = lastMeeting
? new Date(
Math.max(lastMeeting.createdAt.getTime() + ms('10m'), now.getTime() - ms('24h'))
)
: new Date(0)
const newMeetingsStartTimes = rrule.between(
getRRuleDateFromJSDate(fromDate),
getRRuleDateFromJSDate(now)
)
if (!err) meetingsStarted++
}
})
for (const startTime of newMeetingsStartTimes) {
const err = await startRecurringMeeting(
meetingSeries,
getJSDateFromRRuleDate(startTime),
dataLoader,
subOptions
)
if (!err) meetingsStarted++
}
})
)
)

const data = {meetingsStarted, meetingsEnded}
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. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "7.30.2",
"version": "7.30.3",
"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.30.2",
"parabol-client": "7.30.3",
"pg": "^8.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down

0 comments on commit 40e5c1b

Please sign in to comment.