Uh oh!
There was an error while loading. Please reload this page.
Add some new utility and info functions to Tower SDK - #168
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds new utility and diagnostic functions to the Tower SDK, making it easier for users to access runtime information, retrieve parameters and secrets, and check execution context.
Changes:
- Added a new
infomodule with functions to retrieve runtime environment details (schedule info, run metadata, runner details, execution context) - Added utility functions in
_utils.pyfor accessing parameters and secrets from environment variables - Exposed the new
infomodule and utility functions through the main SDK package
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tower/info/init.py | Implements diagnostic functions to retrieve runtime environment information such as schedule details, run metadata, hostname/port, runner info, and execution context |
| src/tower/_utils.py | Adds utility functions for retrieving parameters and secrets from environment variables |
| src/tower/init.py | Exports the new utility functions and info module to make them accessible to SDK users |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| return os.getenv(name, default) | ||
| def parameter(name: str, default: str = ""): |
There was a problem hiding this comment.
Then why not just get rid of the param method altogether? feels weird
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Title says it all. We need some new utility functions in the Tower SDK that make it easier to get diagnostic info (see the
infomodule) as well as get getting parameters and secrets. This just makes things a little easier for users.