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

fix: streaming-02-kafka-to-http:fix issues with contract negotiation … #357

Merged

Conversation

Juboy
Copy link
Contributor

@Juboy Juboy commented Feb 4, 2025

…and data transfer json requests

What this PR changes/adds

Issues around running streaming-02-kafka-to-http sample. Issues with contract negotiation and date transfer

Fixed transfer/streaming/streaming-02-kafka-to-http/5-negotiate-contract.json file by including the odrl context.
Fixed transfer/streaming/streaming-02-kafka-to-http/6-transfer.json file by including the transfer type

Why it does that

The contract negotiation was failing because the contract definition was missing the ODRL context, which is required for policy evaluation. Adding the correct ODRL context ensures that contract negotiation can be processed successfully.

Similarly, the transfer process was not working correctly because the transfer type was missing. Including the transfer type explicitly defines the expected data exchange format, allowing the transfer to proceed without errors.

Linked Issue(s)

Closes #339

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'We are always happy to welcome new contributors ❤️ To make things easier for everyone, please - make sure to follow our contribution guidelines, - check if you have already signed the ECA, and - relate this pull request to an existing issue or discussion.'

@ndr-brt ndr-brt self-requested a review February 5, 2025 10:02
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you open an issue to fix the behavior also in sample streaming-03? I think that's broken as well

assertThat(request).isNotNull();
assertThat(request.getBody().readByteArray()).isEqualTo(message.getBytes());
});
await().atMost(TIMEOUT).untilAsserted(() -> assertThat(LOG_CONSUMER.toUtf8String()).contains(message));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I see room for another improvement in the HttpRequestLoggerContainer: I would encapsulate the possibility to get the log into it, so test won't have to deal with this "log consumer" in the tests but just with the container instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want this to be part of this PR? @ndr-brt
Or created as a different issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Juboy different issue will work well

@Juboy
Copy link
Contributor Author

Juboy commented Feb 5, 2025

Thanks @ndr-brt
I'll work on the comments

@Juboy Juboy added the bug Something isn't working label Feb 5, 2025
@Juboy Juboy requested a review from ronjaquensel as a code owner February 5, 2025 14:58
@Juboy Juboy requested a review from ndr-brt February 6, 2025 09:38
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -12,7 +12,7 @@ runs:
run: ${{ inputs.command }}

- name: Upload Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact this action and the relative "publish test results" job in the verify have been removed so long ago from all the other repos, they can be removed from here as well. Different issue tho :)

@ndr-brt ndr-brt merged commit 0c83232 into eclipse-edc:main Feb 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple errors in sample transfer/streaming/streaming-02-kafka-to-http
2 participants