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

feat: workspace health relation #3466

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Jan 15, 2024

In this PR, we are enhancing the existing workspace:health command by adding the ability to check relations within the specified workspace. The original command focused on assessing the health of a workspace by examining its metadata and database structure and skipping field of kind RELATION, and with this enhancement, we are now extending its functionality to ensure the integrity of relations as well.

Key Features

  • Comprehensive Validation: With this enhancement, the workspace:health command now includes checking for relations to ensure that they are correctly defined and maintained within the workspace.
  • Flexible Modes: You can still choose from different levels of checking, including structure, metadata, or both, to suit your specific needs.
  • Verbose Output Option: The command continues to provide detailed issue reporting, including information about detected relation problems, for in-depth analysis.

How It Works

Run the enhanced command in your terminal as follows:

$ yarn command workspace:health --workspace-id 20202020-1c25-4d02-bf25-6aeccf7ea419

Customizable Parameters

  • Mode Selection (-m, --mode [all | structure | metadata]):

    • all: Checks both structure, metadata, and relations.
    • structure: Focuses on the database table structure based on metadata.
    • metadata: Concentrates on the validity of metadata.
  • Verbose Output (-v, --verbose):

    • When enabled, displays detailed information about all detected issues within the terminal, including relation-related problems. If not used, only a brief summary message is shown.

Fix #3396

Copy link

github-actions bot commented Jan 15, 2024

TODOs/FIXMEs:

  • // TODO: Check relation fields: packages/twenty-server/src/workspace/workspace-health/services/field-metadata-health.service.ts

Generated by 🚫 dangerJS against 19e258b

@magrinj magrinj marked this pull request as ready for review January 15, 2024 16:42
@magrinj magrinj marked this pull request as draft January 15, 2024 16:43
@magrinj magrinj force-pushed the feat/workspace-health-relation branch from 2a8a1ad to 19e258b Compare January 15, 2024 16:49
@magrinj magrinj marked this pull request as ready for review January 15, 2024 16:50
@charlesBochet charlesBochet self-assigned this Jan 16, 2024
Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Bravo!

@charlesBochet charlesBochet merged commit 4b7e42c into main Jan 17, 2024
14 checks passed
@charlesBochet charlesBochet deleted the feat/workspace-health-relation branch January 17, 2024 16:05
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.

Support relation health check in workspace health command
2 participants