Skip to content
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

chore: create appsmith schema for postgres #36591

Open
wants to merge 8 commits into
base: release
Choose a base branch
from

Conversation

AnaghHegde
Copy link
Member

@AnaghHegde AnaghHegde commented Sep 27, 2024

Description

Automation

/ok-to-test tags="@tag.Sanity"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11072318532
Commit: 833832d
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Fri, 27 Sep 2024 14:48:53 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced a script to initialize the PostgreSQL database schema for Appsmith.
    • Added utilities for managing PostgreSQL database connections, including availability checks and parameter extraction.
    • Enhanced scripts for managing PostgreSQL connections and initialization.
    • Improved environment configuration for PostgreSQL database connections, including automatic password generation for local setups.
  • Bug Fixes

    • Improved error handling and connection retry mechanisms for PostgreSQL setup.
  • Documentation

    • Updated comments and logging for better clarity on database operations.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

Walkthrough

The changes introduce new shell scripts aimed at managing PostgreSQL database initialization and connection handling within Appsmith. The pg-default-schema.sh script initializes the database schema, while pg-utils.sh provides utility functions for checking PostgreSQL availability and extracting connection parameters. Additionally, the run-java.sh script has been updated to incorporate these functionalities, enhancing the overall management of PostgreSQL connections.

Changes

Files Change Summary
deploy/docker/fs/opt/appsmith/pg-default-schema.sh Introduced a script to initialize the PostgreSQL schema, including validation of the database URL and connection attempts.
deploy/docker/fs/opt/appsmith/pg-utils.sh Added functions for checking PostgreSQL availability and extracting database parameters from a connection string.
deploy/docker/fs/opt/appsmith/run-java.sh Modified to source pg-utils.sh, check PostgreSQL mode, and run the schema initialization script in the background.
deploy/docker/fs/opt/appsmith/entrypoint.sh Enhanced init_env_file to manage database credentials based on the APPSMITH_DB_URL.
deploy/docker/fs/opt/appsmith/templates/docker.env.sh Renamed MONGO_PASSWORD to DB_PASSWORD for consistency in environment variable usage.
app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java Updated JDBC URL construction to append currentSchema=appsmith to the query parameters.
app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonDBConfigTest.java Adjusted test cases to reflect the new JDBC URL format including the currentSchema parameter.

Possibly related PRs

Suggested reviewers

  • sharat87
  • abhvsn

In the land of code where functions play,
New scripts emerge to brighten the day.
With PostgreSQL now in command,
Initialization goes as planned.
So let’s celebrate this splendid feat,
With joyful cheers, our work's complete! 🎉


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AnaghHegde AnaghHegde added the ok-to-test Required label for CI label Sep 27, 2024
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Sep 27, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 and nitpick comments (2)
deploy/docker/fs/opt/appsmith/pg-default-schema.sh (1)

42-50: Consider adding retry logic for schema creation

If the schema creation fails due to transient issues, it would be helpful to implement retry logic. Retrying a few times before exiting can make the script more robust against temporary network issues or database locks.

deploy/docker/fs/opt/appsmith/pg-utils.sh (1)

22-22: Enhance clarity in log message

In line 22, the log message uses "e.g." twice, which can be redundant and may affect readability. Let's refine the message for better clarity.

Suggested change:

- tlog "PostgreSQL host '$PG_DB_HOST' is rejecting connections e.g. due to being in recovery mode or not accepting connections eg. connections maxed out."
+ tlog "PostgreSQL host '$PG_DB_HOST' is rejecting connections, possibly due to being in recovery mode or connections being maxed out."
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b1ed82d and d89a596.

📒 Files selected for processing (3)
  • deploy/docker/fs/opt/appsmith/pg-default-schema.sh (1 hunks)
  • deploy/docker/fs/opt/appsmith/pg-utils.sh (1 hunks)
  • deploy/docker/fs/opt/appsmith/run-java.sh (3 hunks)
