-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make use of postgres package #308
Conversation
Create the postgres tables and user that will be used by the jempi service
WalkthroughThe updates primarily focus on reconfiguring PostgreSQL settings across various Docker Compose files and scripts. They introduce new environment variables for PostgreSQL configuration, streamline the setup by removing redundant services, and add scripts for initializing and configuring PostgreSQL databases. These changes enhance the consistency and manageability of the PostgreSQL setup within the client registry and dashboard visualizer services. Changes
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: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- .env.cluster (2 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-dev.yml (2 hunks)
- client-registry-jempi/docker-compose.combined.yml (5 hunks)
- client-registry-jempi/importer/postgres/create-db.js (1 hunks)
- client-registry-jempi/importer/postgres/docker-compose.config.yml (1 hunks)
- client-registry-jempi/importer/postgres/package.json (1 hunks)
- client-registry-jempi/package-metadata.json (2 hunks)
- client-registry-jempi/swarm.sh (1 hunks)
Files skipped from review due to trivial changes (5)
- client-registry-jempi/docker-compose.api.yml
- client-registry-jempi/docker-compose.combined-cluster.yml
- client-registry-jempi/docker-compose.combined-dev.yml
- client-registry-jempi/importer/postgres/docker-compose.config.yml
- client-registry-jempi/importer/postgres/package.json
Additional comments not posted (9)
.env.cluster (1)
103-103
: The configuration forJEMPI_POSTGRES_DB
is correctly set to point to multiple PostgreSQL instances, which is suitable for high availability and load balancing.client-registry-jempi/package-metadata.json (2)
11-11
: The addition of thedatabase-postgres
dependency aligns with the PR's objective to integrate PostgreSQL support.
64-74
: The new PostgreSQL-related environment variables are correctly added and structured to support the integration with the PostgreSQL database.client-registry-jempi/importer/postgres/create-db.js (1)
1-136
: The script for setting up the PostgreSQL database is well-structured and uses best practices such as checking for existing databases and users before creation, which prevents potential errors during re-runs.client-registry-jempi/docker-compose.combined.yml (4)
48-52
: The updated PostgreSQL configuration for thejempi-controller
service correctly reflects the new database settings and network requirements.Also applies to: 76-76
83-87
: The updated PostgreSQL configuration for thejempi-linker
service correctly reflects the new database settings and network requirements.Also applies to: 112-113
118-121
: The updated PostgreSQL configuration for thejempi-bootstrapper
service correctly reflects the new database settings and network requirements.Also applies to: 135-135
150-152
: The addition of thepostgres
network is correctly configured to facilitate communication between services and the PostgreSQL database.client-registry-jempi/swarm.sh (1)
68-70
: The addition of the PostgreSQL database configuration deployment in theinitialize_package
function is correctly implemented and aligns with the PR's objectives.
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 (8)
- .env.cluster (3 hunks)
- client-registry-jempi/importer/postgres/docker-compose.config.yml (1 hunks)
- dashboard-visualiser-superset/docker-compose.yml (2 hunks)
- dashboard-visualiser-superset/importer/postgres/create-db.js (1 hunks)
- dashboard-visualiser-superset/importer/postgres/docker-compose.config.yml (1 hunks)
- dashboard-visualiser-superset/importer/postgres/package.json (1 hunks)
- dashboard-visualiser-superset/package-metadata.json (2 hunks)
- dashboard-visualiser-superset/swarm.sh (2 hunks)
Files skipped from review due to trivial changes (1)
- dashboard-visualiser-superset/importer/postgres/package.json
Files skipped from review as they are similar to previous changes (2)
- .env.cluster
- client-registry-jempi/importer/postgres/docker-compose.config.yml
Additional comments not posted (4)
dashboard-visualiser-superset/importer/postgres/docker-compose.config.yml (1)
4-26
: Ensure the Docker service configuration aligns with the intended database setup operations.The configuration correctly sets up the environment for running the
create-db.js
script, including mounting necessary files and setting up the network. The restart policy is set to 'none', which is appropriate for a one-time configuration task.dashboard-visualiser-superset/package-metadata.json (1)
Line range hint
7-33
: Validate the updated dependencies and environment variables.The addition of
database-postgres
to dependencies and the new PostgreSQL-related environment variables are consistent with the PR's objective to integrate PostgreSQL. Ensure that all services using these variables are updated accordingly.dashboard-visualiser-superset/swarm.sh (1)
48-49
: Verify the integration of PostgreSQL configuration in the deployment script.The script correctly deploys the PostgreSQL configuration importer, ensuring that the database and user setup is handled as part of the service initialization. This aligns with the changes made in other parts of the system.
dashboard-visualiser-superset/docker-compose.yml (1)
Line range hint
39-79
: Confirm the network configuration for the new PostgreSQL service.The addition of the
postgres
network to the Superset service ensures that it can communicate with the newly integrated PostgreSQL service. This is crucial for the correct operation of the Superset application with the new database backend.
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)
- dashboard-visualiser-superset/package-metadata.json (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- dashboard-visualiser-superset/package-metadata.json
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)
- client-registry-jempi/importer/postgres/create-db.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- client-registry-jempi/importer/postgres/create-db.js
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.
Look Good to Me
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! We just need to ensure tests are also refactored to work with new package. Also left a small minor comment
…orm into Make-use-of-postgres-package
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)
- test/cucumber/features/cluster-mode/jempi.cluster.feature (2 hunks)
- test/cucumber/features/single-mode/jempi.feature (2 hunks)
Files skipped from review due to trivial changes (2)
- test/cucumber/features/cluster-mode/jempi.cluster.feature
- test/cucumber/features/single-mode/jempi.feature
Co-authored-by: Drizzentic <[email protected]>
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)
- client-registry-jempi/importer/postgres/create-db.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- client-registry-jempi/importer/postgres/create-db.js
Update the Jempi service to use the postgres database package
Summary by CodeRabbit
New Features
client-registry-jempi
anddashboard-visualiser-superset
.Configuration Updates
Dependency Updates
package.json
files for database configuration.Script Enhancements
swarm.sh
scripts to deploy PostgreSQL config importers for database setup.