-
Notifications
You must be signed in to change notification settings - Fork 251
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
DPF: add TransferRequestDto id #1188
DPF: add TransferRequestDto id #1188
Conversation
We could also allow the client optionally not to generate an ID, and have the server generate one in that case. Personally I'd rather not add code paths that are not necessary, as this creates more testing and validation work - the client can just generate a random UUID. Agree @ndr-brt @bscholtes1A @paullatzelsperger ? As discussed, I am fine with the proposed approach. Even if I think that putting it as optional would be even better, i.e. if no id provided in the Dto, then a random id is generated internally. |
|
@algattik I agree on generating a random UUID in the case the |
As discussed, I am also in favor of generating a random id if none is provided in the request, i.e. make id optional. @paullatzelsperger WDYT? |
8a2dcf0
to
2bcadf4
Compare
Codecov Report
@@ Coverage Diff @@
## main #1188 +/- ##
============================================
- Coverage 62.65% 58.46% -4.19%
+ Complexity 2981 2728 -253
============================================
Files 694 698 +4
Lines 15428 15469 +41
Branches 1048 1047 -1
============================================
- Hits 9666 9044 -622
- Misses 5331 6002 +671
+ Partials 431 423 -8
Continue to review full report at Codecov.
|
@ndr-brt @bscholtes1A thanks for the feedback, I've implemented "generating a random id if none is provided in the request" per this discussion. |
2bcadf4
to
326d859
Compare
What this PR changes/adds
Add id to TransferRequestDto and support it in converter to TransferRequest
Why it does that
If different data transfers are created (POST /api/v1/data/transferprocess) for the same asset, the same ID is returned back. The reason is that the DataTransfer.id field is not populated (as it is not present in DataTransferDto), and the idempotency mechanism in TransferProcessManagerImpl#initiateRequest is based on it.
Further notes
Also deleted a (unused) duplicate
TransferRequestDto
classLinked Issue(s)
Closes #1182
Checklist
no-changelog
)