Skip to content

Prevent index updates during sync metadata #12856

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

Merged
merged 1 commit into from
Jun 24, 2025
Merged

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Jun 24, 2025

As per title

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Introduces a temporary fix to prevent unintended index column updates during metadata synchronization by skipping differences where path length > 1 in the workspace index comparator.

  • Modified workspace-index.comparator.ts to conditionally skip nested path updates for existing indexes
  • Added TODO comment indicating need for proper handling of index updates in future
  • Change preserves index creation and deletion operations while only restricting updates
  • This is a temporary workaround to prevent potential issues during synchronization

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

@@ -63,6 +63,11 @@ export class WorkspaceIndexComparator {
);

for (const difference of indexesDifferences) {
// TODO: This code prevent index updates, we need to handle them
if (difference.path.length > 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Add a more detailed comment explaining why path.length > 1 indicates an index update, and what specific scenarios this prevents

Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charlesBochet charlesBochet merged commit 95993dc into main Jun 24, 2025
41 of 43 checks passed
@charlesBochet charlesBochet deleted the fix-index-updates branch June 24, 2025 20:10
Copy link
Contributor

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:60928

This environment will automatically shut down when the PR is closed or after 5 hours.

abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants