This repository was archived by the owner on Jan 23, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Add pre/post lease hooks #606
Open
kirkbrauer
wants to merge
24
commits into
main
Choose a base branch
from
add-hooks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
615f9ea
Add pre/post lease hooks
kirkbrauer 6b9d788
Add enums and exporter status reporting
kirkbrauer fed2db1
Improve logging infrastructure
kirkbrauer f872fa8
Fix circular dependency in logging.py
kirkbrauer edac078
Update hook behavior to match spec
kirkbrauer b707e48
Improve hook error handling
kirkbrauer d72ba30
Add strongly-typed Protobuf and gRPC codegen and refactor exporter fo…
kirkbrauer 263cfc9
Improve messaging and typing
kirkbrauer 5ce073d
Finish refactoring the Exporter class and improve hooks handling
kirkbrauer 67d947c
Fix broken tests due to field name change and status not being correct
kirkbrauer 66647e4
Fix typing issues
kirkbrauer 777786e
Fix controller registration issue
kirkbrauer 5c3125a
Add status field to jmp admin get exporter
kirkbrauer e9eb369
Fix lease status race condition causing E2E tests to fail
kirkbrauer 5b4c812
Fix additional status update race conditions breaking E2E
kirkbrauer f737f0d
Fix unit test failures
kirkbrauer fc1f54d
Fix broken unit tests
kirkbrauer 18fe16d
Fix CodeRabbit warnings for previous_leased
kirkbrauer 74f0c11
Fix hooks race condition
kirkbrauer efb7b39
Fix exit on hook failure and exit code handling
kirkbrauer 5ccc484
Enable executing j commands within hooks
kirkbrauer 8d1a510
Add post-lease hook streaming
kirkbrauer 953d6dc
Improve lease handling and eliminate race conditions causing leases t…
kirkbrauer ff3a5cc
Use separate channel for hooks and clients to prevent timeout issues
kirkbrauer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,8 @@ def get(): | |
| @opt_output_all | ||
| @opt_comma_separated( | ||
| "with", | ||
| {"leases", "online"}, | ||
| help_text="Include fields: leases, online (comma-separated or repeated)" | ||
| {"leases", "online", "status"}, | ||
| help_text="Include fields: leases, online, status (comma-separated or repeated)", | ||
| ) | ||
| @handle_exceptions_with_reauthentication(relogin_client) | ||
| def get_exporters(config, selector: str | None, output: OutputType, with_options: list[str]): | ||
|
|
@@ -32,7 +32,10 @@ def get_exporters(config, selector: str | None, output: OutputType, with_options | |
|
|
||
| include_leases = "leases" in with_options | ||
| include_online = "online" in with_options | ||
| exporters = config.list_exporters(filter=selector, include_leases=include_leases, include_online=include_online) | ||
| include_status = "status" in with_options | ||
| exporters = config.list_exporters( | ||
| filter=selector, include_leases=include_leases, include_online=include_online, include_status=include_status | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not your patches fault, but I hate this API, we need to improve it hehehe :D |
||
| ) | ||
|
|
||
| model_print(exporters, output) | ||
|
|
||
|
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh that's where the improved stubs came from, nice!