Skip to content

TOW-783 Bumping our rust and python clients#87

Merged
konstantinoscs merged 6 commits intodevelopfrom
feature/tow-783-update-tower-cli-and-clients-to-the-new-api
Sep 3, 2025
Merged

TOW-783 Bumping our rust and python clients#87
konstantinoscs merged 6 commits intodevelopfrom
feature/tow-783-update-tower-cli-and-clients-to-the-new-api

Conversation

@konstantinoscs
Copy link
Contributor

Our clients are super outdated. dltHub is testing us and is running into issues.
This PR has

  • Automatic regeneration of all clients according to the latest API version
  • A few fixes to make the code comply to the new API

This comment was marked as outdated.

@socksy
Copy link
Contributor

socksy commented Sep 2, 2025

Obviously fix the Python tests first, looks easy enough, just fix up the mocks to match the new schemas.

@konstantinoscs konstantinoscs force-pushed the feature/tow-783-update-tower-cli-and-clients-to-the-new-api branch from 49b181b to 4a4547b Compare September 3, 2025 12:58
@konstantinoscs konstantinoscs merged commit dad82e0 into develop Sep 3, 2025
18 checks passed
@konstantinoscs konstantinoscs deleted the feature/tow-783-update-tower-cli-and-clients-to-the-new-api branch September 3, 2025 15:08
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 updates both Rust and Python API clients to the latest version by automatically regenerating them from the current API specification. This addresses compatibility issues with dltHub and ensures the clients are aligned with the latest Tower API features.

  • Updates API client models to reflect the latest schema changes
  • Fixes status code expectations for API endpoints (200 → 201 for creation operations)
  • Adds new API functionality including plans, environments, and feature flags support

Reviewed Changes

Copilot reviewed 233 out of 234 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/tower/test_tables.py Changes import from tower.pyarrow to standard pyarrow
tests/tower/test_client.py Updates test expectations and adds missing link fields to test data
Multiple Python model files Replaces deprecated AcceptInvitation models with VerifyEmail models and updates User model structure
Multiple Rust model files Updates API version references and aligns model structures with new schema
Multiple API endpoint files Corrects HTTP status codes and adds new endpoint parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# We import all the things we need from Tower.
import tower.polars as pl
import tower.pyarrow as pa
import pyarrow as pa
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The import change from tower.pyarrow to standard pyarrow suggests a breaking change. Ensure this change is documented and any existing code using tower.pyarrow is updated accordingly.

Suggested change
import pyarrow as pa
import tower.pyarrow as pa

Copilot uses AI. Check for mistakes.
url="https://api.example.com/v1/apps/my-app/runs",
json=mock_run_response_factory(),
status_code=200,
status_code=201,
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The status code change from 200 to 201 for the POST endpoint is correct according to HTTP standards (201 for resource creation), but this is a breaking change that should be documented for API consumers.

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +38
is_confirmed: bool
last_name: str
profile_photo_url: str
is_invitation_claimed: Union[Unset, bool] = UNSET
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The field is_invitation_claimed is marked as deprecated but still maintained for backward compatibility. Consider adding a deprecation timeline or migration guide for users of this field.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +30
pub is_confirmed: bool,
/// This property is deprecated. It will be removed in a future version.
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The deprecation comment should include a specific version or timeline for removal to help developers plan migrations.

Suggested change
pub is_confirmed: bool,
/// This property is deprecated. It will be removed in a future version.
/// This property is deprecated and will be removed in v0.8.0.

Copilot uses AI. Check for mistakes.
"pytest-httpx==0.35.0",
"pytest-env>=1.1.3",
"pyiceberg[sql-sqlite]==0.9.1",
"tower[iceberg]",
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Adding tower[iceberg] as a dependency creates a circular dependency since this appears to be the tower package itself. This should be removed or clarified.

Suggested change
"tower[iceberg]",

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +60
let ts = dates::format_str(&line.reported_at);
output::log_line(&ts, &line.content, output::LogLineType::Remote);
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The field names have changed from timestamp/message to reported_at/content. This is a breaking change that should be documented and any dependent code should be updated accordingly.

Copilot uses AI. Check for mistakes.
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