Skip to content

chore: disallow additional properties in table request schemas - #189

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

chore: disallow additional properties in table request schemas#189
hotdata-automation[bot] wants to merge 1 commit into
mainfrom
openapi-update-34346719373

Conversation

@hotdata-automation

Copy link
Copy Markdown
Contributor

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

@hotdata-automation
hotdata-automation Bot requested a review from a team as a code owner September 9, 2026 11:40
@hotdata-automation
hotdata-automation Bot requested review from eddietejeda and removed request for a team September 9, 2026 11:40
@hotdata-automation
hotdata-automation Bot enabled auto-merge (squash) September 9, 2026 11:40

@validate_call
def purge_table_cache(
def set_managed_table_constant_per_key(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR deletes purge_connection_cache and purge_table_cache, but tests/integration/test_connections_read.py:32 still calls connections_api.purge_connection_cache(connection_id). Update that scenario test in this PR: drop the purge step and the "cache purge" wording in the module docstring at line 4.

Failure scenario: a developer removes the @pytest.mark.skip at tests/integration/test_connections_read.py:15 (added for an unrelated degraded fixture) and the test fails with AttributeError: 'ConnectionsApi' object has no attribute 'purge_connection_cache', not with the API failure it was written to catch. CI stays green today only because the test is skipped.

tests/integration/test_managed_tables_lifecycle.py:17 also names purge_table_cache in a comment, which is now a method that does not exist.

Comment thread CHANGELOG.md

### Changed

- chore: disallow additional properties in table request schemas

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Record the removed public API under ### Removed with a **Breaking:** marker. This PR removes three public symbols and the changelog reports none of them:

  • ConnectionsApi.purge_connection_cache
  • ConnectionsApi.purge_table_cache
  • CreateConnectionRequest.skip_discovery

The ### Removed block at CHANGELOG.md lines 10-20 sets the convention: every prior endpoint and model removal in this same [Unreleased] section carries a **Breaking:** entry.

Failure scenario: a consumer upgrades from 0.10.0, reads a changelog that lists only doc and schema changes, and their purge_connection_cache(...) call raises AttributeError at runtime with no prior warning. A CreateConnectionRequest(..., skip_discovery=True) call raises ValidationError the same way.

""" # noqa: E501
columns: Optional[List[ColumnInfo]] = None
connection: StrictStr
constant_per_key: List[StrictStr] = Field(description="Columns the table declares constant for a given key: for every row, any other row sharing its key holds the same value of these columns. Declaring this lets a keyed mutation narrow its search for prior versions to the values the upload carries. Empty when none is declared, which is the unrestricted search. Unlike `partition_by` and `sorted_by` this is NOT fixed at creation — it changes only which files a mutation opens, never how rows are written — so read it here rather than assuming a declaration took effect.")

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: add a changelog note that constant_per_key is required on TableInfo (not blocking).

constant_per_key carries no default, so code that constructs TableInfo directly — test mocks and fixtures — must now supply it. The 0.9.0 entry at CHANGELOG.md lines 65-73 called out exactly this for partition_by and sorted_by.

Read-only consumers are unaffected, so this is a documentation gap rather than a defect.

@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

The full-diff block was omitted from the review context because the patch is too large. The patch was fetched with gh pr diff 189 and read in full. Files also read from the checkout: CHANGELOG.md, pyproject.toml, tests/integration/test_connections_read.py, .github/workflows/integration-tests.yml, .github/workflows/check-release.yml, README.md, hotdata/models/table_info.py, hotdata/api/connections_api.py.

Blocking Issues

  1. tests/integration/test_connections_read.py:32 calls connections_api.purge_connection_cache, which this PR removes. The test is skipped, so CI does not catch the dangling reference. tests/integration/test_managed_tables_lifecycle.py:17 names purge_table_cache in a comment.
  2. CHANGELOG.md:24 records no removal entries. This PR removes ConnectionsApi.purge_connection_cache, ConnectionsApi.purge_table_cache, and CreateConnectionRequest.skip_discovery. The Removed block at CHANGELOG.md:10-20 shows the convention for these.

Action Required

  • Update tests/integration/test_connections_read.py: remove the purge step and the 'cache purge' wording in the module docstring. Update the stale comment in tests/integration/test_managed_tables_lifecycle.py.
  • Add **Breaking:** entries under Removed for the three removed public symbols.

Note on scope

The title and description describe only a schema change: 'disallow additional properties in table request schemas'. The patch also removes two endpoints, adds three DatabasesApi methods (get_database_lineage, lookup_database_by_name, set_database_table_constant_per_key), adds ConnectionsApi.set_managed_table_constant_per_key, and adds six models. Widen the description so a reader can see the removals without reading the diff.

CI status at review time: all five checks were queued or in progress. No check result is reported here.

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