Skip to content

Preserve REST view response configuration - #3959

Open
kevinjqliu wants to merge 2 commits into
apache:mainfrom
kevinjqliu:kevinjqliu-preserve-view-config
Open

kevinjqliu wants to merge 2 commits into
apache:mainfrom
kevinjqliu:kevinjqliu-preserve-view-config

Conversation

@kevinjqliu

Copy link
Copy Markdown
Contributor

Rationale for this change

REST view responses already parse config, but _response_to_view discards it when constructing a View. Preserve it as View.config, following the existing Table.config pattern, across create, load, and register operations.

The REST specification defines this optional string-to-string map as view-specific configuration. This change only preserves it; applying per-view authentication is outside this PR.

Are these changes tested?

Added configuration assertions for REST create/load/register responses and coverage for explicit/default View.config, unchanged properties, and unchanged equality. All 39 focused view tests and applicable pre-commit checks, including mypy, pass. The full unit suite is blocked during collection by the missing optional thrift dependency.

Are there any user-facing changes?

View.config exposes response configuration separately from persistent View.properties and defaults to an empty mapping. Existing constructor calls and view equality remain unchanged.

kevinjqliu and others added 2 commits September 13, 2026 15:56
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the API documentation addition and keep the REST load test focused on preserving nonempty configuration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 13, 2026 23:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The reviewed changes have focused test coverage and no unresolved blocking issues.

Pull request overview

Preserves REST view response configuration in View.config across create, load, and register operations.

Changes:

  • Adds optional View.config, defaulting to an empty mapping.
  • Propagates REST response configuration without changing properties or equality.
  • Adds unit and REST catalog coverage.
File summaries
File Description
tests/test_view.py Tests configuration defaults, explicit values, and equality.
tests/catalog/test_rest.py Verifies configuration across REST view operations.
pyiceberg/view/__init__.py Adds View.config.
pyiceberg/catalog/rest/__init__.py Preserves response configuration when constructing views.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kevinjqliu
kevinjqliu requested review from Fokko and geruh September 13, 2026 23:48

@rambleraptor rambleraptor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like the goal is just to pass it along to the View. This seems perfectly reasonable.

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.

4 participants