Skip to content

docs(api): exclude retiring connection endpoints from the public spec - #175

Open
hotdata-automation[bot] wants to merge 1 commit into
mainfrom
openapi-update-32519003685
Open

docs(api): exclude retiring connection endpoints from the public spec#175
hotdata-automation[bot] wants to merge 1 commit into
mainfrom
openapi-update-32519003685

Conversation

@hotdata-automation

Copy link
Copy Markdown
Contributor

Auto-generated from the updated HotData OpenAPI spec.
Source: https://github.com/hotdata-dev/www.hotdata.dev/pull/343

@hotdata-automation
hotdata-automation Bot requested a review from a team as a code owner August 21, 2026 19:33
@hotdata-automation
hotdata-automation Bot requested review from rohan-hotdata and removed request for a team August 21, 2026 19:33
@hotdata-automation
hotdata-automation Bot enabled auto-merge (squash) August 21, 2026 19:33
from typing_extensions import Literal, Self

JOBRESULT_ONE_OF_SCHEMAS = ["BulkCreateDatabasesResult", "ConnectionRefreshResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult"]
JOBRESULT_ONE_OF_SCHEMAS = ["BulkCreateDatabasesResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ConnectionRefreshResult was dropped from this oneOf, but JobType still declares DATA_REFRESH_CONNECTION = 'data_refresh_connection' (hotdata/models/job_type.py:33).

JobStatusResponse.from_dict calls JobResult.from_dict(obj["result"]) unconditionally when result is non-null (hotdata/models/job_status_response.py:119), and JobResult.from_json raises ValueError("No match found ...") when nothing matches. A connection-refresh payload (connection_id, duration_ms, tables_refreshed, tables_failed, total_rows) matches none of the four remaining variants — TableRefreshResult requires rows_synced/schema_name/table_name.

So jobs_api.get_job on a completed data_refresh_connection job — and list_jobs for any workspace that has one in history — will raise instead of deserializing. If the job type is genuinely retired too, it should come out of JobType in the same spec change; if it isn't, ConnectionRefreshResult needs to stay in the JobResult union. Worth confirming upstream in hotdata-dev/www.hotdata.dev#343 before this merges.

Comment thread CHANGELOG.md

### Changed

- docs(api): exclude retiring connection endpoints from the public spec

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: this entry is filed under ### Changed, but the change removes public API surface that shipped in 0.10.0 — SecretsApi, RefreshApi, ConnectionTypesApi, ConnectionsApi.check_connection_health, and ~17 exported models. Anyone importing those breaks on upgrade. Consider a ### Removed section listing the dropped classes so the release notes make the break visible to users. (not blocking)

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

My copy of the full diff was truncated (it cut off partway through hotdata/api/refresh_api.py). I reviewed the remainder against the checked-out tree at the head SHA rather than the diff text — the deleted modules are confirmed absent from the working tree.

Blocking Issues

1. Hand-written integration tests still import the deleted modules — pytest tests/integration will fail at collection.

.github/workflows/regenerate.yml:47-53 deliberately leaves tests/ (plural, hand-written) untouched during regen, so this PR removed the generated APIs without updating the tests that consume them:

  • tests/integration/conftest.py:17from hotdata.api.connection_types_api import ConnectionTypesApi
  • tests/integration/conftest.py:25from hotdata.api.refresh_api import RefreshApi
  • tests/integration/conftest.py:27from hotdata.api.secrets_api import SecretsApi
  • tests/integration/test_connection_types_read.py:9ConnectionTypesApi
  • tests/integration/test_secrets_crud.py:15,17,18SecretsApi, CreateSecretRequest, UpdateSecretRequest

Because these are module-scope imports in conftest.py, the ImportError takes down the entire tests/integration suite, not just the secrets/connection-types scenarios. The Integration Tests / integration job runs pytest tests/integration -v (.github/workflows/integration-tests.yml:99) and is a required check for auto-merge.

2. JobType.DATA_REFRESH_CONNECTION outlived its JobResult variant — see the inline comment on hotdata/models/job_result.py:29. Any completed data_refresh_connection job now fails to deserialize.

Action Required

  1. Delete tests/integration/test_secrets_crud.py and tests/integration/test_connection_types_read.py, and drop the secrets_api, connection_types_api, and refresh_api fixtures plus their imports from tests/integration/conftest.py (lines 17, 25, 27, 155-156, 170-171, 190-191). Confirm the matching scenarios were also removed from www.hotdata.dev/api/test-scenarios.yaml, otherwise scenario-parity will start failing on the missing files.
  2. Remove the check_connection_health call at tests/integration/test_connections_read.py:31-33. That test is currently @pytest.mark.skiped so it will not fail today, but it becomes an AttributeError the moment the skip is lifted.
  3. Resolve the JobResult / JobType mismatch — either upstream in the spec, or confirm it is intentional.

Items 1 and 2 are repo-local and can be fixed on this branch; item 3 likely belongs in the upstream spec PR (hotdata-dev/www.hotdata.dev PR 343).

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.

0 participants