-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add upgrade enqueue enum V2 command #13422
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
Conversation
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.
Greptile Summary
This PR introduces a V2 version of the AddEnqueuedStatusToWorkflowRunCommand
to address a workspace-specific field metadata query issue in the original command. The changes create a new command file 1-2-add-enqueued-status-to-workflow-run-v2.command.ts
that duplicates the existing command but adds two critical improvements:
- Workspace-specific object metadata retrieval: The V2 command first fetches the
workflowRun
object metadata for the specific workspace using the workspace ID and standard object ID - Scoped field metadata query: It then uses the retrieved object metadata ID when querying for the status field metadata, ensuring the query is properly scoped to the workspace
The original command had a potential bug where it queried field metadata using only the standardId
without workspace filtering, which could return incorrect field metadata in multi-workspace scenarios. The V2 command fixes this by adding the objectMetadataId
constraint to the field metadata query.
The command is integrated into the version 1.2 upgrade process by:
- Adding it to the
1-2-upgrade-version-command.module.ts
with necessary dependencies (FieldMetadataEntity
,ObjectMetadataEntity
,WorkspaceDataSourceModule
) - Registering it in the main
upgrade.command.ts
file and adding it to thebeforeSyncMetadata
execution list for version 1.2.0
This approach maintains backward compatibility while ensuring that the 1.2 upgrade correctly handles workspace-specific field metadata operations when adding the ENQUEUED status to workflow run status fields.
Confidence score: 4/5
- This is a targeted bug fix that addresses a specific workspace scoping issue in field metadata queries
- The implementation follows established patterns in the codebase for workspace-specific operations
- The files that need more attention are the new V2 command file and the module registration, as they contain the core logic changes
3 files reviewed, no comments
📊 API Changes ReportREST Metadata API Analysis ErrorError Output
|
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.
Lgtm
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:59379 This environment will automatically shut down when the PR is closed or after 5 hours. |
Duplicated the existing command
AddEnqueuedStatusToWorkflowRunCommand
. Adding two steps:workflowRun
object of the selected workspace