Skip to content

redshift: remove redshift_use_show_apis behavior flag - #1900

Merged
tauhid621 merged 3 commits into
mainfrom
tauhid621/use_show_apis_remove
May 14, 2026
Merged

redshift: remove redshift_use_show_apis behavior flag#1900
tauhid621 merged 3 commits into
mainfrom
tauhid621/use_show_apis_remove

Conversation

@tauhid621

Copy link
Copy Markdown
Contributor

Summary

  • Remove the redshift_use_show_apis behavior flag. The datasharing profile credential (also added in 1.11.0) now solely gates SHOW/SVV_* APIs for cross-database Datasharing support.
  • adapter.use_show_apis() (Python) and redshift__use_show_apis() (Jinja) remain — they are wrappers driven by the datasharing credential and are still consumed by SQL macros (adapters.sql, catalog/by_*.sql, apply_grants.sql).
  • Updated unit tests to drop behavior.redshift_use_show_apis mocks; removed test_cross_db_allowed_with_show_apis_flag (already covered by test_cross_db_allowed_with_datasharing).
  • Added a Breaking Changes changie entry so 1.11.0-rc1 users know to migrate to datasharing.

Test plan

  • hatch run unit-tests — 160 passed
  • hatch run code-quality — black, flake8, mypy all clean
  • Integration tests (CI)

🤖 Generated with Claude Code

The `datasharing` profile credential introduced earlier in 1.11.0 supersedes
the `redshift_use_show_apis` behavior flag. Remove the flag and its tests;
`adapter.use_show_apis()` and the `redshift__use_show_apis()` Jinja macro
remain (now driven solely by the credential).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 28, 2026 12:53
@tauhid621
tauhid621 requested a review from a team as a code owner April 28, 2026 12:53
@cla-bot cla-bot Bot added the cla:yes The PR author has signed the CLA label Apr 28, 2026
@cla-bot
cla-bot Bot temporarily deployed to dbt-redshift April 28, 2026 12:53 Inactive

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.

Pull request overview

Removes the redshift_use_show_apis behavior flag so that Redshift SHOW/SVV_* metadata query paths are gated solely by the datasharing profile credential, and updates unit tests + docs/changelog accordingly.

Changes:

  • Deleted the redshift_use_show_apis behavior flag and simplified adapter.use_show_apis() to rely only on credentials.datasharing.
  • Updated unit tests to remove behavior-flag mocking and dropped the redundant cross-db test that relied on the flag.
  • Added a Breaking Changes changie entry and updated internal docs (CLAUDE.md) to reflect the new gating mechanism.

Reviewed changes

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

Show a summary per file
File Description
dbt-redshift/src/dbt/adapters/redshift/impl.py Removes the flag definition/registration and makes use_show_apis() depend only on datasharing.
dbt-redshift/tests/unit/test_verify_database.py Removes the test path that allowed cross-db via the behavior flag.
dbt-redshift/tests/unit/test_standardize_grants_dict.py Removes behavior-flag mocks and relies on datasharing to drive SHOW/SVV paths in tests.
dbt-redshift/tests/unit/test_calculate_freshness_from_metadata_batch.py Removes behavior-flag mocking from the adapter fixture.
dbt-redshift/.changes/unreleased/Breaking Changes-20260428-120000.yaml Adds breaking change note documenting migration from flag to datasharing.
CLAUDE.md Updates internal documentation to reference datasharing instead of the removed behavior flag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dbt-redshift/src/dbt/adapters/redshift/impl.py
Comment thread dbt-redshift/.changes/unreleased/Breaking Changes-20260428-120000.yaml Outdated
- Update verify_database error to mention `datasharing: true` alongside RA3 node
- Set changie Issue to 1621 to avoid a broken changelog link

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tauhid621 tauhid621 changed the title fix(redshift): remove redshift_use_show_apis behavior flag redshift: remove redshift_use_show_apis behavior flag Apr 29, 2026
@tauhid621
tauhid621 enabled auto-merge (squash) May 14, 2026 06:09
@tauhid621
tauhid621 merged commit eb16ee4 into main May 14, 2026
17 checks passed
@tauhid621
tauhid621 deleted the tauhid621/use_show_apis_remove branch May 14, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes The PR author has signed the CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants