-
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
docs: add decision record about IDS filtering #1983
docs: add decision record about IDS filtering #1983
Conversation
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.
comments inline.
docs/developer/decision-records/2022-09-18-ids-requests-filtering/README.md
Outdated
Show resolved
Hide resolved
looping thought all of the `ContractOffers`, there is a need to narrow the results down to even single offer. For example, and | ||
`Asset` might hold the 'special' type of data (like registry or database) and should be searchable by its type. | ||
|
||
## Approach |
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.
IMO this section can be shortened because only two things need to be done:
- replace the use of
Range
(for paging) withQuerySpec
, for full querying capabilities - swap out the (flattened) serialization of the
Range
with object serialization of theQuerySpec
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.
Done.
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.
Done.
nope, not quite :) Please highlight that transmitting the Range
needs to be replaced by transmitting the entire QuerySpec
. Filtering is only one aspect of it. Sorting is another.
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.
@paullatzelsperger I'm not sure that introducing QuerySpec
is the way to go, since the "range" part actually doesn't limit ContractOffer
s, but ContractDefinition
(if you request a catalog with 50 item you could end up receiving more than 50 contract offers, because of the flatMap
behavior in the service), while the criteria
part would filter only the Asset
s.
In my opinion the ContractOfferQuery
object should be used, adding definitionsRange
and assetCriteria
fields, this will make the process explicit
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.
@paullatzelsperger what do you think about @ndr-brt reasoning? I agree with such argument.
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.
@ndr-brt @maciejkizlich-zf here's a weird thing: ContractOfferQuery.getCriteria()
, .getOffset()
and .getLimit()
appear not to be used anywhere, at least IntelliJ doesn't report any findings.
Could we just use those fields? We might even be able to remove the range
parameter from the ContractOfferServiceImpl.queryContractOffers
then.
I agree with the opinion that query parameters should affect the list of assets/offers, not the definitions. If that's the case it needs to get fixed.
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.
@maciejkizlich-zf could you adapt your PR as per my last comment regarding the ContractOfferQuery
?
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.
@paullatzelsperger please take a look now, I've added a part regarding ContractOfferQuery.
And yes, we should be able to remove Range from the queryContractOffers(). Also, I'd replace .getOffset and getLimit() with just getRange().
docs/developer/decision-records/2022-09-18-ids-requests-filtering/README.md
Outdated
Show resolved
Hide resolved
docs/developer/decision-records/2022-09-18-ids-requests-filtering/README.md
Outdated
Show resolved
Hide resolved
docs/developer/decision-records/2022-09-18-ids-requests-filtering/README.md
Outdated
Show resolved
Hide resolved
looping thought all of the `ContractOffers`, there is a need to narrow the results down to even single offer. For example, and | ||
`Asset` might hold the 'special' type of data (like registry or database) and should be searchable by its type. | ||
|
||
## Approach |
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.
Done.
nope, not quite :) Please highlight that transmitting the Range
needs to be replaced by transmitting the entire QuerySpec
. Filtering is only one aspect of it. Sorting is another.
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.
@paullatzelsperger We will just ignore the fact that there is an IDS message type in place that is designed for passing query statements, right? Paging was an issue, but querying has already been considered, even before to the current discussions.
docs/developer/decision-records/2022-09-18-ids-requests-filtering/README.md
Outdated
Show resolved
Hide resolved
@juliapampus Which message would that be? Generally though, we're adding features to a stack that will get replaced in the very near future (i.e. IDS Multipart), so I would like to keep the change small and simple |
For the record: We discussed this bilateral. Correct IDS messages would be |
What this PR changes/adds
Add decision record about filtering ContractOffers by Asset's properties.
Linked Issue(s)
Filter catalog by assets properties
Checklist
no-changelog
)