Skip to content

Commit

Permalink
chore(release): Test and deploy to Production v8.25.4 (#10857)
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: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>
Co-authored-by: Georg Bremer <[email protected]>
Co-authored-by: Nick O'Ferrall <[email protected]>
Co-authored-by: Terry Acker <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Bruce Tian <[email protected]>
Co-authored-by: Rafa <[email protected]>
Co-authored-by: Sven Seeberg <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smruti Ranjan Badatya <[email protected]>
Co-authored-by: Jordan Husney <[email protected]>
Co-authored-by: Smruti Ranjan Badatya <[email protected]>
Co-authored-by: Hemant Kumar Singh <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
17 people authored Feb 12, 2025
1 parent 5957572 commit b9f5ff9
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 111 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 @@
{
".": "8.25.3"
".": "8.25.4"
}
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/).

## [8.25.4](https://github.com/ParabolInc/parabol/compare/v8.25.3...v8.25.4) (2025-02-12)


### Fixed

* delay cleaning user presence ([#10855](https://github.com/ParabolInc/parabol/issues/10855)) ([b208f89](https://github.com/ParabolInc/parabol/commit/b208f89557a852e3b259d4076e6b5007ca0f2bfc))

## [8.25.3](https://github.com/ParabolInc/parabol/compare/v8.25.2...v8.25.3) (2025-02-11)


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": "8.25.3",
"version": "8.25.4",
"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": "8.25.3",
"version": "8.25.4",
"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": "8.25.3"
"parabol-server": "8.25.4"
}
}
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": "8.25.3",
"version": "8.25.4",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface AuthToken {
sub: string
tms: string[]
rol?: 'su' | 'impersonate'
rol?: 'su' | 'impersonate' | null
bet?: 1
iat: number
iss: string
Expand Down
5 changes: 2 additions & 3 deletions packages/client/types/reactHTML4.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import 'react'

declare module 'react' {
export interface TdHTMLAttributes<T> {
interface TdHTMLAttributes<T> {
height?: string | number
width?: string | number
bgcolor?: string
}
export interface TableHTMLAttributes<T> {
interface TableHTMLAttributes<T> {
align?: 'center' | 'left' | 'right'
bgcolor?: string
height?: string | number
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DataLoaderInstance} from '../server/dataloader/RootDataLoader'
import type {DataLoaderInstance} from '../server/dataloader/RootDataLoader'
import type {DB} from '../server/postgres/types/pg'
import {JobQueueError} from './JobQueueError'

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": "8.25.3",
"version": "8.25.4",
"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: 5 additions & 1 deletion packages/gql-executor/gqlExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import tracer from 'dd-trace'
import {ServerChannel} from 'parabol-client/types/constEnums'
import GQLExecutorChannelId from '../client/shared/gqlIds/GQLExecutorChannelId'
import SocketServerChannelId from '../client/shared/gqlIds/SocketServerChannelId'
import sleep from '../client/utils/sleep'
import executeGraphQL from '../server/graphql/executeGraphQL'
import '../server/initSentry'
import '../server/monkeyPatchFetch'
import {GQLRequest} from '../server/types/custom'
import type {GQLRequest} from '../server/types/GQLRequest'
import {Logger} from '../server/utils/Logger'
import RedisInstance from '../server/utils/RedisInstance'
import RedisStream from './RedisStream'
Expand Down Expand Up @@ -46,6 +47,9 @@ const run = async () => {
ServerChannel.GQL_EXECUTOR_CONSUMER_GROUP,
executorChannel
)
// The executor has published SourceStream messages to webserver that include its executorServerId
// It expects the webserver call it back to make use of its cache. These should resovle within a couple seconds
await sleep(2000)

setInterval(() => {
if (Date.now() - start >= MAX_SHUTDOWN_TIME) {
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": "8.25.3",
"version": "8.25.4",
"description": "A Stateless GraphQL Executor",
"author": "Matt Krick <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/gqlExecutor#readme",
Expand All @@ -25,8 +25,8 @@
},
"dependencies": {
"dd-trace": "^5.0.0",
"parabol-client": "8.25.3",
"parabol-server": "8.25.3",
"parabol-client": "8.25.4",
"parabol-server": "8.25.4",
"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": "8.25.3",
"version": "8.25.4",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/mattermost-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parabol-mattermost-plugin",
"version": "8.25.3",
"version": "8.25.4",
"description": "A service that computes embedding vectors from Parabol objects",
"author": "Georg Bremer <[email protected]>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/mattermost-plugin#readme",
Expand Down Expand Up @@ -60,7 +60,7 @@
"@tiptap/extension-link": "^2.9.1",
"@tiptap/starter-kit": "^2.9.1",
"mattermost-redux": "5.33.1",
"parabol-client": "8.25.3",
"parabol-client": "8.25.4",
"react-relay": "^18.2.0",
"react-select": "5.8.2",
"relay-runtime": "^18.1.1",
Expand Down
16 changes: 0 additions & 16 deletions packages/server/graphql/ResponseStream.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import {ExecutionResult} from 'graphql'
import SubscriptionIterator from '../utils/SubscriptionIterator'
import {getUserId} from '../utils/authorization'
import getGraphQLExecutor from '../utils/getGraphQLExecutor'
import sendToSentry from '../utils/sendToSentry'
import {SubscribeRequest} from './subscribeGraphQL'

const {SERVER_ID} = process.env

export default class ResponseStream implements AsyncIterableIterator<ExecutionResult> {
private sourceStream: SubscriptionIterator
private req: SubscribeRequest
Expand Down Expand Up @@ -44,19 +41,6 @@ export default class ResponseStream implements AsyncIterableIterator<ExecutionRe
}
return {done: false, value: result}
} catch (e) {
const error =
e instanceof Error ? e : new Error(`GQL executor failed to publish. docId: ${docId}`)
sendToSentry(error, {
userId: getUserId(authToken),
tags: {
authToken: JSON.stringify(authToken),
docId: docId || '',
query: query || '',
variables: JSON.stringify(variables),
socketServerId: SERVER_ID!,
executorServerId
}
})
return this.next()
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/graphql/executeGraphQL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tracer from 'dd-trace'
import {graphql} from 'graphql'
import {FormattedExecutionResult} from 'graphql/execution/execute'
import type {GQLRequest} from '../types/custom'
import type {GQLRequest} from '../types/GQLRequest'
import sendToSentry from '../utils/sendToSentry'
import CompiledQueryCache from './CompiledQueryCache'
import getDataLoader from './getDataLoader'
Expand Down
32 changes: 6 additions & 26 deletions packages/server/graphql/handleGraphQLTrebuchetRequest.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import {OutgoingMessage} from '@mattkrick/graphql-trebuchet-client'
import tracer from 'dd-trace'
import ConnectionContext from '../socketHelpers/ConnectionContext'
import {getUserId} from '../utils/authorization'
import getGraphQLExecutor from '../utils/getGraphQLExecutor'
import relayUnsubscribe from '../utils/relayUnsubscribe'
import sanitizeGraphQLErrors from '../utils/sanitizeGraphQLErrors'
import sendToSentry from '../utils/sendToSentry'
import subscribeGraphQL from './subscribeGraphQL'
export type GraphQLMessageType = 'data' | 'complete' | 'error'

const {SERVER_ID} = process.env

const handleGraphQLTrebuchetRequest = async (
data: OutgoingMessage,
connectionContext: ConnectionContext
Expand Down Expand Up @@ -38,10 +34,10 @@ const handleGraphQLTrebuchetRequest = async (
subscribeGraphQL({docId, query, opId: opId!, variables, connectionContext})
return
}
try {
return tracer.trace('handleGraphQLTrebuchetRequest', async (span) => {
const carrier = {}
tracer.inject(span!, 'http_headers', carrier)
return tracer.trace('handleGraphQLTrebuchetRequest', async (span) => {
const carrier = {}
tracer.inject(span!, 'http_headers', carrier)
try {
const result = await getGraphQLExecutor().publish({
docId,
query,
Expand All @@ -55,30 +51,14 @@ const handleGraphQLTrebuchetRequest = async (
// TODO if multiple results, send GQL_DATA for all but the last
const messageType = result.data ? 'complete' : 'error'
return {type: messageType, id: opId, payload: safeResult} as const
})
} catch (e) {
if (e instanceof Error && e.message === 'TIMEOUT') {
sendToSentry(new Error('GQL executor took too long to respond'), {
userId: getUserId(authToken),
tags: {
authToken: JSON.stringify(authToken),
docId: docId || '',
query: query || '',
variables: JSON.stringify(variables),
socketServerId: SERVER_ID!
}
})
} catch (e) {
return {
type: 'error' as const,
id: opId || '',
payload: {errors: [{message: 'The request took too long'}]}
}
}
const viewerId = getUserId(authToken)
const error =
e instanceof Error ? e : new Error(`GQL executor failed to publish. docId: ${docId}`)
sendToSentry(error, {userId: viewerId})
}
})
} else if (data.type === 'stop' && opId) {
relayUnsubscribe(subs, opId)
}
Expand Down
9 changes: 7 additions & 2 deletions packages/server/listenHandler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ms from 'ms'
import {us_listen_socket} from 'uWebSockets.js'
import getGraphQLExecutor from './utils/getGraphQLExecutor'
import {Logger} from './utils/Logger'
Expand All @@ -10,8 +11,12 @@ const listenHandler = (listenSocket: us_listen_socket) => {
if (listenSocket) {
Logger.log(`\n🔥🔥🔥 Server ID: ${SERVER_ID}. Ready for Sockets: Port ${PORT} 🔥🔥🔥`)
getGraphQLExecutor().subscribe()
// Cleaning on startup because shutdowns may be abrupt
serverHealthChecker.cleanUserPresence().catch(sendToSentry)
setTimeout(() => {
// if shutdowns are clean, this isn't necessary
// that's why we wait 3 minutes to let all the old servers shut down gracefully
serverHealthChecker.cleanUserPresence().catch(sendToSentry)
//
}, ms('3m'))
} else {
Logger.log(`❌❌❌ Port ${PORT} is in use! ❌❌❌`)
}
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": "8.25.3",
"version": "8.25.4",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down Expand Up @@ -126,7 +126,7 @@
"oauth-1.0a": "^2.2.6",
"openai": "^4.53.0",
"oy-vey": "^0.12.1",
"parabol-client": "8.25.3",
"parabol-client": "8.25.4",
"pg": "^8.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
18 changes: 18 additions & 0 deletions packages/server/types/GQLRequest.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type {AuthToken} from '../../client/types/AuthToken'

export interface GQLRequest {
authToken: AuthToken
ip?: string
socketId?: string
variables?: {[key: string]: any}
docId?: string
query?: string
rootValue?: {[key: string]: any}
dataLoaderId?: string
// true if the query is on the private schema
isPrivate?: boolean
// true if the query is ad-hoc (e.g. GraphiQL, CLI)
isAdHoc?: boolean
// Datadog opentracing span of the calling server
carrier?: any
}
20 changes: 1 addition & 19 deletions packages/server/types/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {GraphQLSchema} from 'graphql'
import type {GraphQLSchema} from 'graphql'
import type nestGitHubEndpoint from 'nest-graphql-endpoint/lib/nestGitHubEndpoint'
import '../../client/types/reactHTML4'
import type AuthToken from '../database/types/AuthToken'
import type ScheduledJobMeetingStageTimeLimit from '../database/types/ScheduledJobMetingStageTimeLimit'
import type ScheduledTeamLimitsJob from '../database/types/ScheduledTeamLimitsJob'
export interface OAuth2Success {
Expand All @@ -23,23 +22,6 @@ export interface OAuth2Error {
error_description?: string
error_uri?: string
}
export interface GQLRequest {
authToken: AuthToken
ip?: string
socketId?: string
variables?: {[key: string]: any}
docId?: string
query?: string
rootValue?: {[key: string]: any}
dataLoaderId?: string
// true if the query is on the private schema
isPrivate?: boolean
// true if the query is ad-hoc (e.g. GraphiQL, CLI)
isAdHoc?: boolean
// Datadog opentracing span of the calling server
carrier?: any
}

export type ScheduledJobUnion = ScheduledJobMeetingStageTimeLimit | ScheduledTeamLimitsJob

export type RootSchema = GraphQLSchema & {
Expand Down
Loading

0 comments on commit b9f5ff9

Please sign in to comment.