🧰 Additional context used
🪛 Shellcheck
deploy/docker/fs/opt/appsmith/pg-utils.sh

[warning] 65-80: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (3)
deploy/docker/fs/opt/appsmith/run-java.sh (1)

3-4: Excellent inclusion of the PostgreSQL utilities script

By sourcing pg-utils.sh, you're ensuring that all the necessary PostgreSQL functions are available for use in this script. This promotes modularity and reusability, which are important principles in scripting.

deploy/docker/fs/opt/appsmith/pg-utils.sh (2)

3-48: Well-structured function for PostgreSQL availability check

The waitForPostgresAvailability function is thoughtfully designed, covering various PostgreSQL status codes and incorporating a robust retry mechanism. Excellent work in ensuring the application waits appropriately for the database to become ready before proceeding.


61-88: Consider potential issues with spaces or special characters in connection parameters

If any of the connection parameters (username, password, hostname, database name) contain spaces or special characters, the current parsing approach may fail. It's advisable to handle such cases to make your script more robust.

You can test this by using a connection string with spaces in the credentials:

🧰 Tools
🪛 Shellcheck

[warning] 65-80: Quote this to prevent word splitting.

(SC2046)

deploy/docker/fs/opt/appsmith/run-java.sh Show resolved Hide resolved
deploy/docker/fs/opt/appsmith/run-java.sh Outdated Show resolved Hide resolved
deploy/docker/fs/opt/appsmith/pg-utils.sh Show resolved Hide resolved
@AnaghHegde
Copy link
Member Author

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11070738411.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36591.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-36591.dp.appsmith.com

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Outside diff range and nitpick comments (4)
deploy/docker/fs/opt/appsmith/templates/docker.env.sh (3)

66-66: Good job updating the database connection string!

Students, notice how we've correctly updated our MongoDB connection string to use the new DB_PASSWORD variable. This ensures our application can still connect to the database after our variable renaming exercise.

However, I have a little homework for you: Consider using environment variables for the hostname and port as well. This would make our configuration even more flexible for different deployment scenarios. What do you think about that?

Here's an example of how you could further improve this line:

-APPSMITH_DB_URL=mongodb://$MONGO_USER:$DB_PASSWORD@localhost:27017/appsmith
+APPSMITH_DB_URL=mongodb://$MONGO_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/appsmith

Don't forget to define DB_HOST and DB_PORT variables at the beginning of the script!


67-67: Excellent addition of the PostgreSQL connection string!

Class, this is a perfect example of forward-thinking in our code. By adding this commented-out PostgreSQL connection string, we're preparing our application to work with different database systems. It's like having a backup plan – always a smart move!

However, I have a small suggestion to make this even better. For consistency with our MongoDB string, let's use the $MONGO_USER variable here too, instead of hardcoding 'appsmith'. This way, we maintain flexibility in our user configuration across different database systems.

Here's a small improvement we could make:

-#APPSMITH_DB_URL=postgresql://appsmith:$DB_PASSWORD@localhost:5432/postgres
+#APPSMITH_DB_URL=postgresql://$MONGO_USER:$DB_PASSWORD@localhost:5432/postgres

Remember, consistency is key in coding, just like in your homework assignments!


69-69: Well done on updating the MongoDB password variable!

Class, observe how we've correctly updated the APPSMITH_MONGODB_PASSWORD to use our new DB_PASSWORD variable. This ensures that our MongoDB configuration remains consistent with our earlier changes.

However, I have a thought-provoking question for you: Given that we're now supporting multiple database types, should we consider renaming this variable to something more generic? This could help avoid confusion if we switch to a different database system in the future.

Here's a suggestion to ponder:

-APPSMITH_MONGODB_PASSWORD=$DB_PASSWORD
+APPSMITH_DB_PASSWORD=$DB_PASSWORD

What do you think about this change? How might it impact our application's flexibility and maintainability? Let's discuss!

