Skip to content

Conversation

@bradhe
Copy link
Contributor

@bradhe bradhe commented Jan 14, 2026

Title says it all. We need some new utility functions in the Tower SDK that make it easier to get diagnostic info (see the info module) as well as get getting parameters and secrets. This just makes things a little easier for users.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 info module with functions to retrieve runtime environment details (schedule info, run metadata, runner details, execution context)
  • Added utility functions in _utils.py for accessing parameters and secrets from environment variables
  • Exposed the new info module 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.

Copy link
Contributor

@konstantinoscs konstantinoscs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return os.getenv(name, default)


def parameter(name: str, default: str = ""):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for convenience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why not just get rid of the param method altogether? feels weird

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bradhe bradhe merged commit 0acac85 into develop Jan 14, 2026
5 checks passed
@bradhe bradhe deleted the tasks/add-helper-functions-to-tower-sdk branch January 14, 2026 20:04
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.

3 participants