-
Notifications
You must be signed in to change notification settings - Fork 236
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: stop method
property from being mandatory for push http transfers
#3797
Merged
ndr-brt
merged 2 commits into
eclipse-edc:main
from
Think-iT-Labs:3768-stop-checking-method-for-push-http-transfer
Jan 25, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't expect that this will solve the issue regarding the
HttpPush
. This will disable the feature of proxying http methods for theHttpPush
, as now just "GET" requests will be sent to the providing backend.Our expectation would be that http-methods also could be proxied for the
HttpPush
. We could also help providing this fix, if this is more convenient.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply, for http push this condition won't ever met, and it will pass through line 60, so the
method
will be taken from theDataAddress
(as it already does) if it's defined, otherwise it will use the defaultGET
.To verify that, just try to remove the
proxyMethod
property and setmethod
instead on the source data address.The proxy was made to work with
pull
, not forpush
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh yes, I have overlooked this: The
HttpPush
will use themethod
from theDataAddress
.This would implicate that certain
HttpData
assets can just be used forHttpProxy
transfer-types and not forHttpData
transfer-types. However it would make sense to also support this for theHttpPush
.So basically this would be a feature request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theoretically yes, I'm not sure which would be the applications for that: the consumer should be the one who chose how the call to its service will be made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The applications would be the same as for the
http-pull
I think.So for the
http-pull
theconsumer
is able to select the preferred http-method, which is used to access theprovider
system. This is enabled by using theprxoyMethod=true
property in the asset of the provider.For the
http-push
the transfer is also started by theconsumer
. Like for thehttp-pull
theconsumer
should be able to select the prefered http-method, which is used to access theprovider
system.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in any case, also without the
proxyMethod
flag to true, the consumer can choose the method, that by default isGET
. Really, all theproxyXXX
stuff is there for theproxy
use case ("nomen omen").There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ndr-brt,
I'm sry for coming back on this so lately, but this change is really important to us and I may not have understood this correctly.
After giving this a second look, I am also convinced, that this change won't affect passing methods for the
HttpPush
from the consumer.My problem was, that I though the
HttpDataAddress address
parameter is always populated by theSourceDataAddress
:Connector/extensions/data-plane/data-plane-http/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSourceHttpParamsDecorator.java
Lines 55 to 61 in cf629c9
but it turns out it also gets called for the
DestinationDataAddress
:Connector/extensions/data-plane/data-plane-http/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestParamsProviderImpl.java
Lines 54 to 68 in cf629c9
So indeed the
extractMethod
returns the method specified by theDestinationDataAddress
.Did I understood this correctly?
Thanks for fixing this!