SDK regeneration - #57
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai Review this PR Please specifically point out interface breaking changes. These include but not limited to
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e2836b5. Configure here.
|
PR #57 breaking-change review ( Compared merge base Verdict: No public methods were removed. Breaking impact is concentrated in renamed/removed exports, model shape changes, enum member removals, class → union alias conversions, and one renamed client argument with a unit change. This should be treated as a major-version release unless compatibility shims are added. 1. Client method breaking changes1.1 Renamed argument (Hard)
This is the only actual removed/renamed method parameter in public 1.2 No removed methods; no other removed argumentsPublic method count: 142 → 150. Additions (non-breaking):
1.3 Scalar → sequence narrowing (Soft → Hard at call sites)These drop
Example: 1.4 Request/response type renames on methods (Hard for imports/typing)
2. Removed / renamed public exports (Hard)These fail at import time (
Deleted modules include 3. Enum member removals (Hard)
Exhaustive 4. Class → union alias conversions (Hard)Previously instantiable models are now
|
| Before | After | |
|---|---|---|
| Required | rules: List[GatewayLoggingRule] |
name: str, log: bool |
| Conditions | Per-rule GatewayLoggingWhen |
Top-level when: Optional[LoggingWhen] (subjects/models as InNotIn, plus metadata) |
| Added | — | redact_with: Optional[Redaction] |
Any code reading/writing .rules breaks.
5.2 TrueFoundryAgentUserMessage
| Before | After |
|---|---|
role: Literal["user"] |
removed |
| — | type: Literal["user.message"] |
5.3 BudgetV2Alert
notify_breaching_user: Optional[bool]removed
5.4 IdentityProviderBackedIdentity.type discriminator
| Before | After |
|---|---|
"idp-backed" |
"identity-provider-backed" |
Breaks hard-coded discriminator checks and serialized payloads using the old literal.
5.5 TrueFoundryApplyResponse.data
| Before | After |
|---|---|
Optional[Dict[str, Any]] |
Optional[TrueFoundryApplyResponseData] (typed union of entity models) |
Dict subscript access (response.data["id"]) may break depending on runtime type.
5.6 Deployment.deployment_builds
| Before | After |
|---|---|
Optional[List[BuildInfo]] |
Optional[List[DeploymentBuild]] |
DeploymentBuild is a much richer type (nested BuildInfo, DeploymentBuildStatus, URLs, timestamps, etc.). Code expecting flat {name, status: float} objects breaks.
5.7 SparkJob
| Field | Before | After |
|---|---|---|
driver_config |
SparkDriverConfig |
SparkJobDriverConfig |
executor_config |
SparkExecutorConfig |
SparkJobExecutorConfig |
| — | — | new optional trigger: SparkJobTrigger |
5.8 Field type renames (import / annotation breaks)
| Type.field | Before | After |
|---|---|---|
DeploymentBuild.status |
BuildStatus |
DeploymentBuildStatus |
IChange.type |
IChangeOperation |
IChangeType |
GcpGkeIntegration.location |
GcpRegion |
GcpGkeIntegrationLocation (superset) |
Subject.subject_type |
SubjectType |
SubjectSubjectType (lacks EXTERNAL_IDENTITY) |
GatewayDataCreatedByFilter.operator |
Literal["IN"] |
GatewayDataCreatedByFilterOperator |
GatewayDataMetadataFilter.operator |
Literal["IN"] |
GatewayDataMetadataFilterOperator |
6. Non-breaking / additive (for context)
RequestOptions:timeoutadded;timeout_in_secondskept as deprecated alias (backward compatible).- Many
collaboratorsfields widened from requiredList[...]→Optional[List[...]]. VirtualAccountManifest.permissionswidened to optional.PySparkTaskConfig.image:TaskPySparkBuild→Union[TaskPySparkBuild, TaskSparkImage](widening).- Many new types/APIs (gateway budgets, agent channels, guardrails, etc.).
7. Migration priority
- Replace imports for removed symbols (§2).
- Update
virtual_accounts.regenerate_token(grace_period_in_days=…)→grace_period_in_minutes=…and recompute the value (days → minutes). - Stop using
EXTERNAL_IDENTITY/SSO_BASED_IDENTITYenum members and update.visit(...)handlers. - Rewrite
GatewayLoggingConfigaway fromrules/GatewayLoggingRule. - Update agent manifests: MCP servers and skills need discriminated variants with
type; user messages usetype="user.message"notrole="user". - Wrap bare scalars in lists for list-filter params (§1.3).
- Update
IdentityProviderBackedIdentitydiscriminator to"identity-provider-backed". - Revisit
client.applyresponse handling ifdatawas treated as a dict. - Update
Deployment.deployment_buildsconsumption for the newDeploymentBuildshape.
Bottom line: Methods are intact, but this PR has substantial interface-breaking surface across types, enums, exports, and one client argument rename with a semantic unit change. Recommend a major semver bump or restoring compatibility aliases/adapters for the removed public names and model shapes.

Note
Medium Risk
A major Fern generator bump can change generated client signatures and behavior across the SDK; callers overriding per-request timeouts should prefer
timeoutbuttimeout_in_secondsremains supported.Overview
Regenerates the TrueFoundry Python SDK using Fern CLI 5.109 and fern-python-sdk 5.29.2, tied to API definition commit
6aac95c..fern/metadata.jsonrecords the new toolchain and origin commit.Docs: README usage examples are shortened (fewer
applications.listkwargs and enum imports), matching generator defaults. Per-request timeout docs now userequest_options={"timeout": ...}instead oftimeout_in_seconds; the client still accepts the old key as a deprecated alias.Dependencies:
poetry.lockis refreshed (e.g. aiohttp 3.14.3, pydantic 2.13.5, httpx-aiohttp 0.1.12).pyproject.tomlrelaxeshttpx-aiohttpfrom a pinned0.1.8to^0.1.8.Reviewed by Cursor Bugbot for commit 41dc0f0. Bugbot is set up for automated code reviews on this repo. Configure here.