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

Offers catalog pagination not working as expected #2493

Closed
ghost opened this issue Feb 16, 2023 · 1 comment · Fixed by #2494
Closed

Offers catalog pagination not working as expected #2493

ghost opened this issue Feb 16, 2023 · 1 comment · Fixed by #2494
Labels
bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Feb 16, 2023

Bug Report

Describe the Bug

This bug relates to #2008.
The fix applied in #2018 didn't resolve the issue completely.
When requesting the catalog using limit and offset queryparams, the number of contractOffers returned does not correspond to the expected.

Steps to Reproduce

Test scenario:

  • 2 Contract definitions with asset selector criteria refering to 50 assets each (Expected total of 100 offers).
  • Consumer requests the catalog from provider using different limit and offset.

Expected Behavior

Behaviour a)
limit=52
offset=0
expected offers: 52

Behaviour b)
limit=2
offset=49
expected offers: 2

Observed Behavior

Behaviour a)
observed offers: 100

behaviour b)
observed offers: 3

Used version

0.0.1-20230213-SNAPSHOT

Possible Implementation

On ContractOfferResolverImpl.queryContractOffers() when skip is a value under 0, limit for next iteration should be the result of the current limit minus the skip.

@ghost ghost added the bug Something isn't working label Feb 16, 2023
@github-actions
Copy link

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

@ndr-brt ndr-brt added this to the Milestone 9 milestone Feb 17, 2023
@ndr-brt ndr-brt assigned ghost Feb 17, 2023
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 a pull request may close this issue.

1 participant