-
Notifications
You must be signed in to change notification settings - Fork 1
v0.3.14 release #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.3.14 release #50
Conversation
…ments-for-table-class-and-tables-helper Updated docstrings in _tables
…e-not-initialized-in-local-run-mode Inject catalogs in local runtime environment
* fix: Fix type mappings, format code * feat: Handle nested types correctly and set ids * chore: Fix formatting * chore: Add how to run tests * feat: Add tests for types
Updated implementations ensure that we equally check runs to detect failures part way through executions. Likewise, we add timeouts while talking to the Tower API in case there are some operational problems on that side of things.
Thanks @copilot for the recommendation!
Thanks @copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s-to-take-a-list-of-runs-or-a-single-run Add a simple `wait_for_runs` function
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.
Pull Request Overview
This PR ultimately updates the Tower runtime’s API‐client behavior and test coverage, adds catalog injection in the local runtime environment, and enhances error handling and documentation across several modules.
- Updates test cases to validate new run-waiting behaviors
- Introduces catalog fetching and injection in the CLI runtime
- Enhances documentation and API interfaces in both Python and Rust components
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tower/test_client.py | Updated test fixtures and added tests for wait_for_run and wait_for_runs behavior |
| src/tower/utils/pyarrow.py | Refactored type conversion with new field ID management |
| src/tower/exceptions.py | Added new exception types for improved error clarity |
| src/tower/_tables.py | Updated documentation and method signatures for table operations |
| src/tower/_client.py | Introduced wait_for_runs, enhanced polling logic, and detailed argument documentation |
| src/tower/init.py | Exported wait_for_runs for public API |
| pyproject.toml | Version remains outdated relative to the PR title |
| crates/tower-cmd/** | Added catalog fetching/injection and improved error handling in CLI commands |
| crates/crypto/** | Updated encryption/decryption functions to return Results and use robust error handling |
| README.md | Extended test instructions for better developer guidance |
| Cargo.toml | Minor dependency updates; version number still reflects previous release |
Comments suppressed due to low confidence (1)
pyproject.toml:7
- The project version in pyproject.toml still shows '0.3.13' despite the PR title indicating a v0.3.14 release. Update the version number for consistency.
version = "0.3.13"
tests/tower/test_client.py
Outdated
| os.environ["TOWER_URL"] = "https://api.example.com" | ||
| os.environ["TOWER_API_KEY"] = "abc123" | ||
| tower = mock_api_config | ||
| run = create_run_object(number=run_number, status="crashed") |
Copilot
AI
May 13, 2025
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.
The test initializes a run object with a 'crashed' status while the mocked API responses simulate a transition from 'pending' to 'exited'. Consider initializing the run with 'pending' for clarity and consistency with the expected workflow.
| run = create_run_object(number=run_number, status="crashed") | |
| run = create_run_object(number=run_number, status="pending") |
src/tower/_client.py
Outdated
| # We need to re-add this run to the list so we check it again | ||
| # in the future. We add it to the back since we took it off the | ||
| # front, effectively moving to the next run. | ||
| awaiting_runs.append(run) |
Copilot
AI
May 13, 2025
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.
[nitpick] When polling run status, consider appending the updated run object (e.g., the 'desc' returned from _check_run_status) instead of the original 'run', to ensure subsequent checks reflect the latest state.
| awaiting_runs.append(run) | |
| awaiting_runs.append(desc) |
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.
Pull Request Overview
This PR prepares the v0.3.14 release by injecting catalogs into the local runtime, updating the polling logic for run completion (including a new wait_for_runs function), enhancing documentation across the codebase, and bumping the version.
- Inject catalogs into the local runtime environment
- Update wait_for_run behavior and add wait_for_runs for improved run status detection
- Update documentation and version numbers across modules
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tower/test_client.py | Updated tests for new fixtures and run-waiting behavior |
| src/tower/utils/pyarrow.py | Adjusted conversion functions and updated nested type conversion logic |
| src/tower/exceptions.py | Added new exception classes |
| src/tower/_tables.py | Expanded docstrings and improved schema/table methods documentation |
| src/tower/_client.py | Refactored run polling functions and added wait_for_runs |
| crates/tower-cmd/src/(secrets.rs, run.rs, lib.rs, error.rs, api.rs) | Updated secret encryption/decryption and runtime command error handling changes |
| crates/crypto | Updated cryptography functions to use AES and improved error handling |
| pyproject.toml & Cargo.toml | Bumped version numbers to v0.3.14 |
Comments suppressed due to low confidence (2)
src/tower/_client.py:158
- The variable 'WAIT_TIMEOUT' is used in wait_for_run() but is not defined in this module. Please define or import it as a constant to prevent runtime errors.
time.sleep(WAIT_TIMEOUT)
src/tower/_client.py:235
- The same undefined 'WAIT_TIMEOUT' is used in wait_for_runs(). Please ensure this constant is declared or imported for consistent behavior across run polling functions.
time.sleep(WAIT_TIMEOUT)
wait_for_runand addwait_for_runsto detect failure