-
Notifications
You must be signed in to change notification settings - Fork 19
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
Boundary upload to have not generate boundary code if code is already filled to support migration #1121
Conversation
… filled to support migration
WalkthroughWalkthroughThe recent changes streamline the configuration and database handling in the application. The Changes
Sequence Diagram(s)sequenceDiagram
participant Config
participant Database
participant Kafka
Config->>Database: Use hardcoded table names
Config->>Kafka: Connect to localhost
Database->>Kafka: Send data
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- utilities/project-factory/src/server/config/index.ts (3 hunks)
- utilities/project-factory/src/server/utils/campaignUtils.ts (1 hunks)
Additional comments not posted (4)
utilities/project-factory/src/server/config/index.ts (3)
14-16
: Verify the impact of commenting outgetDBSchemaName
.The
getDBSchemaName
function has been commented out, which removes the flexibility of dynamically setting the schema. Ensure that this change does not affect any other parts of the codebase that rely on this function.Verification successful
Verification successful.
The
getDBSchemaName
function is only found in the commented-out section withinutilities/project-factory/src/server/config/index.ts
and is not used elsewhere in the codebase. Commenting out this function does not affect any other parts of the code.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if `getDBSchemaName` is used anywhere else in the codebase. # Test: Search for the function usage. Expect: No occurances of `getDBSchemaName`. rg --type js -A 5 $'getDBSchemaName'Length of output: 35
Script:
#!/bin/bash # Description: Verify if `getDBSchemaName` is used anywhere else in the codebase. # Test: Search for the function usage in both JavaScript and TypeScript files. Expect: No occurrences of `getDBSchemaName`. rg --type js,ts -A 5 $'getDBSchemaName'Length of output: 68
Script:
#!/bin/bash # Description: Verify if `getDBSchemaName` is used anywhere else in the codebase. # Test: Search for the function usage in JavaScript files. Expect: No occurrences of `getDBSchemaName`. rg --type js -A 5 $'getDBSchemaName' # Test: Search for the function usage in TypeScript files. Expect: No occurrences of `getDBSchemaName`. rg --type ts -A 5 $'getDBSchemaName'Length of output: 653
74-77
: Verify the impact of hardcoding table names.The table names have been hardcoded to use the "health" schema. Ensure that this change does not affect any other parts of the codebase that rely on dynamic schema names.
Verification successful
The hardcoded table names do not impact other parts of the codebase.
The previous dynamic table name function
getDBSchemaName
is commented out and not in use. The hardcoded table names are found in configuration files and SQL migration scripts, and there are no other dependencies on dynamic schema names.
utilities/project-factory/src/server/config/index.ts
utilities/project-factory/migration/main/V20240625141100__process_details_ddl.sql
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the hardcoded table names affect any other parts of the codebase. # Test: Search for the previous dynamic table names. Expect: No occurances of `${getDBSchemaName`. rg --type js -A 5 $'${getDBSchemaName'Length of output: 141
Script:
#!/bin/bash # Description: Verify if the hardcoded table names affect any other parts of the codebase. # Test: Search for the previous dynamic table names. Expect: No occurrences of `getDBSchemaName`. rg 'getDBSchemaName' --type js -A 5 # Test: Search for the hardcoded table names to see where they are used. rg 'health.eg_cm_campaign_details' --type js -A 5 rg 'health.eg_cm_campaign_process' --type js -A 5 rg 'health.eg_cm_generated_resource_details' --type js -A 5 rg 'health.eg_cm_resource_details' --type js -A 5Length of output: 245
Script:
#!/bin/bash # Description: Verify if the hardcoded table names affect any other parts of the codebase. # Test: Search for the previous dynamic table names. Expect: No occurrences of `getDBSchemaName`. rg 'getDBSchemaName' -A 5 # Test: Search for the hardcoded table names to see where they are used. rg 'health.eg_cm_campaign_details' -A 5 rg 'health.eg_cm_campaign_process' -A 5 rg 'health.eg_cm_generated_resource_details' -A 5 rg 'health.eg_cm_resource_details' -A 5Length of output: 4049
100-100
: Verify the impact of changing the Kafka broker host to localhost.The Kafka broker host has been changed to localhost. Ensure that this change does not affect the application's ability to connect to Kafka in different environments, particularly in production settings.
utilities/project-factory/src/server/utils/campaignUtils.ts (1)
1613-1613
: Verify the impact of combiningwithBoundaryCode
andwithoutBoundaryCode
forchildParentMap
.The
childParentMap
is now generated by combiningwithBoundaryCode
andwithoutBoundaryCode
. Ensure that this change does not introduce any issues in the resulting mappings and overall functionality.
No description provided.