deploy/docker/fs/opt/appsmith/entrypoint.sh (1)

95-95: Ensure Consistent Definition of Database User

The DB_USER variable is set to "appsmith":

DB_USER="appsmith"

Confirm that this username aligns with the expected database user elsewhere in your configuration to maintain consistency.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1edfc6f and 1413b1e.

📒 Files selected for processing (2)
  • deploy/docker/fs/opt/appsmith/entrypoint.sh (2 hunks)
  • deploy/docker/fs/opt/appsmith/templates/docker.env.sh (2 hunks)
🔇 Additional comments (3)
deploy/docker/fs/opt/appsmith/templates/docker.env.sh (2)

5-5: Excellent work on generalizing the database password variable!

Class, let's take a moment to appreciate this change. By renaming MONGO_PASSWORD to DB_PASSWORD, we're making our code more flexible. This allows us to potentially use different types of databases in the future, not just MongoDB. It's like having a universal key that can open many doors!


Line range hint 1-95: Excellent work on adapting the environment configuration for multiple databases!

Class, let's recap what we've learned from this code review:

  1. We've successfully generalized our database configuration, making it easier to switch between MongoDB and PostgreSQL.
  2. The changes are consistent and well-thought-out, showing good attention to detail.
  3. We've identified a few areas where we can further improve flexibility and consistency.

Remember, in the world of software development, adaptability is key. By making these changes, we're preparing our application for future growth and different deployment scenarios.

For your next assignment, I want you to think about other parts of the application that might need similar updates to support multiple database types. How can we ensure our entire system is as flexible as this configuration file?

Keep up the great work!

deploy/docker/fs/opt/appsmith/entrypoint.sh (1)

96-96: Use Secure Password Generation

While openssl rand is effective, specifying the length in bytes might not result in the desired number of characters. The command:

DB_PASSWORD=$(openssl rand -base64 12)  # Generate a random password

Ensure that the generated password meets your security requirements regarding length and complexity. You might want to increase the length parameter to generate a longer password.

# Generate a new password for local PostgreSQL
DB_USER="appsmith"
DB_PASSWORD=$(openssl rand -base64 12) # Generate a random password
echo "Generated new password for appsmith user: $DB_PASSWORD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Caution: Avoid Logging Sensitive Passwords

Logging passwords can lead to security vulnerabilities by exposing sensitive information. The line:

echo "Generated new password for appsmith user: $DB_PASSWORD"

should be modified to exclude the actual password from the output.

You can adjust the line as follows to prevent the password from being logged:

-echo "Generated new password for appsmith user: $DB_PASSWORD"
+echo "Generated new password for appsmith user."


# Update APPSMITH_DB_URL with the new username and password
APPSMITH_DB_URL=$(echo "$APPSMITH_DB_URL" | sed "s#postgres://[^:]*:[^@]*@#postgres://$DB_USER:$DB_PASSWORD@#")
echo "APPSMITH_DB_URL updated with new user and password: $APPSMITH_DB_URL"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Caution: Avoid Logging Database URLs with Credentials

Printing the full APPSMITH_DB_URL, which includes the username and password, can expose sensitive information. The line:

echo "APPSMITH_DB_URL updated with new user and password: $APPSMITH_DB_URL"

should be altered to prevent credential leakage.

Consider modifying the echo statement to omit the credentials:

-echo "APPSMITH_DB_URL updated with new user and password: $APPSMITH_DB_URL"
+echo "APPSMITH_DB_URL updated with new user and password."

echo "Generated new password for appsmith user: $DB_PASSWORD"

# Update APPSMITH_DB_URL with the new username and password
APPSMITH_DB_URL=$(echo "$APPSMITH_DB_URL" | sed "s#postgres://[^:]*:[^@]*@#postgres://$DB_USER:$DB_PASSWORD@#")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ensure Robust Handling of Special Characters in Credentials

