[PUBLISHING-193] Allow HttpClientProvider to be injected Created: 17/Mar/23  Updated: 18/Apr/23  Resolved: 12/Apr/23

Status: Closed
Project: Publishing
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.0, 1.3.9

Type: Improvement Priority: Medium
Reporter: Philipp Gaschuetz Assignee: Daniel Alonso
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 7.5h Time Spent: 7.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
PUBLISHING-210 Implementation Sub-task Completed Daniel Alonso  
PUBLISHING-211 PiQA Sub-task Completed Adam Siska  
PUBLISHING-212 QA Sub-task Completed Quach Hao Thien  
PUBLISHING-213 Backport 6.2 Impl Sub-task Completed Daniel Alonso  
PUBLISHING-214 PiQA 6.2 Sub-task Completed Adam Siska  
PUBLISHING-215 Code review Sub-task Completed Adam Siska  
PUBLISHING-223 Update publishing artifact dependency... Sub-task Completed Daniel Alonso  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Epic Link: Maintenance of Publishing module
Sprint: Nucleus 33, Nucleus 34
Story Points: 2
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

A pull request for this issue has been created at https://git.magnolia-cms.com/projects/MODULES/repos/publishing/pull-requests/114/overview

 
info.magnolia.publishing.sender.http.HttpClientProvider was recently added to the code base. It is used to create an Apache HttpClient for the respective ReceiverDefinition.

While this is a welcomed addition, it is not configurable, since it is privately instantiated in info.magnolia.publishing.sender.AbstractSender
 
We have several public instances, which require different proxy settings on the HttpClient.
 
Previously, we extended HttpCommitOperation and HttpRollbackOperation (which get instantiated by the Sender), while this is still somewhat possible, the public visible constructors are now Deprecated - effectively rendering our solution a dead end.
 
Please make the HttpClientProvider properly injectable - this would allow us to override the component.

Fixing this issue globally in the Sender seems to be the most reasonable and universally applicable approach.



 Comments   
Comment by Roman Kovařík [ 21/Mar/23 ]

Hi pgaschuetz,

sounds good, I'll add some tasks to the PR to resolve when the ticket will be tackled.

 

Regards

Roman

Comment by Philipp Gaschuetz [ 21/Mar/23 ]

Great, thanks!

Kindly note, that within that process, info.magnolia.publishing.transactional.sender.TransactionalSender would need to be adapted as well.

I didn't go down that route, as one depends on the other...

Generated at Mon Feb 12 10:36:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.