You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "joaopamaral (via GitHub)" <gi...@apache.org> on 2026/09/30 14:38:52 UTC

[PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

joaopamaral opened a new pull request, #44825:
URL: https://github.com/apache/superset/pull/44825

   ### SUMMARY
   
   Enable catalog support on `RedshiftEngineSpec`, the same way `PostgresEngineSpec` has it. In Redshift a catalog is a database, and cross-database queries (`database.schema.table`) are supported natively, including for databases created from [datashares](https://docs.aws.amazon.com/redshift/latest/dg/datashare-overview.html).
   
   - `supports_catalog`, `supports_dynamic_catalog` and `supports_cross_catalog_queries` are set, so SQL Lab and the dataset editor show the catalog selector (when the connection has `allow_multi_catalog`), and generated SQL uses `catalog.schema.table`.
   - `adjust_engine_params` sets the selected catalog as the URL database; IAM connections (`redshift_connector`) carry the database in `connect_args["database"]`, which is updated too.
   - `get_default_catalog` returns the URL database.
   - `get_catalog_names` lists `SVV_REDSHIFT_DATABASES`. Unlike `pg_database`, it also includes databases created from datashares, which is the main motivation: without catalogs there is no way to browse a datashare consumer database from a Redshift connection in Superset.
   - Migration `e6d0a676a087` runs `upgrade_catalog_perms(engines={"redshift"})`, as done for PostgreSQL, Trino/Presto/BigQuery/Snowflake and Databricks when catalogs were introduced for them: it adds `catalog_access` permissions, renames `schema_access` permissions to include the default catalog, and populates the `catalog` column on existing Redshift datasets, charts and saved queries.
   
   Reflecting the datashare objects themselves (schemas/tables/columns of a consumer database, which are not in `pg_catalog`) is handled on the dialect side in sqlalchemy-redshift/sqlalchemy-redshift#334; this PR works without it for regular databases.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A: the catalog selector is the existing UI, now available for Redshift connections with `allow_multi_catalog` enabled.
   
   ### TESTING INSTRUCTIONS
   
   1. Add a Redshift connection (any driver), enable "Allow changing catalogs" (`allow_multi_catalog`) in its advanced settings.
   2. In SQL Lab, the catalog dropdown lists the cluster's databases (`SVV_REDSHIFT_DATABASES`); selecting one switches the schema and table lists to that database, and table previews / datasets query it as `catalog.schema.table`.
   3. Existing Redshift datasets keep working: after the migration their `catalog` is the connection URL database, and their permissions carry the catalog (`[db].[catalog].[schema]`).
   4. Unit tests: `pytest tests/unit_tests/db_engine_specs/test_redshift.py`.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [x] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [x] Migration is atomic, supports rollback & is backwards-compatible
     - [x] Confirm DB migration upgrade and downgrade tested
     - [x] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   Migration notes: same shape as `4081be5b6b74` (Databricks) and `87ffc36f9842` (Trino/Presto/BigQuery/Snowflake). It only touches rows of Redshift connections; runtime is proportional to the number of Redshift datasets/charts, and it connects to each Redshift database to discover non-default catalogs (skipped when the connection fails). No downtime expected.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5914037517

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44825?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `50.00000%` with `11 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.24%. Comparing base ([`3f8a236`](https://app.codecov.io/gh/apache/superset/commit/3f8a23622c76e5423fbec7746102e6b03614da42?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`65fa56d`](https://app.codecov.io/gh/apache/superset/commit/65fa56d04c4afde75024583264c14059e5f8f458?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/44825?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/db\_engine\_specs/redshift.py](https://app.codecov.io/gh/apache/superset/pull/44825?src=pr&el=tree&filepath=superset%2Fdb_engine_specs%2Fredshift.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3JlZHNoaWZ0LnB5) | 50.00% | [11 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/44825?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (3f8a236) and HEAD (65fa56d). Click for more details.
   > 
   > <details><summary>HEAD has 6 uploads less than BASE</summary>
   >
   >| Flag | BASE (3f8a236) | HEAD (65fa56d) |
   >|------|------|------|
   >|python|8|2|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #44825       +/-   ##
   ===========================================
   - Coverage   81.59%   57.24%   -24.35%     
   ===========================================
     Files        2977     2977               
     Lines      180845   180867       +22     
     Branches    41853    41856        +3     
   ===========================================
   - Hits       147554   103538    -44016     
   - Misses      30568    76313    +45745     
   + Partials     2723     1016     -1707     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.67% <50.00%> (+<0.01%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.59% <50.00%> (+<0.01%)` | :arrow_up: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.64% <50.00%> (-47.10%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/44825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/44825?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5960988971

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44825:
URL: https://github.com/apache/superset/pull/44825#discussion_r4145940902


##########
superset/db_engine_specs/redshift.py:
##########
@@ -253,6 +262,51 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
         ),
     }
 
+    @classmethod
+    def adjust_engine_params(
+        cls,
+        uri: URL,
+        connect_args: dict[str, Any],
+        catalog: str | None = None,
+        schema: str | None = None,
+    ) -> tuple[URL, dict[str, Any]]:
+        """
+        Set the catalog (database).
+        """
+        if catalog:
+            uri = uri.set(database=catalog)
+            # IAM connections pass the database in connect_args instead
+            if "database" in connect_args:
+                connect_args["database"] = catalog
+
+        return uri, connect_args
+
+    @classmethod
+    def get_default_catalog(cls, database: Database) -> str | None:
+        """
+        Return the default catalog for a given database.
+        """
+        return database.url_object.database

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `65fa56d`.
   
   `get_default_catalog` now falls back to `engine_params.connect_args["database"]` when the URL has no database.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



##########
superset/db_engine_specs/redshift.py:
##########
@@ -253,6 +262,51 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
         ),
     }
 
+    @classmethod
+    def adjust_engine_params(
+        cls,
+        uri: URL,
+        connect_args: dict[str, Any],
+        catalog: str | None = None,
+        schema: str | None = None,
+    ) -> tuple[URL, dict[str, Any]]:
+        """
+        Set the catalog (database).
+        """
+        if catalog:
+            uri = uri.set(database=catalog)
+            # IAM connections pass the database in connect_args instead
+            if "database" in connect_args:
+                connect_args["database"] = catalog
+
+        return uri, connect_args
+
+    @classmethod
+    def get_default_catalog(cls, database: Database) -> str | None:
+        """
+        Return the default catalog for a given database.
+        """
+        return database.url_object.database
+
+    @classmethod
+    def get_catalog_names(
+        cls,
+        database: Database,
+        inspector: Inspector,
+    ) -> set[str]:
+        """
+        Return all catalogs.
+
+        In Redshift, a catalog is called a "database". SVV_REDSHIFT_DATABASES
+        also lists databases created from datashares, which pg_database does not.
+        """
+        return {
+            catalog
+            for (catalog,) in inspector.bind.execute(
+                sa.text("SELECT database_name FROM svv_redshift_databases")
+            )
+        }

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `65fa56d`.
   
   Catalog discovery now opens a connection with `inspector.engine.connect()` and executes the query through the connection rather than calling `execute` on the engine.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6102865278

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub) via notifications" <no...@superset.apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6589601225

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5941637597

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6307958839

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6070754440

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6461093758

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6022172380

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44825:
URL: https://github.com/apache/superset/pull/44825#discussion_r4145899764


##########
superset/db_engine_specs/redshift.py:
##########
@@ -253,6 +262,51 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
         ),
     }
 
