-
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 86bygcqxd images placement for data store dashboards monitoring #287
Cu 86bygcqxd images placement for data store dashboards monitoring #287
Conversation
…ta-file-for-analytics-datastore-elastic-search' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…ta-file-for-dashboard-visualiser-superset' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…ta-file-for-dashboard-visualiser-kibana' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…ta-file-for-dashboard-visualiser-jsreport' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…ta-file-for-monitoring' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…ta-file-for-analytics-datastore-elastic-search' into CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-Monitoring
…Dashboards-Monitoring
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!
…Dashboards-Monitoring
@coderabbitai review |
Actions PerformedReview triggered.
|
WalkthroughThe recent updates encompass several changes across various files. The Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Developer
participant GitHub Actions
participant Test Environment
Developer->>GitHub Actions: Push changes
GitHub Actions->>Test Environment: Run `run-tests.sh`
Test Environment->>GitHub Actions: Execute tests
GitHub Actions->>Developer: Test results
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 Configration 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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (21)
- analytics-datastore-clickhouse/docker-compose.cluster.yml (5 hunks)
- analytics-datastore-clickhouse/docker-compose.yml (3 hunks)
- analytics-datastore-clickhouse/package-metadata.json (1 hunks)
- analytics-datastore-elastic-search/docker-compose.certs.yml (1 hunks)
- analytics-datastore-elastic-search/docker-compose.cluster.yml (6 hunks)
- analytics-datastore-elastic-search/docker-compose.yml (2 hunks)
- analytics-datastore-elastic-search/package-metadata.json (1 hunks)
- dashboard-visualiser-jsreport/docker-compose.yml (3 hunks)
- dashboard-visualiser-jsreport/package-metadata.json (1 hunks)
- dashboard-visualiser-kibana/docker-compose.yml (2 hunks)
- dashboard-visualiser-kibana/package-metadata.json (1 hunks)
- dashboard-visualiser-superset/docker-compose.postgres.cluster.yml (1 hunks)
- dashboard-visualiser-superset/docker-compose.postgres.yml (1 hunks)
- dashboard-visualiser-superset/package-metadata.json (1 hunks)
- database-postgres/docker-compose-pgpool.cluster.yml (3 hunks)
- database-postgres/docker-compose-postgres.cluster.yml (4 hunks)
- database-postgres/docker-compose-postgres.yml (1 hunks)
- database-postgres/package-metadata.json (1 hunks)
- monitoring/docker-compose.cluster.yml (6 hunks)
- monitoring/docker-compose.yml (5 hunks)
- monitoring/package-metadata.json (1 hunks)
Files skipped from review due to trivial changes (10)
- analytics-datastore-clickhouse/docker-compose.yml
- analytics-datastore-elastic-search/docker-compose.certs.yml
- analytics-datastore-elastic-search/docker-compose.yml
- dashboard-visualiser-jsreport/package-metadata.json
- dashboard-visualiser-kibana/docker-compose.yml
- dashboard-visualiser-superset/docker-compose.postgres.cluster.yml
- dashboard-visualiser-superset/docker-compose.postgres.yml
- database-postgres/docker-compose-pgpool.cluster.yml
- database-postgres/docker-compose-postgres.cluster.yml
- database-postgres/docker-compose-postgres.yml
Additional comments not posted (28)
analytics-datastore-clickhouse/package-metadata.json (1)
12-14
: Placement variables are correctly defined for node-specific deployment.dashboard-visualiser-kibana/package-metadata.json (1)
12-12
: Ensure the Kibana image reference uses a versioned tag or a digest for better reproducibility.analytics-datastore-elastic-search/package-metadata.json (2)
21-21
: Ensure the Elasticsearch image reference uses a versioned tag or a digest for better reproducibility.
22-24
: Placement variables are correctly defined for node-specific deployment.database-postgres/package-metadata.json (2)
12-12
: Ensure the PostgreSQL image reference uses a versioned tag or a digest for better reproducibility.Verification successful
The usage of versioned tags for the
POSTGRES_IMAGE
environment variable in both JSON files adheres to best practices for reproducibility, as it avoids the potential issues associated with using mutable tags like 'latest'. While using a digest could further enhance reproducibility by referencing an immutable snapshot of the image, the current versioned tags are sufficient for most practical purposes.
database-postgres/package-metadata.json
usesbitnami/postgresql-repmgr:14
dashboard-visualiser-superset/package-metadata.json
usespostgres:16.2
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the POSTGRES_IMAGE is versioned or uses a digest. # Test: Search for the POSTGRES_IMAGE environment variable usage. Expect: Versioned or digest usage. rg --type json $'POSTGRES_IMAGE'Length of output: 216
13-19
: Placement variables for PostgreSQL and Pgpool are correctly defined for node-specific deployment.dashboard-visualiser-superset/package-metadata.json (1)
10-10
: Ensure the PostgreSQL image reference uses a versioned tag or a digest for better reproducibility.Verification successful
The PostgreSQL image references in both
database-postgres/package-metadata.json
anddashboard-visualiser-superset/package-metadata.json
use versioned tags, which aligns with the requirement for better reproducibility mentioned in the review comment. Here are the details:
database-postgres/package-metadata.json
usesbitnami/postgresql-repmgr:14
dashboard-visualiser-superset/package-metadata.json
usespostgres:16.2
Both are versioned appropriately, ensuring that the specific versions of the images are used, which aids in achieving reproducible environments.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the POSTGRES_IMAGE is versioned or uses a digest. # Test: Search for the POSTGRES_IMAGE environment variable usage. Expect: Versioned or digest usage. rg --type json $'POSTGRES_IMAGE'Length of output: 216
monitoring/package-metadata.json (2)
9-19
: Ensure all image references use versioned tags or digests for better reproducibility.Verification successful
All image references in the
package-metadata.json
file use versioned tags or specific release identifiers, ensuring reproducibility as required:
GRAFANA_IMAGE
: "grafana/grafana-oss:9.2.3"LOKI_IMAGE
: "grafana/loki:2.6.1"PROMTAIL_IMAGE
: "grafana/promtail:2.6.1"PROMETHEUS_BACKUP_IMAGE
: "prom/prometheus:v2.38.0"MINIO_IMAGE
: "quay.io/minio/minio:RELEASE.2022-10-24T18-35-07Z"Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all monitoring images are versioned or use digests. # Test: Search for the image environment variables usage. Expect: Versioned or digest usage. rg --type json $'GRAFANA_IMAGE|LOKI_IMAGE|PROMTAIL_IMAGE|PROMETHEUS_BACKUP_IMAGE|MINIO_IMAGE'Length of output: 526
14-19
: Placement variables for Prometheus, Minio, and Prometheus backup are correctly defined for node-specific deployment.dashboard-visualiser-jsreport/docker-compose.yml (3)
5-5
: Ensure the JSReport image reference uses a versioned tag or a digest for better reproducibility.
14-14
: Ensure the max replicas per node setting is correctly configured and matches the deployment requirements.
24-31
: Configuration labels and environment settings for JSReport are correctly updated to reflect the new standards.monitoring/docker-compose.cluster.yml (3)
8-8
: Ensure the placement constraint for Prometheus is correctly defined and matches the deployment requirements.
12-12
: Ensure the Prometheus backup image reference uses a versioned tag or a digest for better reproducibility.
Line range hint
39-104
: Placement constraints for Minio instances are correctly defined for node-specific deployment.analytics-datastore-elastic-search/docker-compose.cluster.yml (3)
Line range hint
5-32
: Configuration foranalytics-datastore-elastic-search-01
looks good, aligning with best practices for Docker configurations.
Line range hint
55-82
: Configuration foranalytics-datastore-elastic-search-02
is consistent with the first instance and follows best practices.
Line range hint
105-132
: Configuration foranalytics-datastore-elastic-search-03
maintains consistency with other instances and adheres to best practices.analytics-datastore-clickhouse/docker-compose.cluster.yml (4)
5-14
: Configuration foranalytics-datastore-clickhouse-01
looks good, aligning with best practices for Docker configurations.
39-44
: Configuration foranalytics-datastore-clickhouse-02
is consistent with the first instance and follows best practices.
73-78
: Configuration foranalytics-datastore-clickhouse-03
maintains consistency with other instances and adheres to best practices.
112-112
: Configuration foranalytics-datastore-clickhouse-04
maintains consistency with other instances and adheres to best practices.monitoring/docker-compose.yml (6)
5-5
: Configuration for Grafana service looks good, aligning with best practices for Docker configurations.
74-79
: Configuration for Prometheus service is correctly set up with appropriate command line arguments.
100-102
: Configuration for cAdvisor service is correctly set up with appropriate command line argument and volume settings.
107-107
: Configuration for Loki service looks good, aligning with best practices for Docker configurations.
123-123
: Configuration for Promtail service looks good, aligning with best practices for Docker configurations.
142-142
: Healthcheck configuration for Minio service is correctly set up, ensuring service availability.
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 👍
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 (1)
- analytics-datastore-clickhouse/package-metadata.json (1 hunks)
Additional comments not posted (2)
analytics-datastore-clickhouse/package-metadata.json (2)
11-11
: UpdatedCLICKHOUSE_IMAGE
to include a version tag, enhancing reproducibility and stability.
12-14
: Introduced environment variables for node placements, promoting flexible and configurable deployments.
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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (1 hunks)
Additional Context Used
ShellCheck (4)
.github/workflows/run-tests.sh (4)
[info] 35-35: The mentioned syntax error was in this if expression.
[error] 35-35: Couldn't parse this then clause. Fix to allow more checks.
[error] 37-37: Can't have empty then clauses (use 'true' as a no-op).
[error] 37-37: Unexpected keyword/token. Fix any mentioned problems and try again.
Additional comments not posted (1)
.github/workflows/run-tests.sh (1)
36-36
: Commented outDOCKER_HOST
setting for ClickHouse tests.Verification successful
The removal of the
DOCKER_HOST
setting for ClickHouse tests appears to be intentional and does not affect other test configurations.
- No references to
DOCKER_HOST
were found in the ClickHouse-related script (analytics-datastore-clickhouse/swarm.sh
).Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the removal of DOCKER_HOST setting for ClickHouse tests is intentional and does not affect other test configurations. # Test: Search for any other references to DOCKER_HOST in ClickHouse context. rg --type sh $'DOCKER_HOST.*clickhouse'Length of output: 40
Script:
#!/bin/bash # Description: Verify if the removal of DOCKER_HOST setting for ClickHouse tests is intentional and does not affect other test configurations. # Test: Search for any references to DOCKER_HOST in the shell script files. rg --type sh 'DOCKER_HOST' # Test: Search for any references to clickhouse in the shell script files. rg --type sh 'clickhouse'Length of output: 747
Script:
#!/bin/bash # Description: Extract and review the contents of analytics-datastore-clickhouse/swarm.sh to verify the impact of removing DOCKER_HOST. # Extract the contents of the swarm.sh file. cat analytics-datastore-clickhouse/swarm.shLength of output: 2292
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
Outside diff range and nitpick comments (1)
.github/workflows/run-tests.sh (1)
Line range hint
7-7
: Quote variable expansions to prevent word splitting and globbing.- cd ../../test/cucumber/ || exit + cd ../../test/cucumber/"$@" || exit
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (1 hunks)
Additional Context Used
ShellCheck (2)
.github/workflows/run-tests.sh (2)
[warning] 7-7: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
[warning] 29-29: openhim_ran appears unused. Verify use (or export if used externally).
Additional comments not posted (2)
.github/workflows/run-tests.sh (2)
35-36
: Commented out code forclickhouse
test case.This change aligns with the PR's objective to update configurations and environment variables. Ensure that this commented-out section is either removed or replaced with relevant code if no longer needed.
Line range hint
29-29
: Verify the use of the variableopenhim_ran
.It appears that
openhim_ran
is declared but not used effectively in the script. Please confirm if this variable is intended for use or if it should be removed.
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: 1
Outside diff range and nitpick comments (1)
.github/workflows/run-tests.sh (1)
Line range hint
38-67
: Add the missing 'fi' to close the if statement properly.+ fi
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (3 hunks)
Additional Context Used
ShellCheck (5)
.github/workflows/run-tests.sh (5)
[info] 35-35: The mentioned syntax error was in this for loop.
[error] 38-38: Couldn't find 'fi' for this 'if'.
[error] 38-38: Couldn't parse this if expression. Fix to allow more checks.
[error] 67-67: Expected 'fi' matching previously mentioned 'if'.
[error] 67-67: Unexpected keyword/token. Fix any mentioned problems and try again.
Additional comments not posted (1)
.github/workflows/run-tests.sh (1)
28-30
: Ensure the environment variableDOCKER_HOST
is correctly set for security and operational consistency.
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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (3 hunks)
Additional Context Used
ShellCheck (3)
.github/workflows/run-tests.sh (3)
[info] 38-38: The mentioned syntax error was in this if expression.
[error] 40-40: Couldn't parse this elif clause. Fix to allow more checks.
[error] 67-67: Unexpected keyword/token. Fix any mentioned problems and try again.
Additional comments not posted (2)
.github/workflows/run-tests.sh (2)
28-30
: New test case for the CDR recipe added correctly.
67-67
: Please verify the syntax and logic in this section, as there might be an unexpected keyword or token.
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: 1
Outside diff range and nitpick comments (1)
.github/workflows/run-tests.sh (1)
Line range hint
7-7
: Quote the variable expansions to prevent word splitting or globbing issues.- cd ../../test/cucumber/ || exit + cd ../../test/cucumber/ || exit # Ensure to quote the path if it's variable-driven
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (2 hunks)
Additional Context Used
ShellCheck (2)
.github/workflows/run-tests.sh (2)
[warning] 7-7: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
[warning] 32-32: openhim_ran appears unused. Verify use (or export if used externally).
Additional comments not posted (1)
.github/workflows/run-tests.sh (1)
28-30
: Add a new test case for the CDR recipe.This addition aligns with the PR's objective to enhance monitoring capabilities for the DataStore dashboards.
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: 1
Outside diff range and nitpick comments (2)
.github/workflows/run-tests.sh (2)
28-29
: Consider parameterizing theDOCKER_HOST
to enhance flexibility and maintainability.It's good practice to avoid hardcoding values like server addresses directly in scripts. Consider using a variable or a configuration file to set
DOCKER_HOST
.
Line range hint
7-7
: Ensure robust splitting of command line arguments to prevent word splitting/globbing issues.Consider using
mapfile
orread -a
to handle the splitting of$@
intoCHANGED_FILES
more robustly. This will prevent issues when filenames contain spaces or special characters.- CHANGED_FILES=($@) + read -ra CHANGED_FILES <<< "$@"
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (2 hunks)
Additional Context Used
ShellCheck (1)
.github/workflows/run-tests.sh (1)
[warning] 7-7: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
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: 3
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/run-tests.sh (1 hunks)
Additional Context Used
ShellCheck (2)
.github/workflows/run-tests.sh (2)
[warning] 7-7: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
[info] 29-29: Double quote to prevent globbing and word splitting.
Additional comments not posted (1)
.github/workflows/run-tests.sh (1)
43-68
: Ensure consistency in the use of therun_test
function.The refactoring to use
run_test
for various test cases is a good practice as it reduces code duplication and improves maintainability. Make sure that all necessary test cases are included and correctly named.
Summary by CodeRabbit
New Features
Improvements
postgres-metastore
service to use a variable for the image version, enhancing flexibility and maintainability.Chores
SS_POSTGRES_IMAGE
andPOSTGRES_METASTORE
added to package metadata.