Skip to content

Refactoring2/iterator pattern/run#91

Merged
isivaselvan merged 3 commits intohashicorp:next-0.1.3from
NimishaShrivastava-dev:Refactoring/iterator-pattern/run
Feb 27, 2026
Merged

Refactoring2/iterator pattern/run#91
isivaselvan merged 3 commits intohashicorp:next-0.1.3from
NimishaShrivastava-dev:Refactoring/iterator-pattern/run

Conversation

@NimishaShrivastava-dev
Copy link
Copy Markdown
Contributor

Converted the run resource listing methods to use the Iterator pattern instead of returning ModelList objects.

Changes

Updated Runs.list() to return Iterator[Run]
Updated Runs.list_for_organization() to return Iterator[Run]
Both methods now use the internal _list() helper for pagination
Updated examples/run.py to convert iterators to lists where needed
Updated unit tests to mock _list() and verify data transformation
Testing

All 396 tests pass
No breaking changes to public API
Models remain unchanged for backward compatibility
Related

Aligns with iterator pattern used in policy_evaluation and oauth_token resources

@NimishaShrivastava-dev NimishaShrivastava-dev requested a review from a team as a code owner February 23, 2026 07:24
@hashicorp-cla-app
Copy link
Copy Markdown

hashicorp-cla-app bot commented Feb 23, 2026

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@isivaselvan isivaselvan merged commit 65ebe3e into hashicorp:next-0.1.3 Feb 27, 2026
20 checks passed
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