+    @classmethod
+    def adjust_engine_params(
+        cls,
+        uri: URL,
+        connect_args: dict[str, Any],
+        catalog: str | None = None,
+        schema: str | None = None,
+    ) -> tuple[URL, dict[str, Any]]:
+        """
+        Set the catalog (database).
+        """
+        if catalog:
+            uri = uri.set(database=catalog)
+            # IAM connections pass the database in connect_args instead
+            if "database" in connect_args:
+                connect_args["database"] = catalog
+
+        return uri, connect_args
+
+    @classmethod
+    def get_default_catalog(cls, database: Database) -> str | None:
+        """
+        Return the default catalog for a given database.
+        """
+        return database.url_object.database

Review Comment:
   **Suggestion:** `get_default_catalog` ignores IAM's `connect_args["database"]`, so migrations skip those databases and leave existing permissions and model catalog fields unconverted.
   
   **Assessment:** 🟠 `Major` · 🔁 `Occurrence: Sometimes` · 🏷️ `Api mismatch`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=971c99ce5ff14227ac623cafe8541d4e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=971c99ce5ff14227ac623cafe8541d4e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/db_engine_specs/redshift.py
   **Line:** 285:289
   **Comment:**
   	*Api Mismatch: `get_default_catalog` ignores IAM's `connect_args["database"]`, so migrations skip those databases and leave existing permissions and model catalog fields unconverted.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44825&comment_hash=4220b6e3dd9c775aeea180096e97c05655d35ebe72e0181b7ef12b76dd8bcd16&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44825&comment_hash=4220b6e3dd9c775aeea180096e97c05655d35ebe72e0181b7ef12b76dd8bcd16&reaction=dislike'>👎</a>



##########
superset/db_engine_specs/redshift.py:
##########
@@ -253,6 +262,51 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
         ),
     }
 
+    @classmethod
+    def adjust_engine_params(
+        cls,
+        uri: URL,
+        connect_args: dict[str, Any],
+        catalog: str | None = None,
+        schema: str | None = None,
+    ) -> tuple[URL, dict[str, Any]]:
+        """
+        Set the catalog (database).
+        """
+        if catalog:
+            uri = uri.set(database=catalog)
+            # IAM connections pass the database in connect_args instead
+            if "database" in connect_args:
+                connect_args["database"] = catalog
+
+        return uri, connect_args
+
+    @classmethod
+    def get_default_catalog(cls, database: Database) -> str | None:
+        """
+        Return the default catalog for a given database.
+        """
+        return database.url_object.database
+
+    @classmethod
+    def get_catalog_names(
+        cls,
+        database: Database,
+        inspector: Inspector,
+    ) -> set[str]:
+        """
+        Return all catalogs.
+
+        In Redshift, a catalog is called a "database". SVV_REDSHIFT_DATABASES
+        also lists databases created from datashares, which pg_database does not.
+        """
+        return {
+            catalog
+            for (catalog,) in inspector.bind.execute(
+                sa.text("SELECT database_name FROM svv_redshift_databases")
+            )
+        }

