Skip to content

chore: Update env variable used for update persistent DB URL#35526

Merged
abhvsn merged 2 commits intoreleasefrom
fix-db-url-updates
Aug 8, 2024
Merged

chore: Update env variable used for update persistent DB URL#35526
abhvsn merged 2 commits intoreleasefrom
fix-db-url-updates

Conversation

@abhvsn
Copy link
Contributor

@abhvsn abhvsn commented Aug 8, 2024

Description

PR to fix the issue with DB url update from admin settings page. When we migrated the env variable to APPSMITH_DB_URL instead of APPSMITH_MONGODB_URI this functionality broke. We had a discussion to remove this update functionality as this does not work in all the setups. But as QA has already started pointing this as an issue raising this PR.

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10297374384
Commit: dbef20c
Cypress dashboard.
Tags: @tag.Settings
Spec:


Thu, 08 Aug 2024 07:13:51 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Updated the database connection string naming from "MongoDB URI" to "Appsmith DB URL" in the Admin Settings, enhancing clarity in configuration.
    • Revised subtext in Admin Settings for improved user understanding of the database URL's purpose.
  • Bug Fixes

    • Adjusted test cases to reflect the new naming convention, ensuring consistent references to "APPSMITH_DB_URL" across various tests.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2024

Walkthrough

This update focuses on a naming convention change where the constant APPSMITH_MONGODB_URI is renamed to APPSMITH_DB_URL. This modification aims to offer a clearer and more generic representation of the database connection string utilized within the application. The adjustments are consistently applied across both the main application code and the related test cases, ensuring uniformity throughout the codebase.

Changes

Files Change Summary
app/server/appsmith-server/src/main/java/com/appsmith/server/constants/EnvVariables.java Renamed APPSMITH_MONGODB_URI to APPSMITH_DB_URL in the EnvVariables enum.
app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/EnvManagerTest.java Updated all instances of APPSMITH_MONGODB_URI to APPSMITH_DB_URL in multiple test methods.
app/client/src/pages/AdminSettings/config/advanced.ts Changed label from "MongoDB URI" to "Appsmith DB URL" and updated subtext for clarity.

Possibly related issues

Poem

In the realm of code, where names did confound,
A clearer path for our URLs found.
From Mongo's old name to something fresh,
Appsmith DB URL, we now enmesh.
With clarity gained, our work is refined,
A joyful journey, in code intertwined! ✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@abhvsn abhvsn requested a review from AnaghHegde August 8, 2024 05:25
@abhvsn abhvsn self-assigned this Aug 8, 2024
@abhvsn abhvsn added the ok-to-test Required label for CI label Aug 8, 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 Aug 8, 2024
AnaghHegde
AnaghHegde previously approved these changes Aug 8, 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: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fe7ca6b and 32be3e7.

Files selected for processing (2)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/constants/EnvVariables.java (1 hunks)
  • app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/EnvManagerTest.java (8 hunks)
Files skipped from review due to trivial changes (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/constants/EnvVariables.java
Additional comments not posted (9)
app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/EnvManagerTest.java (9)

119-148: Great job on updating the variable name!

The changes to use APPSMITH_DB_URL instead of APPSMITH_MONGODB_URI are consistent and correct. This ensures the test reflects the updated environment variable name.


156-167: Nice update on handling empty values!

The transition to APPSMITH_DB_URL is well-executed, and the test correctly handles empty values.


Line range hint 173-199:
Well done on managing quoted values!

The update to APPSMITH_DB_URL is consistent, and the test effectively verifies handling of quoted values.


208-211: Good work on parsing empty values!

The change to APPSMITH_DB_URL is correctly reflected in the test, ensuring accurate parsing of empty values.


221-223: Excellent handling of quoted values!

The update to APPSMITH_DB_URL is consistent, and the test accurately verifies parsing of quoted values.


218-218: No changes related to the PR objectives.

This test method does not involve APPSMITH_DB_URL. No issues are present.


243-248: Great job on handling disallowed variables!

The update to APPSMITH_DB_URL is correctly integrated, ensuring the test accurately handles disallowed variables.


257-265: Nice update on adding new variables!

The transition to APPSMITH_DB_URL is well-executed, and the test effectively verifies the addition of new variables.


275-283: Well done on setting values with quotes!

The update to APPSMITH_DB_URL is consistent, and the test accurately verifies setting values with quotes.

@abhvsn abhvsn requested a review from AnaghHegde August 8, 2024 06:53
@abhvsn abhvsn added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Aug 8, 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: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 32be3e7 and dbef20c.

Files selected for processing (1)
  • app/client/src/pages/AdminSettings/config/advanced.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • app/client/src/pages/AdminSettings/config/advanced.ts

@github-actions
Copy link

github-actions bot commented Aug 8, 2024

Failed server tests

  • com.appsmith.server.solutions.AuthenticationServiceTest#testGetAuthorizationCodeURL_missingDatasource

@abhvsn abhvsn enabled auto-merge (squash) August 8, 2024 07:52
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