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

Chunk matching resource requests with more than 5000 elements #1222

Closed
anthonydahanne opened this issue Feb 28, 2024 · 0 comments
Closed

Chunk matching resource requests with more than 5000 elements #1222

anthonydahanne opened this issue Feb 28, 2024 · 0 comments

Comments

@anthonydahanne
Copy link
Contributor

the problem

With v3 of the CAPI API, it seems like it's impossible to create a package with more than 5000 matched resources.

If you try it, you may run into this issue:

[ERROR]: Errors occured during script execution. Errors are:
- Application push operation failed. Root cause of the failure should be mentioned below
- CF-UnprocessableEntity(10008): Resources array can have at most 5000 resources
org.cloudfoundry.client.v3.ClientV3Exception: CF-UnprocessableEntity(10008): Resources array can have at most 5000 resources

the suggested solution

The fix would be to chunk such large requests into chunks of request with 5000 max resources.

anthonydahanne added a commit to anthonydahanne/cf-java-client that referenced this issue Feb 28, 2024
…ources

* CAPI, with v3 API, is limited to returning responses with max 5000 max matched resources; so we chunk them into request with max 5000 matched resources
* first try
anthonydahanne added a commit to anthonydahanne/cf-java-client that referenced this issue Feb 28, 2024
…ources

* CAPI, with v3 API, is limited to returning responses with max 5000 max matched resources; so we chunk them into request with max 5000 matched resources
* update code that calls the request instead of the request code itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant