Skip to content

Refactored Run_event.py to iterator pattern - #97

Merged
isivaselvan merged 1 commit into
hashicorp:next-0.1.3from
NimishaShrivastava-dev:refactoring-iterator-run-event
Mar 5, 2026
Merged

Refactored Run_event.py to iterator pattern#97
isivaselvan merged 1 commit into
hashicorp:next-0.1.3from
NimishaShrivastava-dev:refactoring-iterator-run-event

Conversation

@NimishaShrivastava-dev

@NimishaShrivastava-dev NimishaShrivastava-dev commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Summary
Refactored the RunEvents service to use the iterator pattern for its list method, consistent with the approach used in Runs and OAuthTokens.
Updated the run events example script to consume the new iterator-based API.
Added and improved unit tests for RunEvents to cover iterator behavior, input validation, and edge cases.
Ensured all tests, formatting, and linting checks pass.
Details
The list method in RunEvents now yields RunEvent objects directly, supporting efficient and memory-friendly iteration.
Example and tests were updated to us
Screenshot 2026-02-26 at 12 21 50 PM
the new iterator interface.
All checks (formatting, linting, and tests) pass successfully.
Screenshot 2026-02-25 at 2 27 27 PM

Output from examples/run_events.py.

Listing Run Events for Run: run-EiwQ7sASaG7YXUuW

Total run events: N/A

Event ID: re-izdfk5ngTMAtDC7N
Action: created
Description: N/A
Created At: 2025-12-08 15:47:46.329000+00:00

================================================================================
Summary

Successfully demonstrated run events for run: run-EiwQ7sASaG7YXUuW
Total events found: N/A

@NimishaShrivastava-dev
NimishaShrivastava-dev requested a review from a team as a code owner February 26, 2026 06:54
@isivaselvan
isivaselvan merged commit b3a8acb into hashicorp:next-0.1.3 Mar 5, 2026
11 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