OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

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

Open Piedone opened this issue 6 months ago • 2 comments

Fixes https://github.com/OrchardCMS/OrchardCore/issues/15016.

Note to reviewer: This yet only contains the Azure version. I'll implement the AWS one in an analogous way once that's approved.

Piedone avatar Jan 09 '24 22:01 Piedone

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

Piedone avatar Jan 17 '24 05:01 Piedone

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

github-actions[bot] avatar Jan 29 '24 13:01 github-actions[bot]

I finished the Azure implementation since https://github.com/SixLabors/ImageSharp.Web/pull/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.

Piedone avatar Mar 08 '24 18:03 Piedone

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

github-actions[bot] avatar Mar 13 '24 18:03 github-actions[bot]

Note that https://github.com/OrchardCMS/OrchardCore/pull/15677 needs to be merged before this since this PR includes that one too.

Piedone avatar Apr 07 '24 23:04 Piedone

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

github-actions[bot] avatar Apr 08 '24 20:04 github-actions[bot]

Can you please review this @MikeAlhayek sooner rather than later? With every passing week I forget half of the thing and getting back to it is a pain :).

Piedone avatar Apr 14 '24 23:04 Piedone

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

github-actions[bot] avatar Apr 16 '24 18:04 github-actions[bot]

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

github-actions[bot] avatar Apr 23 '24 22:04 github-actions[bot]

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

Piedone avatar Apr 23 '24 23:04 Piedone

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

coderabbitai[bot] avatar Apr 23 '24 23:04 coderabbitai[bot]

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 fc6d7259f20d072680f92128761924836cde947e and a91d5b61189dc803abef2c41da9249b33599fe98.
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<T>(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: ...<ForgotPasswordForm>`. 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<ResetPasswordForm>`. 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<RegisterUserForm>`. 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<IDisplayResult> UpdateAsync(TModel model, TSection section, IUpdate...


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


Near line 223: Possible spelling mistake found. Context: ...teEditorContext context) 3. **From:** Task<IDisplayResult> 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<WorkflowExecutionContext>>` 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.

coderabbitai[bot] avatar Apr 23 '24 23:04 coderabbitai[bot]

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

Piedone avatar Apr 24 '24 20:04 Piedone

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

MikeAlhayek avatar Apr 24 '24 21:04 MikeAlhayek

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

Piedone avatar Apr 24 '24 21:04 Piedone