Skip to content

chore: Dummy to run CI on external contributor's PR : add support for Google Cloud Storage in S3 plugin#34010

Closed
NilanshBansal wants to merge 12 commits intoreleasefrom
chore/issue-6877/dummy-external-33938
Closed

chore: Dummy to run CI on external contributor's PR : add support for Google Cloud Storage in S3 plugin#34010
NilanshBansal wants to merge 12 commits intoreleasefrom
chore/issue-6877/dummy-external-33938

Conversation

@NilanshBansal
Copy link
Contributor

@NilanshBansal NilanshBansal commented Jun 6, 2024

Description

The original PR is #33938

CI cannot be run on PR which is from a fork other than appsmith.

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.All"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9400512558
Commit: 0552330
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 support for Google Cloud Storage in the datasource configuration.
  • Tests

    • Added a new test to validate datasource configurations for non-Amazon providers.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jun 6, 2024
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

Walkthrough

The recent updates introduce support for Google Cloud Storage in the Amazon S3 plugin. Key changes include adding constants and logic to handle Google Cloud Storage endpoints in the DatasourceUtils.java file, and a new test in AmazonS3PluginTest.java to validate configurations for non-Amazon providers.

Changes

Files Changed Change Summary
app/.../amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java Imported constants from S3PluginConstants, added GOOGLE_CLOUD_STORAGE enum, updated logic for Google Cloud Storage endpoints.
app/.../amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java Imported constants using wildcard, added testValidateDatasourceWithMissingRegionWithNonAmazonProvider test method.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant Application
    participant DatasourceUtils
    participant S3ClientBuilder
    User->>Application: Configure Google Cloud Storage
    Application->>DatasourceUtils: Call getS3ClientBuilder
    DatasourceUtils->>S3ClientBuilder: Handle Google Cloud Storage endpoint
    S3ClientBuilder-->>DatasourceUtils: Return configured builder
    DatasourceUtils-->>Application: Return S3 client
    Application-->>User: Confirm configuration
Loading

Poem

In the realm of clouds, a change so grand,
Google joins the storage band.
Constants aligned, enums in place,
S3 now with a broader embrace.
Tests to ensure all is well,
In code's embrace, new stories to tell.
🌥️📦✨


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

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

Outside diff range and nitpick comments (1)
app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java (1)

102-102: Refactor imports to avoid wildcard imports.

Using wildcard imports can lead to namespace pollution and make it unclear which classes are being used. Consider importing only the necessary classes explicitly.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a73082d and e520bff.

Files selected for processing (6)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java (3 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/constants/S3PluginConstants.java (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/exceptions/S3ErrorMessages.java (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java (6 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/resources/form.json (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java (3 hunks)
Files skipped from review due to trivial changes (1)
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java
Additional comments not posted (11)
app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/constants/S3PluginConstants.java (3)

8-8: LGTM! Ensure that the index 3 aligns with the actual position in the properties array.


17-17: LGTM! Ensure that this constant is used consistently across the plugin for Google Cloud Storage.


18-18: LGTM! Please verify the usage of AUTO across the plugin to ensure it aligns with its intended purpose.

#!/bin/bash
# Description: Verify the usage of the `AUTO` constant across the plugin.

# Test: Search for the constant usage. Expect: Relevant and consistent usage.
rg --type java $'AUTO'
app/server/appsmith-plugins/amazons3Plugin/src/main/resources/form.json (2)

46-49: LGTM! The new dropdown option for Google Cloud Storage is correctly added.


115-125: LGTM! The conditional visibility of the "Default Bucket" field based on the storage option is correctly implemented.

app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/exceptions/S3ErrorMessages.java (2)

21-22: LGTM! The error message for non-existent buckets in Google Cloud Storage is clear and specific.


133-136: LGTM! The error message for missing default bucket parameter in Google Cloud Storage is clear and specific.

app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java (2)

68-68: LGTM! The addition of GOOGLE_CLOUD_STORAGE to the S3ServiceProvider enum is correctly implemented.


157-163: LGTM! The updated logic to handle Google Cloud Storage endpoints in getS3ClientBuilder is correctly implemented.

#!/bin/bash
# Description: Verify the usage of the `AUTO` constant in the context of Google Cloud Storage.

# Test: Search for the constant usage in the method. Expect: Relevant and consistent usage.
rg --type java $'AUTO' --context 5
app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java (2)

951-961: Validate the presence of the default bucket for Google Cloud Storage.

The validation logic correctly checks if the default bucket is specified when the service provider is Google Cloud Storage. This is crucial for ensuring that the datasource configuration is complete before attempting operations.


1015-1041: Implement a separate testing method for Google Cloud Storage.

The new method testGoogleCloudStorage is a good addition for modularizing the testing logic specific to Google Cloud Storage. This helps in isolating the testing logic per provider, making the code cleaner and easier to manage.

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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e520bff and e90b178.

Files selected for processing (5)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java (3 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/constants/S3PluginConstants.java (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/exceptions/S3ErrorMessages.java (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java (5 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java (2 hunks)
Files skipped from review as they are similar to previous changes (5)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/constants/S3PluginConstants.java
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/exceptions/S3ErrorMessages.java
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java

AnnaHariprasad5123 and others added 2 commits June 7, 2024 06:39
…b.com:AnnaHariprasad5123/appsmith into chore/issue-6877/dummy-external-33938
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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e90b178 and 1dbbd5f.

Files selected for processing (2)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java (6 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java

AnnaHariprasad5123 and others added 2 commits June 7, 2024 14:19
…b.com:AnnaHariprasad5123/appsmith into chore/issue-6877/dummy-external-33938
@NilanshBansal
Copy link
Contributor Author

Closing this PR in lieu of #34075

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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1dbbd5f and b25d453.

Files selected for processing (2)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java (6 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/utils/DatasourceUtils.java
  • app/server/appsmith-plugins/amazons3Plugin/src/test/java/com/external/plugins/AmazonS3PluginTest.java

@NilanshBansal NilanshBansal deleted the chore/issue-6877/dummy-external-33938 branch September 17, 2024 08:05
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