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

Add iterators to unified resource cache #52103

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

rosstimothy
Copy link
Contributor

This updates the UnifiedResourceCache with IterateResources as an alternative to IterateUnifiedResources. The new function returns an iterator instead of collecting and returning a page of results. While this API may not entirely replace the current one, it offers a better way for users that just want to iterate resources without collecting them. Additionally, a few helper methods were included for callers that might wish to only iterate one specific resource type. Internally the UnifiedResourceCache was refactored to use the same logic for all exposed iteration methods.

@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label Feb 12, 2025
@rosstimothy rosstimothy force-pushed the tross/urc_iteration branch 4 times, most recently from 124228e to ff4cc96 Compare February 13, 2025 21:11
@rosstimothy rosstimothy force-pushed the tross/urc_iteration branch 8 times, most recently from b43230f to 3621abd Compare February 15, 2025 22:19
@rosstimothy rosstimothy marked this pull request as ready for review February 18, 2025 14:51
@github-actions github-actions bot requested review from ravicious and Tener February 18, 2025 14:52
This updates the UnifiedResourceCache with IterateResources as an
alternative to IterateUnifiedResources. The new function returns
an iterator instead of collecting and returning a page of results.
While this API may not entirely replace the current one, it offers
a better way for users that just want to iterate resources without
collecting them. Additionally, a few helper methods were included
for callers that might wish to only iterate one specific resource
type. Internally the UnifiedResourceCache was refactored to use the
same logic for all exposed iteration methods.
@rosstimothy rosstimothy added this pull request to the merge queue Feb 20, 2025
Merged via the queue into master with commit fca4ecf Feb 20, 2025
42 checks passed
@rosstimothy rosstimothy deleted the tross/urc_iteration branch February 20, 2025 18:56
@public-teleport-github-review-bot

@rosstimothy See the table below for backport results.

Branch Result
branch/v17 Failed

rosstimothy added a commit that referenced this pull request Feb 21, 2025
This updates the UnifiedResourceCache with IterateResources as an
alternative to IterateUnifiedResources. The new function returns
an iterator instead of collecting and returning a page of results.
While this API may not entirely replace the current one, it offers
a better way for users that just want to iterate resources without
collecting them. Additionally, a few helper methods were included
for callers that might wish to only iterate one specific resource
type. Internally the UnifiedResourceCache was refactored to use the
same logic for all exposed iteration methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/lg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants