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

CASMCMS-9225: Added paging for component listing; add context managers around requests #408

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

mharding-hpe
Copy link
Contributor

@mharding-hpe mharding-hpe commented Dec 18, 2024

This is the main PR for CASMCMS-9225. The summary of the whole shebang is:

  1. Add basic options for GET components requests to allow for paging, so that operators can avoid gigantic responses on large systems.
  2. Make GET components requests more performant, beyond just being pageable
  3. Put context managers around all uses of request resources (sessions, adapters, and responses).
  4. To achieve the previous item, refactor all API clients to resemble the BOS API client.

My plan is to target this for CSM 1.7. A limited backport will go into previous CSM branches, but nothing this extensive, just out of caution.

I split this PR up into a number of sub-PRs, to make the review easier This PR will not be ready to merge until all of its sub-PRs have merged.

Merged:

  1. Added basic paging ability for GET requests to list components
  2. Create generic endpoint classes

Unmerged:
3. Create generic API client class
4. Create ApiClients class and provide it to BOS operators inside a context manager
5. Move PCS client to new paradigm
6. Move BSS client to new paradigm
7. Move CFS client to new paradigm
8. Move BOS client to new paradigm
9. Move IMS client to new paradigm
10. Move HSM client to new paradigm
11. CHANGELOG update, linting, update utils

mharding-hpe and others added 2 commits December 17, 2024 18:19
…ponents (#396)

* CASMCMS-9225: Added basic paging ability for GET requests to list components

* Apply suggestions from code review

* Update src/bos/server/redis_db_utils.py

* Combine id_list and tenant_components in filter function; Immediately return empty list if id_list&tenant_components is empty

* Fix mistake in code review update

* Fix bug in new components logic

* Apply suggestions from code review

Co-authored-by: Jason Sollom <[email protected]>

---------

Co-authored-by: Jason Sollom <[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.

1 participant