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: self signed certificates value set in the props #32474

Merged
merged 2 commits into from Apr 8, 2024

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented Apr 5, 2024

Description

Earlier the useSelfSignedCert value for the rest api datasource was not being sent from the transformer to the props. After this pr the value is being sent to the props which will persist the changed data instead of overriding it with initialvalues where the useSelfSignedCert was not selected. Fixed the data-location-id for the form control as well from selfsignedcert to authentication.useSelfSignedCert, just like the other form control values.

Fixes #26598
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.Datasource"

🔍 Cypress test results

Important

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

Summary by CodeRabbit

  • Refactor
    • Improved the handling of self-signed certificates in REST API datasource configurations.

@github-actions github-actions bot added BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Datasources Issues related to configuring datasource on appsmith High This issue blocks a user from building or impacts a lot of users Integrations Pod Issues related to a specific integration Low effort Takes 1-2 days Needs Triaging Needs attention from maintainers to triage OAuth OAuth related bugs or features Production labels Apr 5, 2024
Copy link
Contributor

coderabbitai bot commented Apr 5, 2024

Walkthrough

The changes involve updating the handling and identification of self-signed certificates in an API datasource configuration. Specifically, the data-location-id attribute in the UI component and the addition of the useSelfSignedCert property in the authentication data transformation process are updated to ensure the correct functionality of the "Use Self-Signed Certificate for Authorization requests" checkbox, addressing a bug where this checkbox would not retain its checked state upon saving.

Changes

File Path Change Summary
.../DataSourceEditor/RestAPIDatasourceForm.tsx Changed data-location-id from btoa("selfsignedcert") to btoa("authentication.useSelfSignedCert").
.../transformers/RestAPIDatasourceFormTransformer.ts Added useSelfSignedCert property to datasourceToFormAuthentication function.

Assessment against linked issues

Objective Addressed Explanation
Ensure the "Use Self-Signed Certificate for Authorization requests" checkbox retains its checked state upon saving (#26598).

Possibly related issues

  • [Task]: Fix cypress test suite failures caused by PR #29794 #30378: This issue discusses the need to address failures in the Cypress test suite due to recent changes. Given the nature of the changes made in this PR, it's possible that these updates could impact automated tests, especially those related to datasource configuration and authentication. If the Cypress tests include scenarios for testing the persistence of the "Use Self-Signed Certificate for Authorization requests" checkbox, this PR could be directly related to ensuring those tests pass.

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
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@AmanAgarwal041 AmanAgarwal041 requested review from sneha122 and removed request for ayushpahwa April 5, 2024 20:17
@AmanAgarwal041 AmanAgarwal041 added the ok-to-test Required label for CI label Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

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

Copy link

github-actions bot commented Apr 5, 2024

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

@sneha122
Copy link
Contributor

sneha122 commented Apr 8, 2024

Tested the PR, changes look good @AmanAgarwal041

@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 8, 2024
@trishaanand trishaanand merged commit ed23046 into release Apr 8, 2024
41 of 42 checks passed
@trishaanand trishaanand deleted the fix/26598-self-signed-cert-value branch April 8, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Coders Pod Issues related to users writing code to fetch and update data Bug Something isn't working Datasources Issues related to configuring datasource on appsmith High This issue blocks a user from building or impacts a lot of users Integrations Pod Issues related to a specific integration Low effort Takes 1-2 days Needs Triaging Needs attention from maintainers to triage OAuth OAuth related bugs or features ok-to-test Required label for CI Production
Projects
None yet
3 participants