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

Missing transferType in sample transfer/streaming/streaming-01-http-to-http #334

Closed
klumbe opened this issue Nov 6, 2024 · 6 comments · Fixed by #335
Closed

Missing transferType in sample transfer/streaming/streaming-01-http-to-http #334

klumbe opened this issue Nov 6, 2024 · 6 comments · Fixed by #335
Labels

Comments

@klumbe
Copy link
Contributor

klumbe commented Nov 6, 2024

Bug Report

Describe the Bug

Sample:

  • transfer/streaming/streaming-01-http-to-http

Action:

curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/transfer.json -X POST "http://localhost:28181/management/v3/transferprocesses" -s | jq

Explanation:
When trying to start the transfer, the returned JSON states that the transferType is missing or blank.
No transfer process is started.

Error:

Expected Behavior

The transfer-process is started on both the consumer and provider end and an id for the transfer is returned:

{
  "@type": "IdResponse",
  "@id": "<uuid>",
  "createdAt": 1730894147658,
  "@context": {
    "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
    "edc": "https://w3id.org/edc/v0.0.1/ns/",
    "odrl": "http://www.w3.org/ns/odrl/2/"
  }
}

Observed Behavior

Error:

[
  {
    "message": "mandatory value 'https://w3id.org/edc/v0.0.1/ns/transferType' is missing or it is blank",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/transferType",
    "invalidValue": null
  }
]

Steps to Reproduce

Steps to reproduce the behavior:

Context Information

  • Used commit: da78c98
  • OS: Ubuntu 24.04

Detailed Description

Things I tried to solve it:

  • Adding a transferTypeof various kinds:
    • HttpData-Push
    • HttpStreaming
    • Http Streaming
      i.e.:
    {
      "@context": {
        "@vocab": "https://w3id.org/edc/v0.0.1/ns/"
      },
      "@type": "TransferRequest",
      "dataDestination": {
        "type": "HttpData",
        "baseUrl": "http://localhost:4000"
      },
      "protocol": "dataspace-protocol-http",
      "assetId": "stream-asset",
      "contractId": "{{contract-agreement-id}}",
      "connectorId": "provider",
      "counterPartyAddress": "http://localhost:18182/protocol",
      "transferType": "HttpData-PUSH"
    }

-> For HttpData-PUSH returns a proper ID, but on the provider, the following error is shown:

SEVERE 2024-11-06T12:55:48.969041699 TransferProcess: ID <uid>. Fatal error while Initiate data flow. Error details: DataPlane not found
WARNING 2024-11-06T12:55:48.969065369 DataPlane not found

The transfer-process is terminated shortly after.
-> The others claim an invalid transferType (expected):

[
  {
    "message": "Property transferType not valid: Failed to extract flow type from transferType HttpStreaming",
    "type": "InvalidRequest",
    "path": null,
    "invalidValue": null
  }
]
  • Tried changing the dataDestination/typeto HttpStreaming having the same issues

Possible Implementation

@github-actions github-actions bot added the triage label Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

Thanks for your contribution 🔥 We will take a look asap 🚀

@wolf4ood
Copy link
Contributor

wolf4ood commented Nov 6, 2024

Hi @klumbe

thanks for raising this, indeed the transferType is now required.

I tried with "transferType": "HttpData-PUSH" in transfer.json and it worked

@ndr-brt
Copy link
Member

ndr-brt commented Nov 6, 2024

Interesting that tests are still passing.
@klumbe would you like to provide a PR to fix this?

@wolf4ood
Copy link
Contributor

wolf4ood commented Nov 6, 2024

Yeah they pass but we build the request manually in code

https://github.com/eclipse-edc/Samples/blob/main/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/Streaming01httpToHttpTest.java#L106

We probably just have to update the transfer.json file

@ndr-brt
Copy link
Member

ndr-brt commented Nov 6, 2024

Yeah they pass but we build the request manually in code

https://github.com/eclipse-edc/Samples/blob/main/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/Streaming01httpToHttpTest.java#L106

We probably just have to update the transfer.json file

definitely my fault 🥲 test should use the transfer.json file as well

@klumbe
Copy link
Contributor Author

klumbe commented Nov 6, 2024

Hi @klumbe

thanks for raising this, indeed the transferType is now required.

I tried with "transferType": "HttpData-PUSH" in transfer.json and it worked

Hi @wolf4ood,
indeed, had a typo (case) in the ServiceExtension declaration, which caused the successive issues.

Interesting that tests are still passing. @klumbe would you like to provide a PR to fix this?

Hi @ndr-brt,
I did. Is my first one, so let me know if there are issues with it.
Also provided a fix for the other open issue in the same rush.

ndr-brt pushed a commit that referenced this issue Nov 11, 2024
* fix: add missing assigner to contract request #244

* fix: add missing transferType to transfer request #334

* fix: use json in test case for streaming01

* fix: checksytle for Streaming01 test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants