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

Multiple errors in sample transfer/streaming/streaming-02-kafka-to-http #339

Open
arekusutarakasiku opened this issue Nov 15, 2024 · 4 comments
Labels
good first issue Good for newcomers triage

Comments

@arekusutarakasiku
Copy link

arekusutarakasiku commented Nov 15, 2024

Bug Report

Describe the Bug

Sample
transfer/streaming/streaming-02-kafka-to-http

Action

Start negotiate contract
curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/5-negotiate-contract.json -X POST "http://localhost:28181/management/v3/contractnegotiations" -s | jq [
Explanation
when trying to start negotiate contract with 5-negotiate-contract.json the returned json states that the multiple fields are missing or blank.

Expected Behavior

contract-negotiation-id in json will be returned

Observed Behavior

[
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/@type was expected to be http://www.w3.org/ns/odrl/2/Offer but it was not",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/@type",
    "invalidValue": [
      "https://w3id.org/edc/v0.0.1/ns/Offer"
    ]
  },
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/assigner/@id cannot be null or blank",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/assigner/@id",
    "invalidValue": null
  },
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/target/@id cannot be null or blank",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/target/@id",
    "invalidValue": null
  }

Steps to Reproduce

Steps to reproduce the behavior:
Follow
(https://github.com/eclipse-edc/Samples/tree/main/transfer/streaming/streaming-02-kafka-to-http)

Context Information

Used commit: 1d55b7c
OS: Ubuntu 24.04

Detailed Description

Same in https://github.com/eclipse-edc/Samples/tree/main/transfer/streaming/streaming-03-kafka-broker

Possible Implementation

  • 5-negotiate-contract.json
{
  "@context": {
    "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
    "odrl": "http://www.w3.org/ns/odrl/2/"
  },
  "@type": "ContractRequest",
  "counterPartyAddress": "http://localhost:18182/protocol",
  "protocol": "dataspace-protocol-http",
  "policy": {
    "@context": "http://www.w3.org/ns/odrl.jsonld",
    "@id": "{{offerId}}",
    "@type": "Offer",
    "permission": [],
    "prohibition": [],
    "obligation": [],
    "odrl:assigner": {
      "@id": "provider"
    },
    "odrl:target": {
      "@id": "kafka-stream-asset"
    }
  }
}
  • 6-transfer.json
  "@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"
}
Copy link

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

@ndr-brt
Copy link
Member

ndr-brt commented Nov 15, 2024

this is somewhat related to what happened here: #334
because the test covering the samples are not using the same payloads as the samples themselves.
@arekusutarakasiku would you feel comfortable in contribute with a PR? (some inspiration can be drawn from here: #335)

@arekusutarakasiku
Copy link
Author

I've changed 5-negotiate-contract.json and 6-transfer.json(s. Possible implementation).
But on stepconsume events-step, but nothing appeared in n the console of the http-request-logger.
@ndr-brt , do you have any idea why?

@ndr-brt
Copy link
Member

ndr-brt commented Nov 22, 2024

I've changed 5-negotiate-contract.json and 6-transfer.json(s. Possible implementation). But on stepconsume events-step, but nothing appeared in n the console of the http-request-logger. @ndr-brt , do you have any idea why?

no clue, without knowing what you changed and if there's any information on the console output it's hard to tell.

@ndr-brt ndr-brt added the good first issue Good for newcomers label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers triage
Projects
None yet
Development

No branches or pull requests

2 participants