chore: Create appsmith postgres DB to be used by internal processes#36670
chore: Create appsmith postgres DB to be used by internal processes#36670
Conversation
WalkthroughThe changes in this pull request involve modifications to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- deploy/docker/fs/opt/appsmith/entrypoint.sh (3 hunks)
🔇 Additional comments (2)
deploy/docker/fs/opt/appsmith/entrypoint.sh (2)
9-9: Well done, class! This new variable is a great addition.The new environment variable
APPSMITH_PG_DATABASEis set correctly to "appsmith". This aligns perfectly with our lesson on establishing a centralized PostgreSQL database. Keep up the good work!
436-436: A+ for integrating our new function!Excellent job incorporating the
create_appsmith_pg_dbfunction into theinit_postgresfunction. This addition ensures that our Appsmith database is created right after the PostgreSQL data folder is initialized. It's like adding the final piece to complete our database setup puzzle!
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- deploy/docker/fs/opt/appsmith/entrypoint.sh (3 hunks)
🧰 Additional context used
🔇 Additional comments (1)
deploy/docker/fs/opt/appsmith/entrypoint.sh (1)
436-436: Well done on integrating the new function, class!You've successfully incorporated the
create_appsmith_pg_dbfunction into theinit_postgresfunction. This is a great example of modular programming, where we break down complex tasks into smaller, manageable pieces.The change on line 436 correctly calls the new function with the
POSTGRES_DB_PATHargument. This ensures that our Appsmith database is created during the PostgreSQL initialization process.Keep up the excellent work in organizing and structuring your code!
Description
With the migration to postgres as Appsmith's persistent database we wanted to have central DB to be consumed by internal services. Currently all the services try to create the same DB and may end up in a race condition, so we are moving this task to
entrypoint.sh.Steps:
appsmithdb with postgres user/test Sanity
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11212147481
Commit: e384076
Cypress dashboard.
Tags:
@tag.SanitySpec:
Mon, 07 Oct 2024 09:31:39 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Bug Fixes