-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cu 86bzf9c4p update platform je mpi images #324
Conversation
Task linked: CU-86bzf9c4p Update Platform JeMPI images |
WalkthroughThe recent updates enhance the JeMPI project by introducing new configuration files and Docker Compose setups. These changes improve the handling of patient records, auxiliary interactions, and demographic data, while also refining service deployment within a clustered environment. Enhanced logging, resource management, and support for larger file uploads ensure a robust framework for data management and inter-service communication across the microservices architecture. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebApp
participant API
participant DB
User->>WebApp: Upload file
WebApp->>API: Send file data
API->>DB: Store data
DB-->>API: Confirm storage
API-->>WebApp: Acknowledge
WebApp-->>User: Upload successful
Possibly related PRs
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 using PR comments)
Other keywords and placeholders
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: 5
Outside diff range, codebase verification and nitpick comments (3)
client-registry-jempi/docker-compose.combined-cluster.yml (1)
15-15
: Remove trailing spaces.There is a trailing space on this line. Consider removing it to adhere to best practices.
-
Tools
yamllint
[error] 15-15: trailing spaces
(trailing-spaces)
client-registry-jempi/docker-compose.api.yml (1)
133-143
: Missing Configuration Files inconfigs
SectionThe
config.json
andconfig-api.json
files specified in theconfigs
section are missing from the expected location. Please ensure these files are added to the./config/
directory. Additionally, thename
fields in theconfigs
section are unique, which is correct.
- Missing files:
./config/config.json
,./config/config-api.json
Analysis chain
Verify the
configs
section.The
configs
section has been added to define configuration files. Ensure that:
- The
file
paths are correct and the files exist.- The
name
fields are correctly formatted and unique.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the configs section in docker-compose.api.yml. # Test: Check if config.json and config-api.json exist and names are unique. Expect: Both files should exist and names should be unique. if [ ! -f "./config/config.json" ]; then echo "config.json file is missing." fi if [ ! -f "./config/config-api.json" ]; then echo "config-api.json file is missing." fi # Check for unique names rg --type yaml -A 1 'configs:' client-registry-jempi/docker-compose.api.yml | grep 'name:' | sort | uniq -dLength of output: 327
client-registry-jempi/swarm.sh (1)
40-40
: Initializeapi_cluster_compose_param
with a default value.The
api_cluster_compose_param
is initialized but not used unlessCLUSTERED_MODE
is true. Consider setting a default value or handling the case where it might be empty.- local api_cluster_compose_param="" + local api_cluster_compose_param="default-value"
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (11)
- client-registry-jempi/config/config-api.json (1 hunks)
- client-registry-jempi/config/config.json (1 hunks)
- client-registry-jempi/docker-compose.api-cluster.yml (1 hunks)
- client-registry-jempi/docker-compose.api.yml (5 hunks)
- client-registry-jempi/docker-compose.combined-cluster.yml (1 hunks)
- client-registry-jempi/docker-compose.combined.yml (6 hunks)
- client-registry-jempi/package-metadata.json (3 hunks)
- client-registry-jempi/swarm.sh (3 hunks)
- config.yaml (1 hunks)
- mpi-qa.env (1 hunks)
- reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf (2 hunks)
Additional context used
yamllint
client-registry-jempi/docker-compose.combined-cluster.yml
[error] 15-15: trailing spaces
(trailing-spaces)
client-registry-jempi/docker-compose.combined.yml
[error] 84-84: trailing spaces
(trailing-spaces)
Additional comments not posted (26)
client-registry-jempi/docker-compose.api-cluster.yml (1)
1-8
: Verify node label for deployment constraint.The deployment constraint specifies
node.labels.name==node-2
. Ensure that this node label is correctly set up in your Docker Swarm environment.client-registry-jempi/docker-compose.combined-cluster.yml (2)
16-20
: Verify node label forjempi-async-receiver
deployment constraint.The deployment constraint specifies
node.labels.name==node-2
. Ensure that this node label is correctly set up in your Docker Swarm environment.
9-15
: Verify node label forjempi-em-scala
deployment constraint.The deployment constraint specifies
node.labels.name==node-1
. Ensure that this node label is correctly set up in your Docker Swarm environment.Tools
yamllint
[error] 15-15: trailing spaces
(trailing-spaces)
reverse-proxy-nginx/package-conf-secure/http-jempi-secure.conf (2)
56-56
: Verify the necessity and security of increased upload limit.The
client_max_body_size 128M
directive allows file uploads up to 128 megabytes. Ensure that this change aligns with your application's requirements and security policies.
21-21
: Verify the necessity and security of increased upload limit.The
client_max_body_size 128M
directive allows file uploads up to 128 megabytes. Ensure that this change aligns with your application's requirements and security policies.config.yaml (1)
82-93
: Verify the newmpi-qa
profile configuration.The new
mpi-qa
profile has been added with specific packages and an environment file. Ensure that:
- The
mpi-qa.env
file exists and is correctly configured.- There are no conflicts with existing profiles.
- The packages listed are intended for the
mpi-qa
profile.Verification successful
The
mpi-qa
profile configuration is correct and conflict-free. Thempi-qa
profile includes the intended packages and an environment file, with no conflicts detected among existing profiles. Thempi-qa.env
file exists as expected.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and configuration of mpi-qa.env and check for conflicts. # Test: Check if mpi-qa.env exists. Expect: File should exist. if [ ! -f "mpi-qa.env" ]; then echo "mpi-qa.env file is missing." fi # Test: List all profiles and check for conflicts. Expect: No conflicts. rg --type yaml -A 5 'profiles:' config.yamlLength of output: 205
Script:
#!/bin/bash # Description: List all profiles in config.yaml and verify mpi-qa profile configuration. # Test: List all profiles to check for conflicts and verify mpi-qa profile configuration. rg --type yaml -A 10 'name:' config.yamlLength of output: 1215
client-registry-jempi/docker-compose.api.yml (4)
58-62
: Verify the configuration files forjempi-api-kc
.The
jempi-api-kc
service now includes configuration files. Ensure that:
- The
config.json
andconfig-api.json
files exist and are correctly configured.- The paths specified in the
configs
section are correct.
90-94
: Verify new environment variables forjempi-api-kc
.The
jempi-api-kc
service has new environment variables. Ensure that:
- All variables are defined in the environment or have default values.
- The values are correctly referenced in the application.
28-32
: Verify new environment variables forjempi-api
.The
jempi-api
service has new environment variables. Ensure that:
- All variables are defined in the environment or have default values.
- The values are correctly referenced in the application.
Verification successful
Environment variables for
jempi-api
are correctly managed. The new environment variables are referenced in thedocker-compose.api.yml
file and have default values specified inpackage-metadata.json
. This ensures that the application can function correctly even if these variables are not explicitly defined in the environment.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that new environment variables for jempi-api are defined. # Test: Check if variables are defined in the environment. Expect: All should be defined. for var in SYSTEM_CONFIG_DIR API_CONFIG_REFERENCE_FILENAME API_CONFIG_MASTER_FILENAME API_FIELDS_CONFIG_FILENAME JEMPI_FILE_IMPORT_MAX_SIZE_BYTE; do if [ -z "${!var}" ]; then echo "Environment variable $var is not defined." fi doneLength of output: 1497
Script:
#!/bin/bash # Search for references to the environment variables in the codebase for var in SYSTEM_CONFIG_DIR API_CONFIG_REFERENCE_FILENAME API_CONFIG_MASTER_FILENAME API_FIELDS_CONFIG_FILENAME JEMPI_FILE_IMPORT_MAX_SIZE_BYTE; do echo "Searching for $var in the codebase..." rg --fixed-strings "$var" --context 5 doneLength of output: 16420
6-10
: Verify the configuration files forjempi-api
.The
jempi-api
service now includes configuration files. Ensure that:
- The
config.json
andconfig-api.json
files exist and are correctly configured.- The paths specified in the
configs
section are correct.Verification successful
Configuration Files for
jempi-api
Found in Expected LocationThe
config.json
andconfig-api.json
files for thejempi-api
service exist in theclient-registry-jempi/config/
directory. Please manually verify their contents to ensure they are correctly configured for your application's needs.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of config.json and config-api.json for jempi-api. # Test: Check if config.json and config-api.json exist. Expect: Both files should exist. if [ ! -f "./config/config.json" ]; then echo "config.json file is missing." fi if [ ! -f "./config/config-api.json" ]; then echo "config-api.json file is missing." fiLength of output: 221
Script:
#!/bin/bash # Search for config.json and config-api.json files in the repository fd --type f --name 'config.json' . fd --type f --name 'config-api.json' . # Search for references to these files in documentation or other files rg 'config.json' --glob '*.md' rg 'config-api.json' --glob '*.md'Length of output: 641
Script:
#!/bin/bash # Correct the search for config.json and config-api.json files in the repository fd 'config.json' . fd 'config-api.json' . # Search for references to these files in documentation or other files rg 'config.json' --glob '*.md' rg 'config-api.json' --glob '*.md'Length of output: 359
client-registry-jempi/package-metadata.json (3)
99-106
: Verify new configuration entries.New entries have been added for
JEMPI_EM_SCALA
and configuration filenames. Ensure that:
- These entries are correctly referenced in the codebase.
- The application uses these configurations as intended.
Verification successful
Configuration Entries Verified
The new configuration entries for
JEMPI_EM_SCALA
and configuration filenames are correctly referenced and utilized in the codebase. They are used in environment and Docker Compose files, ensuring they are part of the application's configuration management.
JEMPI_EM_SCALA_IMAGE_TAG
is used inmpi-qa.env
anddocker-compose.combined.yml
.SYSTEM_CONFIG_DIR
andAPI_CONFIG_REFERENCE_FILENAME
are used indocker-compose.api.yml
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new configuration entries in the codebase. # Test: Search for the usage of new entries. Expect: Entries should be used in the codebase. rg --type json 'JEMPI_EM_SCALA_IMAGE_TAG' client-registry-jempi rg --type json 'SYSTEM_CONFIG_DIR' client-registry-jempi rg --type json 'API_CONFIG_REFERENCE_FILENAME' client-registry-jempiLength of output: 457
Script:
#!/bin/bash # Description: Search for the usage of new configuration entries across the entire codebase. # Test: Search for the usage of new entries in all files. Expect: Entries should be used in the codebase. rg 'JEMPI_EM_SCALA_IMAGE_TAG' rg 'SYSTEM_CONFIG_DIR' rg 'API_CONFIG_REFERENCE_FILENAME'Length of output: 917
72-72
: Verify the renaming ofJEMPI_POSTGRESQL_USER
.The key
JEMPI_POSTGRESQL_USER
has been renamed toJEMPI_POSTGRESQL_USERNAME
. Ensure that:
- All references to this key in the codebase are updated.
- There are no broken references or errors due to this change.
Verification successful
Renaming of
JEMPI_POSTGRESQL_USER
toJEMPI_POSTGRESQL_USERNAME
Verified SuccessfullyThe key
JEMPI_POSTGRESQL_USER
has been successfully renamed toJEMPI_POSTGRESQL_USERNAME
across the codebase. The new key is consistently used in relevant configuration files without any broken references or errors.
- Files using
JEMPI_POSTGRESQL_USERNAME
:
mpi-qa.env
client-registry-jempi/package-metadata.json
client-registry-jempi/docker-compose.api.yml
client-registry-jempi/docker-compose.combined.yml
client-registry-jempi/importer/postgres/docker-compose.config.yml
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the references to JEMPI_POSTGRESQL_USERNAME in the codebase. # Test: Search for the old and new keys in the codebase. Expect: Only new key should be used. rg --type json 'JEMPI_POSTGRESQL_USER' client-registry-jempi rg --type json 'JEMPI_POSTGRESQL_USERNAME' client-registry-jempiLength of output: 297
Script:
#!/bin/bash # Description: Verify the references to JEMPI_POSTGRESQL_USERNAME in the entire codebase. # Search for the old key in the entire codebase to ensure it has been completely removed. rg 'JEMPI_POSTGRESQL_USER' # Search for the new key in the entire codebase to ensure it is being used correctly. rg 'JEMPI_POSTGRESQL_USERNAME'Length of output: 1561
55-55
: VerifyJEMPI_FILE_IMPORT_MAX_SIZE_BYTE
format change.The
JEMPI_FILE_IMPORT_MAX_SIZE_BYTE
value has been changed to a string format. Ensure that:
- The application correctly parses and handles this new format.
- There are no issues with size calculations.
client-registry-jempi/swarm.sh (2)
60-60
: Setapi_cluster_compose_param
for clustered mode.The line correctly assigns the
api_cluster_compose_param
whenCLUSTERED_MODE
is true, ensuring that the appropriate Docker Compose file is used for API deployment in clustered environments.
82-82
: Addapi_cluster_compose_param
todocker::deploy_service
.The addition of
api_cluster_compose_param
to thedocker::deploy_service
call allows for more flexible deployments by specifying different configurations for clustered environments.client-registry-jempi/config/config.json (1)
1-189
: Ensure JSON schema validity and consistency.The JSON configuration file is well-structured, defining fields and rules for data handling. Ensure that this schema is consistent with the application's requirements and that all necessary fields are included.
mpi-qa.env (1)
1-130
: Verify environment variable values and consistency.The environment configuration file is comprehensive, covering multiple system aspects. Ensure that all variable values are correct and consistent with the system's operational requirements.
client-registry-jempi/docker-compose.combined.yml (6)
6-8
: LGTM! Configuration mapping is consistent.The addition of the
configs
section forjempi-async-receiver
is consistent with the other services.
29-31
: LGTM! Configuration mapping is consistent.The addition of the
configs
section forjempi-etl
is consistent with the other services.
50-52
: LGTM! Configuration mapping is consistent.The addition of the
configs
section forjempi-controller
is consistent with the other services.
85-103
: LGTM! New service configuration is well-structured.The introduction of the
jempi-em-scala
service with its configuration and deployment parameters is consistent with existing services.
107-109
: LGTM! Configuration mapping is consistent.The addition of the
configs
section forjempi-linker
is consistent with the other services.
145-147
: LGTM! Configuration mapping is consistent.The addition of the
configs
section forjempi-bootstrapper
is consistent with the other services.client-registry-jempi/config/config-api.json (3)
4-15
: LGTM! Field configuration is appropriate.The
aux_id
field is correctly configured as a read-only identifier.
45-69
: LGTM! Field configuration is appropriate.The
familyName
field is correctly configured with appropriate validation rules.
97-121
: LGTM! Field configuration is appropriate.The
dob
field is correctly configured with appropriate validation rules.
"fieldName": "phoneNumber", | ||
"fieldType": "String", | ||
"fieldLabel": "Phone No", | ||
"groups": ["demographics", "filter", "linked_records", "record_details"], | ||
"scope": [ | ||
"/record-details/:uid", | ||
"/notifications/match-details", | ||
"/record-details/:uid/relink", | ||
"/search/custom", | ||
"/browse-records" | ||
], | ||
"accessLevel": [] |
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.
Consider adding validation rules for phone numbers.
The phoneNumber
field lacks validation rules. Consider adding a regex pattern to ensure correct formatting.
"validation": {
"regex": "^[+]?[0-9]{1,15}$",
"onErrorMessage": "Phone number must be a valid international format"
}
"fieldName": "nationalId", | ||
"fieldType": "String", | ||
"fieldLabel": "National ID", | ||
"groups": ["identifiers", "linked_records", "record_details"], | ||
"scope": [ | ||
"/record-details/:uid", | ||
"/notifications/match-details", | ||
"/record-details/:uid/relink", | ||
"/search/simple", | ||
"/search/custom", | ||
"/search-results/golden", | ||
"/search-results/patient", | ||
"/browse-records" | ||
], | ||
"accessLevel": [], | ||
"validation": { | ||
"required": true, | ||
"regex": "", | ||
"onErrorMessage": "The national Id cannot be empty" | ||
} |
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.
Consider defining a regex pattern for national ID validation.
The nationalId
field's validation rule has an empty regex pattern. Consider specifying a pattern for validation.
"regex": "^[A-Z0-9]{5,10}$",
"onErrorMessage": "The national ID must be alphanumeric and between 5 to 10 characters"
"fieldName": "gender", | ||
"fieldType": "String", | ||
"fieldLabel": "Gender", | ||
"groups": [ | ||
"demographics", | ||
"filter", | ||
"sub_heading", | ||
"linked_records", | ||
"record_details" | ||
], | ||
"scope": [ | ||
"/record-details/:uid", | ||
"/notifications/match-details", | ||
"/record-details/:uid/relink", | ||
"/search/custom", | ||
"/browse-records" | ||
], | ||
"validation": { | ||
"required": true, | ||
"regex": "^(male|female)$", | ||
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral" | ||
}, | ||
"accessLevel": [] |
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.
Fix the regex pattern for gender validation.
The regex pattern should include "neutral" to match the error message.
- "regex": "^(male|female)$"
+ "regex": "^(male|female|neutral)$"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"fieldName": "gender", | |
"fieldType": "String", | |
"fieldLabel": "Gender", | |
"groups": [ | |
"demographics", | |
"filter", | |
"sub_heading", | |
"linked_records", | |
"record_details" | |
], | |
"scope": [ | |
"/record-details/:uid", | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/custom", | |
"/browse-records" | |
], | |
"validation": { | |
"required": true, | |
"regex": "^(male|female)$", | |
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral" | |
}, | |
"accessLevel": [] | |
"fieldName": "gender", | |
"fieldType": "String", | |
"fieldLabel": "Gender", | |
"groups": [ | |
"demographics", | |
"filter", | |
"sub_heading", | |
"linked_records", | |
"record_details" | |
], | |
"scope": [ | |
"/record-details/:uid", | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/custom", | |
"/browse-records" | |
], | |
"validation": { | |
"required": true, | |
"regex": "^(male|female|neutral)$", | |
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral" | |
}, | |
"accessLevel": [] |
"fieldName": "givenName", | ||
"fieldType": "String", | ||
"fieldLabel": "First Name", | ||
"groups": [ | ||
"name", | ||
"demographics", | ||
"filter", | ||
"linked_records", | ||
"record_details" | ||
], | ||
"scope": [ | ||
"/notifications/match-details", | ||
"/record-details/:uid/relink", | ||
"/search/simple", | ||
"/search/custom", | ||
"/search-results/golden", | ||
"/search-results/patient", | ||
"/record-details/:uid", | ||
"/browse-records" | ||
], | ||
"validation": { | ||
"required": true, | ||
"onErrorMessage": "The family name cannot be empty" | ||
}, | ||
"accessLevel": [] |
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.
Correct the validation error message.
The validation error message for givenName
should refer to the "first name" instead of the "family name."
- "onErrorMessage": "The family name cannot be empty"
+ "onErrorMessage": "The first name cannot be empty"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"fieldName": "givenName", | |
"fieldType": "String", | |
"fieldLabel": "First Name", | |
"groups": [ | |
"name", | |
"demographics", | |
"filter", | |
"linked_records", | |
"record_details" | |
], | |
"scope": [ | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/simple", | |
"/search/custom", | |
"/search-results/golden", | |
"/search-results/patient", | |
"/record-details/:uid", | |
"/browse-records" | |
], | |
"validation": { | |
"required": true, | |
"onErrorMessage": "The family name cannot be empty" | |
}, | |
"accessLevel": [] | |
"fieldName": "givenName", | |
"fieldType": "String", | |
"fieldLabel": "First Name", | |
"groups": [ | |
"name", | |
"demographics", | |
"filter", | |
"linked_records", | |
"record_details" | |
], | |
"scope": [ | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/simple", | |
"/search/custom", | |
"/search-results/golden", | |
"/search-results/patient", | |
"/record-details/:uid", | |
"/browse-records" | |
], | |
"validation": { | |
"required": true, | |
"onErrorMessage": "The first name cannot be empty" | |
}, | |
"accessLevel": [] |
"fieldName": "city", | ||
"fieldType": "String", | ||
"fieldLabel": "City", | ||
"groups": ["demographics", "filter", "linked_records", "record_details"], | ||
"scope": [ | ||
"/record-details/:uid", | ||
"/notifications/match-details", | ||
"/record-details/:uid/relink", | ||
"/search/custom", | ||
"/browse-records" | ||
], | ||
"accessLevel": [], | ||
"validation": { | ||
"required": true, | ||
"onErrorMessage": "Date of birth cannot be empty" | ||
} |
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.
Correct the validation error message.
The validation error message for city
should refer to the "city" field instead of "Date of birth."
- "onErrorMessage": "Date of birth cannot be empty"
+ "onErrorMessage": "City cannot be empty"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"fieldName": "city", | |
"fieldType": "String", | |
"fieldLabel": "City", | |
"groups": ["demographics", "filter", "linked_records", "record_details"], | |
"scope": [ | |
"/record-details/:uid", | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/custom", | |
"/browse-records" | |
], | |
"accessLevel": [], | |
"validation": { | |
"required": true, | |
"onErrorMessage": "Date of birth cannot be empty" | |
} | |
"fieldName": "city", | |
"fieldType": "String", | |
"fieldLabel": "City", | |
"groups": ["demographics", "filter", "linked_records", "record_details"], | |
"scope": [ | |
"/record-details/:uid", | |
"/notifications/match-details", | |
"/record-details/:uid/relink", | |
"/search/custom", | |
"/browse-records" | |
], | |
"accessLevel": [], | |
"validation": { | |
"required": true, | |
"onErrorMessage": "City cannot be empty" | |
} |
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.
Looks good to me. Just a few comments.
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
…m:jembi/platform into CU-86bzf9c4p_Update-Platform-JeMPI-images
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: 2
Outside diff range and nitpick comments (1)
client-registry-jempi/docker-compose.dgraph.yml (1)
18-18
: Cache configuration looks good, but consider security and monitoring enhancements.The addition of cache parameters can help optimize the performance of the Dgraph service. The specified cache size of 4096 MB and the percentage distribution across different cache types seem reasonable. However, consider the following suggestions:
- Monitor the cache usage and adjust the size if needed to ensure optimal performance.
- Restrict the security whitelist to specific IP ranges, if possible, to enhance security.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- client-registry-jempi/docker-compose.combined-dev.yml (0 hunks)
- client-registry-jempi/docker-compose.dgraph-cluster.yml (1 hunks)
- client-registry-jempi/docker-compose.dgraph-dev.yml (0 hunks)
- client-registry-jempi/docker-compose.dgraph.yml (1 hunks)
- client-registry-jempi/importer/openhim/openhimConfig.js (1 hunks)
- client-registry-jempi/package-metadata.json (5 hunks)
- client-registry-jempi/swarm.sh (1 hunks)
Files not reviewed due to no reviewable changes (2)
- client-registry-jempi/docker-compose.combined-dev.yml
- client-registry-jempi/docker-compose.dgraph-dev.yml
Files skipped from review due to trivial changes (1)
- client-registry-jempi/swarm.sh
Additional context used
yamllint
client-registry-jempi/docker-compose.dgraph-cluster.yml
[error] 9-9: trailing spaces
(trailing-spaces)
[warning] 38-38: wrong indentation: expected 8 but found 10
(indentation)
[error] 60-60: trailing spaces
(trailing-spaces)
Additional comments not posted (14)
client-registry-jempi/docker-compose.dgraph-cluster.yml (2)
10-29
: LGTM!The
jempi-alpha-02
service is well-configured for deploying a Dgraph alpha node in a clustered environment. The resource limits, memory reservations, restart policy, volume mapping, and network configuration all follow best practices and ensure that the service will operate effectively.
31-50
: LGTM!The
jempi-alpha-03
service is well-configured for deploying a Dgraph alpha node in a clustered environment. The resource limits, memory reservations, restart policy, volume mapping, and network configuration all follow best practices and ensure that the service will operate effectively.Tools
yamllint
[warning] 38-38: wrong indentation: expected 8 but found 10
(indentation)
client-registry-jempi/package-metadata.json (12)
16-16
: LGTM!The version upgrade of the
JEMPI_ZERO_IMAGE
fromv22.0.0
tov23.1.1
is a significant update to the underlying technology stack. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
43-43
: LGTM!The image tag update for
JEMPI_ASYNC_RECEIVER
from1.0.1-beta
to1.1.0
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
44-44
: LGTM!The image tag update for
JEMPI_CONTROLLER
from1.0.1-beta
to1.1.0
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
45-45
: LGTM!The image tag update for
JEMPI_LINKER
from1.0.1-beta
to1.1.1
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
46-46
: LGTM!The image tag update for
JEMPI_API
from1.0.1-beta
to1.1.1
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
47-47
: LGTM!The image tag update for
JEMPI_API_KC
from1.0.1-beta
to1.1.1
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
48-48
: LGTM!The image tag update for
JEMPI_ETL
from1.0.1-beta
to1.1.0
indicates a shift to a newer version, likely incorporating bug fixes and new features. Ensure that the application is thoroughly tested with this new version to confirm compatibility and expected behavior.
55-55
: LGTM!The change in the format for specifying the maximum file import size from
128000000
to128m
standardizes the configuration and improves readability.
72-72
: Verify if the username change is consistently applied.The modification of the PostgreSQL username from
jempi
topostgres
could reflect a change in database access credentials. Please ensure that this change is consistently applied across all relevant configurations and doesn't cause any authentication issues.Verification successful
PostgreSQL username change is consistently applied.
The modification of the PostgreSQL username to
postgres
for JEMPI is consistently applied within theclient-registry-jempi/package-metadata.json
file. There are no conflicting entries in other configuration files.
client-registry-jempi/package-metadata.json
: BothJEMPI_POSTGRESQL_USERNAME
andPOSTGRESQL_USERNAME
are set topostgres
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the PostgreSQL username change is consistently applied across all relevant configurations. # Test: Search for the PostgreSQL username in all configuration files. rg --type-add 'config:*.{yaml,yml,json,properties}' -tc config $'POSTGRESQL_USERNAME|JEMPI_POSTGRESQL_USERNAME'Length of output: 198
Script:
#!/bin/bash # Description: Verify if the PostgreSQL username change is consistently applied across all relevant configurations. # Test: Search for the PostgreSQL username in all JSON configuration files. rg --type json 'POSTGRESQL_USERNAME|JEMPI_POSTGRESQL_USERNAME'Length of output: 777
23-23
: Verify if the memory increase is sufficient.The memory limit increase for
JEMPI_ALPHA_01_MEMORY_LIMIT
from3G
to6G
suggests a need for enhanced resource allocation. Please ensure that this increase is sufficient for the component's requirements and doesn't cause resource contention with other components.
51-51
: Verify if the increased instances are properly load balanced.The increase in the number of instances for
JEMPI_LINKER
from1
to3
may enhance the application's scalability and performance. Please ensure that these instances are properly load balanced and don't cause resource contention with other components.
85-86
: Verify the architectural change and the usage of new environment variables.The simplification of the
DGRAPH_HOSTS
configuration to a single host,jempi-alpha-01
, and the reduction of ports to9080
indicate a potential architectural change in how the application interacts with Dgraph. Please ensure that this change is thoroughly tested to confirm the expected behavior and performance.Additionally, the introduction of several new environment variables related to Scala and system configuration, such as
JEMPI_EM_SCALA_IMAGE_TAG
,JEMPI_EM_SCALA_INSTANCES
, and various configuration filenames, suggests an expansion of the application's capabilities and configuration management. Please verify that these new environment variables are properly used, documented, and have appropriate default values.Also applies to: 98-106
@@ -7,7 +7,7 @@ const path = require("path"); | |||
const OPENHIM_CORE_SERVICE_NAME = 'openhim-core' | |||
const OPENHIM_MEDIATOR_API_PORT = 8080 | |||
const OPENHIM_API_PASSWORD = | |||
process.env.OPENHIM_API_PASSWORD || 'openhim-password' | |||
process.env.OPENHIM_API_PASSWORD || 'instant101' |
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.
Use a stronger default password and ensure the environment variable is set.
The change in the default value of OPENHIM_API_PASSWORD
from 'openhim-password'
to 'instant101'
raises security concerns. The new default password appears to be weak and easily guessable, which could introduce vulnerabilities if the environment variable is not consistently set to override it.
Please consider the following recommendations:
- Replace
'instant101'
with a stronger default password that adheres to security best practices. The password should:- Have a minimum length (e.g., 12 characters)
- Include a mix of uppercase letters, lowercase letters, numbers, and special characters
- Avoid common words, phrases, or patterns
- Verify that the
OPENHIM_API_PASSWORD
environment variable is properly set in all relevant environments (development, staging, production) to override the default value with a strong, unique password. Do not rely solely on the default value.
@@ -6,21 +6,60 @@ services: | |||
placement: | |||
constraints: | |||
- node.labels.name == node-1 | |||
|
|||
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.
Fix the trailing spaces issues.
The yamllint static analysis tool has identified trailing spaces at lines 9 and 60. Please remove the trailing spaces to improve the code quality and readability.
Apply this diff to fix the trailing spaces issues:
-
+
- jempi-alpha-03-data:
+ jempi-alpha-03-data:
Also applies to: 60-60
Tools
yamllint
[error] 9-9: trailing spaces
(trailing-spaces)
Summary by CodeRabbit
New Features
Bug Fixes
Chores