forked from ParabolInc/parabol
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(11129): reproduce Null Value in userId Column of Notification Relation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arthurgousset
wants to merge
14
commits into
master
Choose a base branch
from
workback/investigation/11129
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… generic error, not yet the null error we are looking for
… and confirm it reproduces the bug
…ore verbose logging to reproduce bug
Member
Author
|
Member
Author
|
Successfully reproducing the bug 14:35:29 1|Socket Server | [VALIDATION] Bug scenario detected: Task unassignment that would create invalid notifications
14:35:29 1|Socket Server | [VALIDATION] Invalid notifications that would be created without fix: 1
14:35:29 1|Socket Server | ERR error: null value in column "userId" of relation "Notification" violates not-null constraint
14:35:29 1|Socket Server | at /Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/node_modules/.pnpm/pg@8.15.6/node_modules/pg/lib/client.js:545:17
14:35:29 1|Socket Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
14:35:29 1|Socket Server | at async PostgresConnection.executeQuery (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1123404:49)
14:35:29 1|Socket Server | at async /Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1140819:28
14:35:29 1|Socket Server | at async DefaultConnectionProvider.provideConnection (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1124009:20)
14:35:29 1|Socket Server | at async DefaultQueryExecutor.executeQuery (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1140818:16)
14:35:29 1|Socket Server | at async InsertQueryBuilder.execute (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1136113:24)
14:35:29 1|Socket Server | at async publishChangeNotifications (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1569347:5)
14:35:29 1|Socket Server | at async resolve (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1578164:9)
14:35:29 1|Socket Server | at PostgresConnection.executeQuery (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1123416:69)
14:35:29 1|Socket Server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
14:35:29 1|Socket Server | at async /Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1140819:28
14:35:29 1|Socket Server | at async DefaultConnectionProvider.provideConnection (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1124009:20)
14:35:29 1|Socket Server | at async DefaultQueryExecutor.executeQuery (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1140818:16)
14:35:29 1|Socket Server | at async InsertQueryBuilder.execute (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1136113:24)
14:35:29 1|Socket Server | at async publishChangeNotifications (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1569347:5)
14:35:29 1|Socket Server | at async resolve (/Users/arthur/Documents/hyperdrive-eng/customers/forks/parabol/dev/web.js:1578164:9) {
14:35:29 1|Socket Server | path: [ 'updateTask' ],
14:35:29 1|Socket Server | locations: [ { line: 3, column: 9 } ],
14:35:29 1|Socket Server | extensions: [Object: null prototype] {}
14:35:29 1|Socket Server | }
14:35:29 1|Socket Server | [DEBUG] Task update query: {"table":"Task","set":{"userId":null},"where":{"id":"GVvdLVSubu"}} |
…fix to reproduce the bug
… reproducible bug
… fix to have reproducible bug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Reproduces and fixes: ParabolInc#11129
Root cause: https://hyperdrive.engineering/#report-586b9313-9cd4-4080-b4d3-bafa6da9f043
Bug Reproduction
Commands to Reproduce
pnpm --filter parabol-server test packages/server/__tests__/unassignTask.test.tsExpected vs Actual Behavior
Bug Details
The core issue is in
publishChangeNotifications.tswhen handling task unassignment:The reproduction script confirmed the bug exists by showing that when a task is unassigned, a notification object with null userId is created and would be inserted into the database, causing the constraint violation.