redshift: remove redshift_use_show_apis behavior flag - #1900
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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_apisbehavior flag and simplifiedadapter.use_show_apis()to rely only oncredentials.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.
- 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
had a problem deploying
to
dbt-redshift
April 29, 2026 05:15 — with
GitHub Actions
Failure
tauhid621
had a problem deploying
to
dbt-redshift
April 29, 2026 06:12 — with
GitHub Actions
Failure
colin-k-rogers
approved these changes
May 7, 2026
tauhid621
enabled auto-merge (squash)
May 14, 2026 06:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
redshift_use_show_apisbehavior flag. Thedatasharingprofile credential (also added in 1.11.0) now solely gates SHOW/SVV_* APIs for cross-database Datasharing support.adapter.use_show_apis()(Python) andredshift__use_show_apis()(Jinja) remain — they are wrappers driven by thedatasharingcredential and are still consumed by SQL macros (adapters.sql,catalog/by_*.sql,apply_grants.sql).behavior.redshift_use_show_apismocks; removedtest_cross_db_allowed_with_show_apis_flag(already covered bytest_cross_db_allowed_with_datasharing).datasharing.Test plan
hatch run unit-tests— 160 passedhatch run code-quality— black, flake8, mypy all clean🤖 Generated with Claude Code