-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix Tasks/Notes created with null position #9068
Conversation
…e + remove sync-metadata health-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR implements comprehensive changes to fix null position handling in Tasks and Notes across the application. Here's a summary of the key changes:
- Added new
0.40
upgrade command with record position backfill functionality and forced metadata sync - Made position fields non-nullable with default value 0 across all workspace entities (Tasks, Notes, Companies, etc.)
- Centralized error handling by moving try/catch blocks from resolver factories to graphql-query-runner level
- Removed unused record position backfill job in favor of direct command execution
- Improved sync-metadata performance by skipping health checks when using force mode
The changes look well-structured and address the core issues while improving overall code organization and performance.
53 file(s) reviewed, 15 comment(s)
Edit PR Review Bot Settings | Greptile
...y-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts
Show resolved
Hide resolved
...y-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts
Show resolved
Hide resolved
...ages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.module.ts
Outdated
Show resolved
Hide resolved
...ges/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command.ts
Show resolved
Hide resolved
...wenty-server/src/engine/api/graphql/graphql-query-runner/interfaces/base-resolver-service.ts
Show resolved
Hide resolved
...engine/workspace-manager/workspace-sync-metadata/commands/sync-workspace-metadata.command.ts
Show resolved
Hide resolved
...c/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
Outdated
Show resolved
Hide resolved
...c/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
Show resolved
Hide resolved
packages/twenty-server/src/modules/view/standard-objects/view.workspace-entity.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, but globally good to me
packages/twenty-front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts
Show resolved
Hide resolved
|
||
const graphqlQuerySelectedFieldsResult = | ||
graphqlQueryParser.parseSelectedFields( | ||
const resultWithGetters = await this.queryResultGettersFactory.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've take a look inside QueryRunnerArgsFactory
, create
function return an any
type, it seems a bit old, but we can definitely properly type this with function override or union, any
shouldn't used
Fixes #8810
Fixes #5268
Fixes #8971