Open chef-davin opened 3 years ago
I'm running into this too with this API call.
/api/v0/cfgmgmt/nodes?pagination.page=1&pagination.size=4000'
Anything over pagination.size of ~3000 results in the same grpc error.
Version: 2 Build: 20210504084406
Describe the bug
https://docs.chef.io/automate/api/#operation/ReportingService_ListNodes says that you should be able to return up to 10,000 nodes per page in the results of your api query. However, we're seeing the following error when trying to get results for more than 5-7,000 nodes (depending on environment):
To Reproduce
Steps to reproduce the behavior:
/usr/bin/curl -s -H "api-token: XXXXXXXXX" https://automate.example.com/api/v0/compliance/reporting/nodes/search -H "Content-Type: application/json" -X POST --data '{"filters": [{"type": "","values": [""]}],"id": "","order": "ASC","page": 1,"per_page": 8000,"sort": "","type": ""}'
against the automate instanceIt's important to note that you need to actually have the number of compliance scan results you're trying to pull. If you set the page size to 10000 nodes-per-page, and you only have 1 node, this error won't come up. You need to actually have the 10k node compliance scan results on your automate server to replicate this error (hence using chef-load).
Expected behavior
This should return a JSON list of node objects with their compliance reporting status. It would look something like this (though much more than one node being reported):
If we are currently limiting the output of API queries in the API to 4MB, it would be nice if this was a configurable setting so that users could adjust that based on their needs in querying the API.
Versions (please complete the following information):
Aha! Link: https://chef.aha.io/epics/SH-E-508