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

[main] Make retrieval of tasks in bulk instead of small increments #3275

Merged

Conversation

joaopapereira
Copy link
Contributor

@joaopapereira joaopapereira commented Nov 1, 2024

Description of the Change

In this PR we change the way tasks are retrieved in CLI to lower the load that it currently has in CAPI when there are a big number of tasks associated with a particular application

Related to #3274

Copy link
Member

@a-b a-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good improvement. What other commands could benefit from this technique?

- Fix issue, where code was always doing 2 requests even when it was
  able to get all the tasks in the first request

Signed-off-by: João Pereira <[email protected]>
@joaopapereira joaopapereira force-pushed the bulk-retrieval-of-tasks branch from 6a3e72e to adb2258 Compare November 4, 2024 15:42
@joaopapereira joaopapereira merged commit 971e960 into cloudfoundry:main Nov 6, 2024
19 checks passed
@joaopapereira joaopapereira deleted the bulk-retrieval-of-tasks branch November 6, 2024 22:37
gururajsh pushed a commit to gururajsh/cli that referenced this pull request Dec 12, 2024
…loudfoundry#3275)

* Make retrieval of tasks in bulk instead of small increments

Signed-off-by: João Pereira <[email protected]>

* Address PR comments

- Fix issue, where code was always doing 2 requests even when it was
  able to get all the tasks in the first request

Signed-off-by: João Pereira <[email protected]>

* Fix lack of output

Signed-off-by: João Pereira <[email protected]>

* Remove extra tasks from first request

Signed-off-by: João Pereira <[email protected]>

* Hardcode version because no tag exists for main branch

Signed-off-by: João Pereira <[email protected]>

* Change approach by providing the query parameters always to the request

Signed-off-by: João Pereira <[email protected]>

---------

Signed-off-by: João Pereira <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants