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

fix: default port numbers for the datasources #32901

Merged
merged 39 commits into from Apr 30, 2024

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented Apr 23, 2024

Description

This PR covers arango, elasticSearch, mongo, mssql, mysql, oracle, postgres, redis, redshift, smtp datasources for setting the default port values for each. This adds a test case that tests the default port values for all

This PR also fixes the cypress flakiness for reconnect datasources modal, datasources forms, etc.

Reopening the pr as the issue with the test failures was due to release build cache.
Find the RCA : https://www.notion.so/appsmith/Default-port-value-Pr-introduced-test-failures-RCA-0043049215064257862ba4f678113bb3
Related PRs :
#32592
#32726

Fixes #32136
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.JS, @tag.Datasource, @tag.Fork, @tag.Git"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8890151587
Commit: c142bb3
Cypress dashboard url: Click here!

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Added a test to verify the default port for Microsoft SQL Server data sources.
    • Enhanced input handling for various database configurations, ensuring fields are cleared before new values are typed.
    • Improved error message clarity in test scenarios.
    • Updated Oracle test case to include verification of default port and mandatory indicators.
  • Bug Fixes

    • Refined the control flow for clearing text fields to ensure focus before clearing, enhancing usability and accuracy in data entry.
  • Refactor

    • Modified input value updating methods across several classes to improve data handling consistency and test reliability.
    • Adjusted conditional logic and method arguments in EntityExplorer and Table classes for better code structure and readability.
  • Tests

    • Revised several regression and sanity test scripts to incorporate new input handling methods and validate enhanced functionalities.

@github-actions github-actions bot added Activation for Activation group Activation - datasources issues related to activation projects Activation Pod for Activation group Ballpark: XXS ~1xDev in 1/2xSprint Integrations Pod Issues related to a specific integration potential-duplicate This label marks issues that are potential duplicates of already open issues Task A simple Todo labels Apr 23, 2024
Copy link
Contributor

coderabbitai bot commented Apr 23, 2024

Walkthrough

This update primarily focuses on enhancing input handling across various database configurations in a testing environment, specifically by replacing UpdateInputValue with ClearNType for more reliable input clearing and typing actions. Additionally, the default port settings for data sources are now ensured, and user interface interactions, such as clearing text fields, have been refined for better focus and clarity.

Changes

File Path Change Summary
.../DataSources.ts Replaced UpdateInputValue with ClearNType for various database ports and credentials.
.../AggregateHelper.ts Enhanced ClearTextField by adding a focus step before clearing.
.../BugTests/DSDiscardBugs_spec.ts and others Replaced UpdateInputValue with ClearNType in various test specifications.
.../ConnectionErrors_Spec.ts and Oracle_Spec.ts Refined validation messages and updated test case descriptions for Oracle.
.../MsSQL_Basic_Spec.ts Added test for verifying default port in Microsoft SQL Server plugin.
.../CommunityTemplates.ts, .../EntityExplorer.ts, .../Table.ts General method replacement from UpdateInputValue to ClearNType.
.../MockPluginsState.ts Added an initialValue field for the "Port" configuration.

Assessment against linked issues

Objective Addressed Explanation
Port in datasources form should be set by default (#32136) The MockPluginsState.ts file includes an initialValue for the port, ensuring that it is set by default in the datasources form. This aligns with the issue's requirement for default port settings.

This assessment confirms that the changes implemented in the pull request directly address the objectives specified in the linked issue, with a specific focus on enhancing the reliability and clarity of data input and handling within the application's testing framework.


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration 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.

@AmanAgarwal041 AmanAgarwal041 added the ok-to-test Required label for CI label Apr 23, 2024
@github-actions github-actions bot added the Bug Something isn't working label Apr 23, 2024
@AmanAgarwal041 AmanAgarwal041 removed the ok-to-test Required label for CI label Apr 23, 2024
Copy link

Failed server tests

  • com.appsmith.server.solutions.ApplicationForkingServiceTests#cloneApplicationForkWithConfigurationFalseWithActionsThrice

@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 25, 2024
@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 26, 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: 1

app/client/cypress/support/Pages/EntityExplorer.ts Outdated Show resolved Hide resolved
Copy link

Failed server tests

  • com.appsmith.server.imports.internal.ImportServiceTests#importApplication_WhenUpdateLayoutFailures_Success

@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 26, 2024
@AmanAgarwal041 AmanAgarwal041 requested review from trishaanand and removed request for trishaanand April 26, 2024 10:01
@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 26, 2024
@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 30, 2024
@NilanshBansal NilanshBansal self-requested a review April 30, 2024 06:15
@AmanAgarwal041 AmanAgarwal041 merged commit 796a4c8 into release Apr 30, 2024
42 checks passed
@AmanAgarwal041 AmanAgarwal041 deleted the fix/32136-ds-default-port branch April 30, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Activation - datasources issues related to activation projects Activation Pod for Activation group Activation for Activation group Ballpark: XXS ~1xDev in 1/2xSprint Bug Something isn't working Integrations Pod Issues related to a specific integration ok-to-test Required label for CI potential-duplicate This label marks issues that are potential duplicates of already open issues Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port in datasources form should be set by default
2 participants