Skip to content
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

Clean views without object metadata #7153

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Sep 19, 2024

Add command for cleaning + clean on object deletion

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

This pull request introduces a new command to clean views with deleted object metadata and updates the upgrade process for version 0.31. The changes focus on maintaining data integrity and improving the object deletion process.

  • Added CleanViewsWithDeletedObjectMetadataCommand to identify and delete orphaned views during the 0.31 upgrade process
  • Modified ObjectMetadataService to delete associated views when deleting an object, preventing orphaned data
  • Updated UpgradeTo0_31Command to include workspace metadata synchronization and view cleaning before backfilling workspace favorites
  • Removed FeatureFlagModule dependency from ObjectMetadataModule, simplifying the module structure
  • Introduced dry run mode and detailed logging in the new cleaning command for better control and visibility during the upgrade process

5 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings

},
});

if (views.length >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Condition should be views.length > 0 instead of >= 0

await this.cleanViewsWithDeletedObjectMetadataCommand.executeActiveWorkspacesCommand(
passedParam,
{
...options,
Copy link
Member

Choose a reason for hiding this comment

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

{ ... options } ==> options

@thomtrp thomtrp merged commit 8964d26 into main Sep 19, 2024
6 checks passed
@thomtrp thomtrp deleted the tt-clean-views-without-object-metadata branch September 19, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants