Perf: speed up client-side queue filtering in job list#369
Open
dapineyro wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves cloudos job list --filter-queue behavior and perceived responsiveness by scanning jobs client-side more efficiently and reusing HTTP connections, with corresponding documentation and versioning updates.
Changes:
- Add
create_retry_session()and allowretry_requests_get()to reuse a provided session. - Update
Cloudos.get_job_list()to scan from API page 1 with limit=100 when queue filtering, reuse a session, and print scan progress. - Add/extend tests and update docs/changelog; bump version to 2.95.1.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
cloudos_cli/utils/requests.py |
Introduces reusable retry-enabled session utility and threads it into request helpers. |
cloudos_cli/clos.py |
Implements client-side full-scan queue filtering with max page size, session reuse, and progress output. |
tests/test_utils/test_requests.py |
Adds tests for retry session creation and session reuse in retry_requests_get. |
tests/test_clos/test_get_job_list_filtering.py |
Adds tests verifying queue filtering scans from page 1 with limit=100 and aggregates across pages. |
README.md |
Documents client-side queue filtering and scan progress behavior. |
CHANGELOG.md |
Notes the queue-filter scan behavior changes and fixes. |
cloudos_cli/_version.py |
Bumps package version to 2.95.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Scan with the API maximum page size (100) instead of --page-size - Always scan from the first API page so client-side pagination is complete - Reuse a single HTTP session across the scan (new create_retry_session util) - Print scan progress so the command never looks frozen - Bump version to 2.95.1
dapineyro
force-pushed
the
filter_queue_perf_improvement
branch
from
July 16, 2026 16:40
eb70d3f to
3823926
Compare
Comment on lines
1328
to
+1333
| fetch_page = create_client_pagination_callback(my_jobs_r, page_size) | ||
|
|
||
| # Show first page of filtered results | ||
| first_page_jobs = my_jobs_r[:page_size] | ||
| first_page_metadata = { | ||
| 'Pagination-Count': len(my_jobs_r), | ||
| 'Pagination-Page': 1, | ||
| 'Pagination-Limit': page_size | ||
| } | ||
| create_job_list_table(first_page_jobs, cloudos_url, first_page_metadata, selected_columns, fetch_page_callback=fetch_page) | ||
|
|
||
| # Show the requested page of filtered results | ||
| initial_page = fetch_page(page) | ||
| create_job_list_table(initial_page['jobs'], cloudos_url, initial_page['pagination_metadata'], | ||
| selected_columns, fetch_page_callback=fetch_page) |
Comment on lines
65
to
68
| if session is None: | ||
| session = create_retry_session(total, status_forcelist) | ||
| response = session.get(url, **kwargs) | ||
| return response |
Comment on lines
88
to
90
| session = create_retry_session(total, status_forcelist) | ||
| response = session.post(url, **kwargs) | ||
| return response |
Comment on lines
110
to
112
| session = create_retry_session(total, status_forcelist) | ||
| response = session.put(url, **kwargs) | ||
| return response |
Comment on lines
+135
to
+137
| session = create_retry_session(total, status_forcelist, allowed_methods=["DELETE"]) | ||
| response = session.delete(url, **kwargs) | ||
| return response No newline at end of file | ||
| return response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Does this
JIRA
Changes
Acceptance Criteria
Scenario 1 - proof this scenario passes
Scenario 2 - proof this scenario passes
Scenario X - proof this scenario passes
DEV
Proof this feature/patch works in this environment
AZURE
Proof this feature/patch works in this environment
Interactive Analysis
Proof this feature/patch works in this environment