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

Issue while getting devices by tenantId using pagination. #3535

Open
vaibhvgupta opened this issue Aug 24, 2023 · 4 comments
Open

Issue while getting devices by tenantId using pagination. #3535

vaibhvgupta opened this issue Aug 24, 2023 · 4 comments
Labels
bug MongoDB Device Registry issues related to the Device Registry implementation based on MongoDB

Comments

@vaibhvgupta
Copy link

I've tried getting devices by tenant Id with pagination but this api behaving incorrectly.
i.e- If you have 10 devices in a tenant, and you want to show 8 in a page then, the api is giving every pageOffset 8 records that is wrong, and also the filter json is not working, please have look into this issue.

1: API URL - https://hono.eclipseprojects.io:28443/v1/devices/My-Tenant?pageSize=8&pageOffset=0 is showing 8 records.
2: API URL - https://hono.eclipseprojects.io:28443/v1/devices/My-Tenant?pageSize=8&pageOffset=1 is also showing 8 records, it should be 2 only.

Also please have look on filterJson issue.

@sophokles73
Copy link
Contributor

Thanks for reporting.

If you believe that there is also an issue with filtering results, then please create a dedicated issue for the specific problem that you experience. A statement like

the filter json is not working

is not helpful without any context and detail information.

@sophokles73
Copy link
Contributor

I have created some additional unit tests in order to be able to reproduce the erroneous behavior. However, the unit tests all succeed and I have no clue (yet) why this would fail on the Sandbox. Next step will be to add some integration tests as well ...

@sophokles73 sophokles73 added MongoDB Device Registry issues related to the Device Registry implementation based on MongoDB and removed Device Registry labels Sep 4, 2023
@vaibhvgupta
Copy link
Author

I have created some additional unit tests in order to be able to reproduce the erroneous behavior. However, the unit tests all succeed and I have no clue (yet) why this would fail on the Sandbox. Next step will be to add some integration tests as well ...

@sophokles73 are you able to fix that issue ?

@sophokles73
Copy link
Contributor

I have extended the unit and integration tests in PR #3541 but they all succeed locally. Do you experience the erroneous behavior also with a local installation of Hono?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug MongoDB Device Registry issues related to the Device Registry implementation based on MongoDB
Projects
None yet
Development

No branches or pull requests

2 participants