When using sed to update APPSMITH_DB_URL, special characters in $DB_USER or $DB_PASSWORD could break the command. This is because sed might misinterpret these characters, leading to incorrect substitutions.

To safely handle special characters, consider using printf with URL encoding or use alternative tools like awk or parameter expansion. Here's one way to adjust the command:

-APPSMITH_DB_URL=$(echo "$APPSMITH_DB_URL" | sed "s#postgres://[^:]*:[^@]*@#postgres://$DB_USER:$DB_PASSWORD@#")
+APPSMITH_DB_URL=$(echo "$APPSMITH_DB_URL" | sed "s#\(postgres://\)[^@]*@#\1$DB_USER:$DB_PASSWORD@#")

Alternatively, you could use parameter expansion in bash to avoid calling external utilities:

APPSMITH_DB_URL="postgres://$DB_USER:$DB_PASSWORD@${DB_HOST}/${DB_NAME}"

Ensure that variables are properly URL-encoded if they may contain special characters.

echo "APPSMITH_DB_URL updated with new user and password: $APPSMITH_DB_URL"

# Optionally: Save the updated APPSMITH_DB_URL back to the .env file or environment
sed -i "s#APPSMITH_DB_URL=.*#APPSMITH_DB_URL=$APPSMITH_DB_URL#g" "$ENV_PATH"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Handle Special Characters Safely When Updating Configuration

Directly inserting APPSMITH_DB_URL into a sed command can cause issues if the URL contains characters that sed interprets, such as forward slashes or hashes. The line:

sed -i "s#APPSMITH_DB_URL=.*#APPSMITH_DB_URL=$APPSMITH_DB_URL#g" "$ENV_PATH"

To safely update the configuration, you could:

  1. Use a delimiter that is less likely to appear in the URL, such as a control character.

  2. Escape special characters in APPSMITH_DB_URL before using it in sed.

Here's an example using printf to escape the URL:

escaped_url=$(printf '%s\n' "$APPSMITH_DB_URL" | sed 's/[\/&]/\\&/g')
sed -i "s#^APPSMITH_DB_URL=.*#APPSMITH_DB_URL=$escaped_url#g" "$ENV_PATH"

echo "APPSMITH_DB_URL is a valid PostgreSQL URL."

# Extract the host from APPSMITH_DB_URL
DB_HOST=$(echo "$APPSMITH_DB_URL" | sed -n 's#.*://[^@]*@\([^:]*\):.*#\1#p')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider Using URL Parsing Tools for Reliability

Parsing URLs with sed can be error-prone. Consider using a dedicated URL parsing tool or built-in shell features. For example, using parameter expansion in bash:

# Extract the host from APPSMITH_DB_URL
DB_HOST=$(echo "$APPSMITH_DB_URL" | cut -d@ -f2 | cut -d: -f1)

Or use awk for more robust parsing.


💡 Codebase verification

Issue Found: DB_HOST Extraction Fails Without Credentials

The current sed command does not extract DB_HOST when the database URL lacks credentials, resulting in an empty value. To ensure reliable extraction in all scenarios, consider updating the extraction logic to handle URLs both with and without credentials.

🔗 Analysis chain

Verify Correct Extraction of DB Host from URL

The sed command used to extract DB_HOST assumes that the URL contains credentials. If the credentials are not present, the pattern may fail. The command:

DB_HOST=$(echo "$APPSMITH_DB_URL" | sed -n 's#.*://[^@]*@\([^:]*\):.*#\1#p')

Consider testing the extraction with URLs both with and without credentials to ensure reliability.

You can run the following script to verify:

This script will help you identify if the extraction works correctly in different scenarios.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Test DB_HOST extraction from APPSMITH_DB_URL with and without credentials.

urls=(
  "postgres://user:password@localhost:5432/dbname"
  "postgres://localhost:5432/dbname"
)