Review Comment:
   **Suggestion:** `inspector.bind` is an Engine in SQLAlchemy 2, which has no `execute`; catalog discovery raises `AttributeError` for Redshift connections.
   
   **Assessment:** 🟠 `Major` · 🔁 `Occurrence: Often` · 🏷️ `Api mismatch`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=bf35d951ac684ee8a3ee5c2e362958d1&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=bf35d951ac684ee8a3ee5c2e362958d1&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/db_engine_specs/redshift.py
   **Line:** 303:308
   **Comment:**
   	*Api Mismatch: `inspector.bind` is an Engine in SQLAlchemy 2, which has no `execute`; catalog discovery raises `AttributeError` for Redshift connections.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44825&comment_hash=0d53c5e4d88dae2e961aced958a073707b3d7fccac4f8cdcfaf638fadfbd2760&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44825&comment_hash=0d53c5e4d88dae2e961aced958a073707b3d7fccac4f8cdcfaf638fadfbd2760&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5919335514

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 8a19e66d425cde2caf525154b9b8c8d5f1492e30 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6abd72c2f62c3500075bbdc3 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-44825--superset-docs-preview.netlify.app](https://deploy-preview-44825--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQ0ODI1LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.kYbV6e9mzT_hzSuUxIM6NQGvlDaHDAkyqNLmq2_K3Yk)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpBCoAgEADAv-y5SAwV-kHPWHc1A0vRvUT097zNYV6orVxVYAOYwDe8KQ3HgLK0wD2dUWZCwVyOPgaHmsuz8zgWPTtNOlpNq1FKOeM90wrfDw) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-44825--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "joaopamaral (via GitHub)" <gi...@apache.org>.
joaopamaral commented on code in PR #44825:
URL: https://github.com/apache/superset/pull/44825#discussion_r4168180787


##########
superset/db_engine_specs/redshift.py:
##########
@@ -100,6 +102,13 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
     max_column_name_length = 127
     default_driver = "psycopg2"
 
+    # In Redshift a catalog is a database. Cross-database queries
+    # (`database.schema.table`) are supported natively, including for
+    # databases created from datashares.
+    supports_catalog = True

Review Comment:
   Added `tests/unit_tests/migrations/test_enable_catalog_in_redshift.py`: runs `e6d0a676a087`'s `upgrade()`/`downgrade()` over a Redshift dataset/chart/saved query (URL database and IAM `connect_args.database`) next to a Postgres one: checks catalog/perm conversion, the non-default catalog perms, Postgres left untouched, and an exact permission round-trip. Also `test_catalog_support` asserting the three flags. Flipping `supports_catalog` to `False` now fails both cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5953106692

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6281396274

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-6455879543

   ### ⚠️ Possible DB migration conflict
   
   @joaopamaral the base branch `master` picked up a new database migration under `superset/migrations/` after this PR was opened, and this PR adds or modifies migration files too. Alembic migrations form a single linear chain, so if both branch off the same parent revision, merging this PR as-is could leave the migration history with two heads instead of one, which makes `superset db upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` comment) to point at the other head instead, so the chain has a single head again.
   
   See [Merging DB Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations) in the contributing guide for a worked example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #44825:
URL: https://github.com/apache/superset/pull/44825#discussion_r4160591017


##########
superset/db_engine_specs/redshift.py:
##########
@@ -100,6 +102,13 @@ class RedshiftEngineSpec(BasicParametersMixin, PostgresBaseEngineSpec):
     max_column_name_length = 127
     default_driver = "psycopg2"
 
+    # In Redshift a catalog is a database. Cross-database queries
+    # (`database.schema.table`) are supported natively, including for
+    # databases created from datashares.
+    supports_catalog = True

Review Comment:
   Flipping this to `False` keeps the unit suite green (nothing asserts it, nor `supports_cross_catalog_queries`), and it silently turns `e6d0a676a087` into a no-op. A unit test running that migration's `upgrade()`/`downgrade()` over a Redshift row, incl. IAM `connect_args.database`, would pin both.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5916671646

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5913515225

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44825:
URL: https://github.com/apache/superset/pull/44825#issuecomment-5921698296

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(redshift): support catalogs (databases) in the Redshift engine spec [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #44825:
URL: https://github.com/apache/superset/pull/44825#discussion_r4168413218


##########
superset/migrations/versions/2026-09-30_14-30_e6d0a676a087_enable_catalog_in_redshift.py:
##########
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""Enable catalog in Redshift
+
+Revision ID: e6d0a676a087
+Revises: 95d8a99c822e
+Create Date: 2026-09-30 14:30:00.000000
+
+"""
+
+from superset.migrations.shared.catalogs import (
+    downgrade_catalog_perms,
+    upgrade_catalog_perms,
+)
+
+# revision identifiers, used by Alembic.
+revision = "e6d0a676a087"
+down_revision = "95d8a99c822e"

Review Comment:
   `95d8a99c822e` is no longer master's head: `884a2115ebd3` landed with the same parent, so merged this forks into two Alembic heads and `superset db upgrade` aborts. Update the `Revises:` line to match.
   
   ```suggestion
   down_revision = "884a2115ebd3"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org