From cfcc00ef6727abdf7a357dbc3e73f7f9e30e26d8 Mon Sep 17 00:00:00 2001 From: Abhijeet <41686026+abhvsn@users.noreply.github.com> Date: Wed, 22 May 2024 18:10:22 +0530 Subject: [PATCH] fix: Remove the strict check for mongo url (#33652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: c74e98018a6b4bd212e922eb1b3015195a5234a0 > Cypress dashboard url: Click here! ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --- .../com/appsmith/server/configurations/CommonDBConfig.java | 3 ++- deploy/docker/fs/opt/appsmith/entrypoint.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java index b7bd7a52f1..662777fb30 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java @@ -30,7 +30,8 @@ public class CommonDBConfig { @Primary @Profile("!test") public MongoProperties configureMongoDB() { - if (!appsmithDbUrl.startsWith("mongodb")) { + log.debug("Configuring MongoDB with url: {}", appsmithDbUrl); + if (!appsmithDbUrl.contains("mongodb")) { return null; } log.info("Found MongoDB uri configuring now"); diff --git a/deploy/docker/fs/opt/appsmith/entrypoint.sh b/deploy/docker/fs/opt/appsmith/entrypoint.sh index 2bf6be004e..76ce9d2c63 100644 --- a/deploy/docker/fs/opt/appsmith/entrypoint.sh +++ b/deploy/docker/fs/opt/appsmith/entrypoint.sh @@ -183,6 +183,7 @@ configure_database_connection_url() { elif [[ "${APPSMITH_DB_URL}" == "mongodb"* ]]; then isMongoUrl=1 fi + echo "Configured database connection URL is $APPSMITH_DB_URL" } check_db_uri() {