for url in "${urls[@]}"; do
  DB_HOST=$(echo "$url" | sed -n 's#.*://[^@]*@\([^:]*\):.*#\1#p')
  echo "URL: $url"
  echo "Extracted DB_HOST: $DB_HOST"
  echo "----"
done

Length of output: 705

@AnaghHegde
Copy link
Member Author

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11071132873.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36591.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-36591.dp.appsmith.com

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java (1)

71-84: Excellent work on improving the URL construction, students!

Your new logic for handling query parameters is a significant improvement. Let's break it down for the class:

  1. You check if the URL already has query parameters.
  2. If parameters exist, you append the currentSchema=appsmith to the existing query string.
  3. If no parameters exist, you add currentSchema=appsmith as the first parameter.

This approach ensures that the currentSchema is always set without overwriting existing parameters. Well done!

However, to make your code even more readable for your classmates, consider extracting the URL format strings into constants. Here's a little homework for you:

private static final String URL_FORMAT_WITH_QUERY = "%s%s://%s:%s%s?%s&currentSchema=appsmith";
private static final String URL_FORMAT_WITHOUT_QUERY = "%s%s://%s:%s%s?currentSchema=appsmith";

// Then use these constants in your String.format calls

This small change will make your code easier to maintain and understand. Remember, clear code is happy code!

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1413b1e and cb4a295.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java (1 hunks)
🔇 Additional comments (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonDBConfig.java (1)

68-69: Good job clarifying the default port comment, class!

You've done well in updating the comment to specify that 5432 is the standard PostgreSQL port. This kind of clarity is important for your fellow students who might be new to database configurations.

Copy link

Failed server tests

  • com.appsmith.server.configurations.CommonDBConfigTest#testExtractAndSaveJdbcParams_validDbUrlWithUsernameAndPassword
  • com.appsmith.server.configurations.CommonDBConfigTest#testExtractAndSaveJdbcParams_validDbUrlWithoutUsernameAndPassword
  • com.appsmith.server.solutions.CreateDBTablePageSolutionTests#createPageWithInvalidApplicationIdTest

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonDBConfigTest.java (1)

35-35: Good job on covering different scenarios, class!

I'm impressed that you've consistently applied the "?currentSchema=appsmith" addition across different test cases, including this one without username and password. This demonstrates attention to detail and thorough testing practices.

However, to make your test suite even more comprehensive, consider adding one more test case:

@Test
public void testExtractAndSaveJdbcParams_validDbUrlWithUsernamePasswordAndExistingQueryParams() {
    CommonDBConfig commonDBConfig = new CommonDBConfig();
    String dbUrl = "postgresql://postgres:password@localhost:5432/postgres?sslmode=require";
    DataSourceProperties ds = commonDBConfig.extractJdbcProperties(dbUrl);
    assertEquals("postgres", ds.getUsername());
    assertEquals("password", ds.getPassword());
    assertEquals("jdbc:postgresql://localhost:5432/postgres?sslmode=require&currentSchema=appsmith", ds.getUrl());
}

This additional test will ensure that the currentSchema parameter is correctly appended when other query parameters already exist in the URL. Remember, in software development, it's always better to be thorough!

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between cb4a295 and 833832d.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonDBConfigTest.java (2 hunks)
🔇 Additional comments (2)
app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonDBConfigTest.java (2)

19-19: Well done, class! Let's examine this change.

The addition of "?currentSchema=appsmith" to the expected JDBC URL is a smart move. It ensures that our Appsmith application will use a specific schema when connecting to PostgreSQL. This change will help maintain consistency across different environments and prevent potential conflicts with other schemas.


25-25: Excellent work on consistency, students!

I'm pleased to see that you've applied the same "?currentSchema=appsmith" addition to this test case as well. It's crucial to maintain consistency across different scenarios. By testing with a non-standard port (1234), you're demonstrating good test coverage. Remember, thorough testing is the foundation of robust software!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants