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

Adding Azure and AWS-specific Image Caches of ImageSharp (Lombiq Technologies: OCORE-136) #15028

Merged
merged 61 commits into from
Apr 24, 2024

Conversation

Piedone
Copy link
Member

@Piedone Piedone commented Jan 9, 2024

Fixes #15016.

@Piedone Piedone marked this pull request as draft January 9, 2024 22:22
@Piedone
Copy link
Member Author

Piedone commented Jan 17, 2024

Could you please review this first draft @MikeAlhayek while I'm waiting for the ImageSharp PR to be approved?

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

# Conflicts:
#	src/OrchardCore.Build/Dependencies.props
#	src/OrchardCore.Modules/OrchardCore.Media.Azure/Manifest.cs
#	src/OrchardCore.Modules/OrchardCore.Media.Azure/MediaBlobContainerTenantEvents.cs
#	src/docs/releases/1.9.0.md
@Piedone
Copy link
Member Author

Piedone commented Mar 8, 2024

I finished the Azure implementation since SixLabors/ImageSharp.Web#353 was merged. @MikeAlhayek could you please review again, And if we're happy with the Azure one, I'll do the same for AWS.

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

@@ -169,6 +164,13 @@ nav:
- ReCaptcha: docs/reference/modules/ReCaptcha/README.md
- Resources: docs/reference/modules/Resources/README.md
- Rules: docs/reference/modules/Rules/README.md
- Search, Indexing, Querying:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Search, Indexing, Querying:
- Search:

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the same as the section on the page: https://docs.orchardcore.net/en/latest/docs/reference/#search-indexing-querying And that looks good so, since while these are tightly related topics, it's not just search (like SQL queries have nothing to do with search, but queries in general do relate to Lucene and Elasticsearch, which are about indexing, and usually, but not necessarily search...)

Copy link
Member

Choose a reason for hiding this comment

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

The term should be Search. `Indexing and Querying are implementation details for search.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indexing maybe, but Queries is about much more than search. SQL Queries (i.e. the module feature) doesn't have anything to do with search nor indexing, and you can use both Lucene and Elasticsearch querying (e.g. listing all content items with the type Blog Post) without utilizing them for full-text search. That's why I'm saying these three are tightly related, but the whole feature set is neither just search, nor just querying, nor just indexing.

}
}
}

public static AwsStorageOptions BindConfiguration(this AwsStorageOptions options, IShellConfiguration shellConfiguration, ILogger logger)
public static IAwsStorageOptions BindConfiguration(this IAwsStorageOptions options, string configSection, IShellConfiguration shellConfiguration, ILogger logger)
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need an interface here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't necessarily do, a base class is also enough, removed it.


// The order should exceed that of the 'OrchardCore.Media' module to substitute the default implementation of 'IImageCache'.
// there.
public override int Order => 5;
Copy link
Member

Choose a reason for hiding this comment

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

Same as above, using Media constant would be better for maintenance.

Copy link
Member

Choose a reason for hiding this comment

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

@Piedone yes this was resolved. But, we should re-name all these Constant.cs classes to something more specific like MediaConstants for the media specific one and other names for the others.

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

# Conflicts:
#	src/OrchardCore.Build/Dependencies.props
Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

@Piedone
Copy link
Member Author

Piedone commented Apr 23, 2024

I think CodeRabbit didn't look in detail enough :D. @coderabbitai review

Copy link
Contributor

coderabbitai bot commented Apr 23, 2024

@Piedone, I will now proceed with a detailed review of the PR. Please expect feedback shortly.

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

coderabbitai bot commented Apr 23, 2024

Walkthrough

Walkthrough

The recent changes focus on expanding media storage and image caching capabilities in OrchardCore by integrating AWS S3 and Azure Blob Storage. These updates introduce new dependencies, configuration options, and services to support ImageSharp image caching on these platforms. Documentation and module names have been revised to reflect these enhancements and provide clearer configuration guidance.

Changes

File Path Change Summary
mkdocs.yml, src/docs/reference/README.md Reordered and updated navigation items and documentation links.
src/OrchardCore.Build/.../Dependencies.props
src/OrchardCore.Media.AmazonS3/OrchardCore.Media.AmazonS3.csproj
src/OrchardCore.Media.Azure/OrchardCore.Media.Azure.csproj
Added dependencies for ImageSharp providers and updated project references.
src/OrchardCore.Cms.Web/appsettings.json
src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/AmazonS3Constants.cs
.../AwsStorageOptionsExtension.cs
.../AwsStorageOptions.cs
.../BlobStorageOptions.cs
Updated configuration settings and constants related to AWS S3 and Azure Blob Storage.
src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/...
.../OrchardCore.Media.Azure/Services/...
Introduced new services and configurations for AWS S3 and Azure Blob image caching and storage management.
src/docs/reference/modules/Media.AmazonS3/README.md
.../Media.Azure/README.md
Updated module documentation to reflect new features and configuration details for AWS S3 and Azure Blob Storage.
src/docs/releases/1.9.0.md Documented new features and enhancements in the upcoming release.

The table summarizes the significant changes, grouping similar modifications across various files for clarity and brevity.


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between fc6d725 and a91d5b6.
Files selected for processing (1)
  • src/docs/releases/1.9.0.md (1 hunks)
Additional Context Used
LanguageTool (120)
src/docs/releases/1.9.0.md (120)

Near line 7: Add a space between sentences.
Context: ...released ## Breaking Changes ### Drop Newtonsoft.Json Support The utilization of [Newtonsof...


Near line 9: Possible spelling mistake found.
Context: ...soft.Json` Support The utilization of [Newtonsoft.Json](https://www.nuget.org/packages/Ne...


Near line 9: Add a space between sentences.
Context: ...Support The utilization of [Newtonsoft.Json](https://www.nuget.org/packages/Newtons...


Near line 9: Add a space between sentences.
Context: ...ort The utilization of Newtonsoft.Json has been discontinued in both **YesSql...


Near line 9: Possible spelling mistake found.
Context: ...t.Json) has been discontinued in both YesSql and OrchardCore. Instead, we have...


Near line 9: Possible spelling mistake found.
Context: ...n discontinued in both YesSql and OrchardCore. Instead, we have transitioned to uti...


Near line 9: Add a space between sentences.
Context: ...nstead, we have transitioned to utilize System.Text.Json due to its enhanced performance c...


Near line 9: Add a space between sentences.
Context: ...abilities. To ensure compatibility with System.Text.Json during the serialization or deser...


Near line 9: Possible spelling mistake found.
Context: ....Text.Json` during the serialization or deserialization of objects, the following steps need to...


Near line 11: Possible spelling mistake found.
Context: ...ge how you register it by using the new AddDeployment<> extension. This extension adds a new...


Near line 25: Possible spelling mistake found.
Context: ...>(); ``` - If you are using a custom AdminMenu node, change how you register it by usi...


Near line 25: Possible spelling mistake found.
Context: ...ge how you register it by using the new AddAdminNode<> extension. This extension adds a new...


Near line 25: Possible spelling mistake found.
Context: ...d of registering your custom admin menu nodep like this: ```csharp services.AddSingl...


Near line 39: This word is normally spelled as one.
Context: ... property (a base type that can contain sub-classes instances) needs to register all possib...


Near line 39: This word is normally spelled as one.
Context: ...stances) needs to register all possible sub-classes this way: ```csharp services.AddJsonDe...


Near line 51: Possible spelling mistake found.
Context: ...duced in custom modules inheriting from MenuItem, AdminNode, Condition, `ConditionO...


Near line 51: Possible spelling mistake found.
Context: ...tom modules inheriting from MenuItem, AdminNode, Condition, ConditionOperator, `Qu...


Near line 51: Possible spelling mistake found.
Context: ...m MenuItem, AdminNode, Condition, ConditionOperator, Query, SitemapType will have to r...


Near line 51: Possible spelling mistake found.
Context: ...ndition, ConditionOperator, Query, SitemapType` will have to register the class using ...


Near line 51: Add a space between sentences.
Context: ...ll have to register the class using the services.AddJsonDerivedTypeInfo<> method. For example, ```csharp serv...


Near line 57: Possible spelling mistake found.
Context: ...lQuery, Query>(); ``` - The extension PopulateSettings<T>(model) was removed from `PartFieldD...


Near line 57: Possible spelling mistake found.
Context: ...ateSettings(model)was removed fromPartFieldDefinition`. If you are using this method in your ...


Near line 84: Possible spelling mistake found.
Context: ...ebranded to X. If you were using the OrchardCore_Twitter configuration key to configure...


Near line 84: Possible spelling mistake found.
Context: ... please update the configuration key to OrchardCore_X. The OrchardCore_Twitter key conti...


Near line 84: Possible spelling mistake found.
Context: ...nfiguration key to OrchardCore_X. The OrchardCore_Twitter key continues to work but will...


Near line 84: Possible missing comma found.
Context: ...chardCore_Twitter` key continues to work but will be deprecated in a future release....


Near line 88: Possible spelling mistake found.
Context: ...uture release. ### Users Module - The Login.cshtml has undergone a significant revamp. Th...


Near line 88: Possible spelling mistake found.
Context: ...gone a significant revamp. The previous AfterLogin zone, which allowed filters for inject...


Near line 88: Possible spelling mistake found.
Context: ...ct shapes using drivers by implementing IDisplayDriver<LoginForm>. For example, the 'Forgot P...


Near line 114: Possible spelling mistake found.
Context: ...Location("Links:5"); } } ``` - The ForgotPassword.cshtml has undergone a significant rev...


Near line 114: Possible spelling mistake found.
Context: ...gone a significant revamp. The previous AfterForgotPassword zone, which allowed filters for inject...


Near line 114: Possible spelling mistake found.
Context: ...ct shapes using drivers by implementing IDisplayDriver<ForgotPasswordForm>. For example, the ...


Near line 114: Possible spelling mistake found.
Context: ...`. For example, the ReCaptcha shape is injected using the following d...


Near line 140: Possible spelling mistake found.
Context: ...on("Content:after"); } } ``` - The ResetPassword.cshtml has undergone a significant rev...


Near line 140: Possible spelling mistake found.
Context: ...gone a significant revamp. The previous AfterResetPassword zone, which allowed filters for inject...


Near line 140: Possible spelling mistake found.
Context: ...ct shapes using drivers by implementing IDisplayDriver<ResetPasswordForm>. For example, the R...


Near line 140: Possible spelling mistake found.
Context: ...r`. For example, the ReCaptcha shape is injected using the following d...


Near line 166: Possible spelling mistake found.
Context: ...ently, the Email property on both the ForgotPasswordViewModel and ResetPasswordViewModel have been...


Near line 166: Possible spelling mistake found.
Context: ... both the ForgotPasswordViewModel and ResetPasswordViewModel have been deprecated and should be rep...


Near line 166: Possible spelling mistake found.
Context: ...ted and should be replaced with the new UsernameOrEmail property for password resets. - The `...


Near line 168: Possible spelling mistake found.
Context: ...lproperty for password resets. - TheRegister.cshtml` has undergone a significant revamp. Th...


Near line 168: Possible spelling mistake found.
Context: ...gone a significant revamp. The previous AfterRegister zone, which allowed filters for inject...


Near line 168: Possible spelling mistake found.
Context: ...ct shapes using drivers by implementing IDisplayDriver<RegisterUserForm>. For example, the Re...


Near line 168: Possible spelling mistake found.
Context: ...er`. For example, the ReCaptcha shape is injected using the following d...


Near line 195: Possible missing comma found.
Context: ...if you want to continue to index .PDF file you'll need to enable the `OrchardCore....


Near line 195: Add a space between sentences.
Context: ...x .PDF file you'll need to enable the OrchardCore.Media.Indexing.Pdf feature. Additionally, i...


Near line 197: Add a space between sentences.
Context: ...t, .mdextensions, you will need theOrchardCore.Media.Indexing.Text` feature. If you need to...


Near line 199: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e.Media.Indexing.Text` feature. If you need to enable indexing for other extensions li...


Near line 199: Add a space between sentences.
Context: ....docx, or .pptx), you will need the OrchardCore.Media.Indexing.OpenXML feature. ### SMS Mod...


Near line 203: Possible spelling mistake found.
Context: ... the past, we utilized the injection of ISmsProvider for sending SMS messages. However, in ...


Near line 203: Possible spelling mistake found.
Context: ... release, it is now necessary to inject ISmsService instead. Additionally, Twilio provi...


Near line 209: Possible spelling mistake found.
Context: ...f the UpdateAsync() method within the SectionDisplayDriver base class have undergone modification...


Near line 209: Possible spelling mistake found.
Context: ...eviously, these signatures accepted the BuildEditorContext parameter. However, with this update, ...


Near line 209: Possible spelling mistake found.
Context: ... update, all signatures now require the UpdateEditorContext instead. This alteration necessitates ...


Near line 213: Possible spelling mistake found.
Context: ...e the updated signatures: 1. From: `Task UpdateAsync(TModel model, TSection section, IUpdate...


Near line 218: Possible spelling mistake found.
Context: ...teEditorContext context) 2. **From:** Task UpdateAsync(TSection section, IUpdateModel updater, BuildEditorContext context)` ...


Near line 223: Possible spelling mistake found.
Context: ...teEditorContext context) 3. **From:** Task UpdateAsync(TSection section, BuildEditorContext context) **To:** Task<IDisplayR...


Near line 228: Possible spelling mistake found.
Context: ...ce to the latest conventions within the SectionDisplayDriver class. ## Change Logs ### Azure AI S...


Near line 234: Possible spelling mistake found.
Context: ... For more info read the Azure AI Search docs. ### New ImageSharp Im...


Near line 236: Possible spelling mistake found.
Context: ...AzureAISearch/README.md) docs. ### New ImageSharp Image Caches for Azure Blob and AWS S3 ...


Near line 238: Possible spelling mistake found.
Context: ... new features for replacing the default PhysicalFileSystemCache of ImageSharp that stores resized imag...


Near line 238: Possible spelling mistake found.
Context: ...Azure Blob Storage with the Azure Media ImageSharp Image Cache feature (that utilizes [`Az...


Near line 238: Possible spelling mistake found.
Context: ...harp Image Cache feature (that utilizes [AzureBlobStorageImageCache](https://docs.sixlabors.com/articles/i...


Near line 238: Possible spelling mistake found.
Context: ...che)), and AWS S3 with the Amazon Media ImageSharp Image Cache feature (that utilizes [`AW...


Near line 238: Add a space between sentences.
Context: ...s advantages. Check out the Azure Media and [the Amazon S3 Media](.....


Near line 238: Add a space between sentences.
Context: ...zure/README.md) and the Amazon S3 Media docs for details. ### Deplo...


Near line 250: Possible spelling mistake found.
Context: ...>(). ### Workflow Module The method Task TriggerEventAsync(string name, IDictionary<string, object...


Near line 251: Possible spelling mistake found.
Context: ...lated = false) was changed to returnTask<IEnumerable>` instead. ...


Near line 253: Possible spelling mistake found.
Context: ...flowExecutionContext>>instead. #### CorrelationId **Breaking change:**CreateContentTas...


Near line 255: Possible spelling mistake found.
Context: ...### CorrelationId Breaking change: CreateContentTask, RetrieveContentTask, and `UpdateCon...


Near line 256: Possible spelling mistake found.
Context: ...Breaking change:** CreateContentTask, RetrieveContentTask, and UpdateContentTask, in previous ...


Near line 256: Possible spelling mistake found.
Context: ...ontentTask, RetrieveContentTask, and UpdateContentTask`, in previous versions, the workflow's ...


Near line 256: Possible spelling mistake found.
Context: ...`, in previous versions, the workflow's CorrelationId was updated each time with the ContentI...


Near line 256: Possible spelling mistake found.
Context: ...lationId was updated each time with the ContentItemId of the current content item; Now, the C...


Near line 257: Possible spelling mistake found.
Context: ...d of the current content item; Now, the CorrelationId value will only be updated if the curre...


Near line 257: Possible spelling mistake found.
Context: ...ly be updated if the current workflow's CorrelationId is empty. Also added a workflow-scoped...


Near line 259: Possible spelling mistake found.
Context: ...at you can use to update the workflow's CorrelationId. ### GraphQL Module When identifying...


Near line 264: Possible spelling mistake found.
Context: ...tereotyped content types. A new option, DiscoverableSterotypes, has been introduced in `GraphQLConten...


Near line 264: Possible spelling mistake found.
Context: ...ableSterotypes, has been introduced in GraphQLContentOptions`. This allows you to specify stereotype...


Near line 266: Possible spelling mistake found.
Context: ...ve several content types stereotyped as ExampleStereotype, you can make them discoverable by inc...


Near line 277: Add a space between sentences.
Context: ...otype"); }); ``` ### Email Module The OrchardCore.Email module has undergone a refactoring pro...


Near line 279: Possible spelling mistake found.
Context: ... - Previously, we used the injection of ISmtpService for sending email messages. In this re...


Near line 279: Possible spelling mistake found.
Context: ... release, it is now necessary to inject IEmailService instead. - The SMTP related service...


Near line 280: Add a space between sentences.
Context: ...ices are now part of a new module named OrchardCore.Email.Smtp. To use the SMTP provider for sen...


Near line 280: Add a space between sentences.
Context: ...provider for sending emails, enable the OrchardCore.Email.Smtp feature. - If you were using the...


Near line 281: Possible spelling mistake found.
Context: ...Smtpfeature. - If you were using theOrchardCore_Email` configuration key to set up the ...


Near line 281: Possible spelling mistake found.
Context: ... please update the configuration key to OrchardCore_Email_Smtp. The OrchardCore_Email ke...


Near line 281: Possible spelling mistake found.
Context: ...on key to OrchardCore_Email_Smtp. The OrchardCore_Email key continues to work but will b...


Near line 281: Possible missing comma found.
Context: ...OrchardCore_Email` key continues to work but will be deprecated in a future release....


Near line 282: Add a space between sentences.
Context: ...ommunication Services Email. Click here to read more about the ACS m...


Near line 286: Possible spelling mistake found.
Context: ...ers have been added. When incorporating INavigationProvider in your project, you can now utilize `...


Near line 286: Add a space between sentences.
Context: ...rin your project, you can now utilizeNavigationHelper.IsAdminMenu(name)` instead of the previous approach...


Near line 286: It appears that a white space is missing.
Context: ... instead of the previous approach using `string.Equals(name, "admin", StringComparison.OrdinalI...


Near line 331: Please check whether ‘root’ (underground organ of a plant) might be the correct word here instead of ‘route’ (an established line of travel).
Context: ...ameters for a custom route template and route name. It works just like the `[Route(te...


Near line 331: Possible missing comma found.
Context: ...e controller or the action; if both are specified then the action's template takes preced...


Near line 331: Please check whether ‘root’ (underground organ of a plant) might be the correct word here instead of ‘route’ (an established line of travel).
Context: ...action's template takes precedence. The route name can contain {area}, `{controller...


Near line 331: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...}`, which are substituted during mapping so the names can be unique for each action...


Near line 346: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: .../Person(or by the route namePerson`), because its own action-level attribute took pre...


Near line 346: Possible spelling mistake found.
Context: ... at ~/Admin/Person/Create (route name PersonCreate) and Edit for the person whose identif...


Near line 346: Only proper nouns start with an uppercase character (there are exceptions for headlines).
Context: ...Create(route namePersonCreate`) and Edit for the person whose identifier string ...


Near line 346: Possible spelling mistake found.
Context: ...t ~/Admin/Person/john-doe (route name PersonEdit). ### Users Module Added a new User ...


Near line 352: Possible spelling mistake found.
Context: ...ulture per user from the admin UI. ### Navbar Added a new Navbar() function to Liq...


Near line 354: Possible spelling mistake found.
Context: ... the admin UI. ### Navbar Added a new Navbar() function to Liquid to allow building...


Near line 354: Possible spelling mistake found.
Context: ...unction to Liquid to allow building the Navbar shape using Liquid. Here are the steps...


Near line 354: Possible spelling mistake found.
Context: ...d. Here are the steps needed to add the Navbar shape into your custom Liquid shape: ...


Near line 356: Possible spelling mistake found.
Context: ...g of the layout.liquid file to enable navbar items to potentially contribute to the ...


Near line 356: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ... items to potentially contribute to the resources output as necessary. ``` {% assign nav...


Near line 361: A comma may be missing after the conjunctive/linking adverb ‘Subsequently’.
Context: ...bar = Navbar() | shape_render %} ``` 2. Subsequently in the layout.liquid file, invoke the...


Near line 369: Possible spelling mistake found.
Context: ...ar }} ``` ### Notifications Module TheINotificationMessage interface was updated to includes the ...


Near line 369: Only proper nouns start with an uppercase character (there are exceptions for headlines).
Context: ...s updated to includes the addition of a Subject field, which facilitates the rendering...


Near line 371: Possible spelling mistake found.
Context: .... Furthermore, the introduction of the NotificationOptions provides configuration capabilities fo...


Near line 371: An apostrophe may be missing.
Context: ...ides configuration capabilities for the notifications module. This structure comprises the fo...


Near line 373: Loose punctuation mark.
Context: ...ttributes: - TotalUnreadNotifications: This property determines the maximum nu...


Near line 374: Loose punctuation mark.
Context: ...- DisableNotificationHtmlBodySanitizer: By default, the HtmlBody of notificat...


Near line 374: Possible spelling mistake found.
Context: ...tionHtmlBodySanitizer: By default, the HtmlBody` of notifications generated from workfl...


Near line 382: Possible spelling mistake found.
Context: ...------- | ------------------------ | | ChangeEmailTokenProviderOptions | The token is valid by default for **...


Near line 383: Possible spelling mistake found.
Context: ...lid by default for 15 minutes. | | EmailConfirmationTokenProviderOptions | The token is valid by default for **...


Near line 384: Possible spelling mistake found.
Context: ...valid by default for 48 hours. | | PasswordResetTokenProviderOptions | The token is valid by default for **...


Near line 386: Add a space between sentences.
Context: ...lt values of these options by using the services.Configure<> method. For instance, to change the ...


Near line 386: Possible spelling mistake found.
Context: ...<>method. For instance, to change theEmailConfirmationTokenProviderOptions` you can add the following code to your...


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.

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

Out of diff range and nitpick comments (17)
src/OrchardCore.Modules/OrchardCore.Media.Azure/MediaBlobStorageOptionsBase.cs (1)

5-5: Consider adding XML documentation for MediaBlobStorageOptionsBase to explain its purpose and usage.

src/OrchardCore.Modules/OrchardCore.Media.Azure/Helpers/OptionsFluidParserHelper.cs (1)

6-44: The OptionsFluidParserHelper class provides a robust mechanism for parsing and formatting strings using the Fluid template engine, tailored to the needs of the Azure module. While the functionality is correctly implemented, the similarity with another class in the AmazonS3 module suggests a potential area for future refactoring to reduce code duplication.

Consider refactoring to combine similar functionalities from Azure and AmazonS3 modules into a shared utility class to adhere to the DRY principle and simplify maintenance.

src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Helpers/OptionsFluidParserHelper.cs (1)

6-45: The OptionsFluidParserHelper class in the AmazonS3 module functions similarly to its counterpart in the Azure module, providing essential parsing and formatting capabilities using the Fluid template engine. The implementation is correct, but as noted earlier, this is an area where future refactoring could help reduce code duplication.

Consider refactoring to combine similar functionalities from Azure and AmazonS3 modules into a shared utility class to adhere to the DRY principle and simplify maintenance.

src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/AwsStorageOptionsConfiguration.cs (1)

27-49: The configuration method is well-structured. Consider adding more specific error details in the log messages to aid in debugging.

src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/AwsImageSharpImageCacheOptionsConfiguration.cs (1)

27-49: Configuration method is well-implemented. Consider enhancing the error messages for better clarity and maintenance.

src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobStorageOptionsConfiguration.cs (1)

28-53: The configuration method is well-structured. Consider adding more specific error details in the log messages to aid in debugging.

src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/ImageSharpBlobImageCacheOptionsConfiguration.cs (1)

27-53: The configuration method is well-structured. Consider adding more specific error details in the log messages to aid in debugging.

src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/AwsStorageOptionsExtension.cs (1)

53-60: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [31-62]

The BindConfiguration method is well-implemented. Consider enhancing the error messages for better clarity and maintenance.

src/docs/reference/modules/Media.AmazonS3/README.md (8)

1-1: Add a space after the period to separate the sentences for better readability.


5-5: Add a space after the period to separate the sentences for better readability.


Line range hint 11-11: Add a space after the period to separate the sentences for better readability.


56-56: This sentence should start with an uppercase letter for consistency.


72-72: Add a space after the period to separate the sentences for better readability.


223-223: Add a space after the period to separate the sentences for better readability.


Line range hint 194-194: Fenced code blocks should have a language specified to enable syntax highlighting. Consider adding "json" as the language identifier.

- ```
+ ```json

Line range hint 200-200: Fenced code blocks should have a language specified to enable syntax highlighting. Consider adding "bash" as the language identifier.

- ```
+ ```bash
mkdocs.yml (1)

175-181: Clarify the section title to better represent the content.

The discussion between Piedone and MikeAlhayek highlights a disagreement on the naming of the section. It's important to ensure the section title accurately reflects the content it covers. Consider a title that encompasses Search, Indexing, and Querying without misleading about the scope, such as "Data Retrieval and Search".

@Piedone
Copy link
Member Author

Piedone commented Apr 24, 2024

Anything else here @MikeAlhayek or can we merge (because while you approved, we had conversations ongoing)?

@MikeAlhayek
Copy link
Member

nothing to add. if you already tested, it can be merged

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

Out of diff range and nitpick comments (5)
src/docs/releases/1.9.0.md (5)

Line range hint 9-9: Add a space between sentences for better readability.


238-238: Add a space between sentences for better readability.


Line range hint 250-250: Consider removing trailing spaces for cleaner code formatting.


Line range hint 280-280: Consider removing trailing spaces for cleaner code formatting.


Line range hint 286-286: Consider adding a space after the comma for better readability.

@Piedone
Copy link
Member Author

Piedone commented Apr 24, 2024

I did that each time before requesting review, yes. Great then!

@Piedone Piedone merged commit 18efbf2 into OrchardCMS:main Apr 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature to use the Azure or AWS-specific Image Caches of ImageSharp
2 participants