You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hy144328 (via GitHub)" <gi...@apache.org> on 2026/07/21 17:50:54 UTC

[PR] refactor: engine enforce SQLAlchemy 2.0 [superset]

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

Posted by "hy144328 (via GitHub)" <gi...@apache.org>.
hy144328 commented on PR #42277:
URL: https://github.com/apache/superset/pull/42277#issuecomment-5038371840

   @rusackas This should be ready for review, too.
   I am quite pleased that it caused a few cases in the integration tests where the code had regressed due to concurrent PRs, e.g. incorrect use of `engine.connect()`, which does not autocommit anymore.
   They were not caught because the `SQLALCHEMY_WARN_20` environment variable is only added to the unit test CI.
   I wonder if this would be a good time now since we bumping versions has a real chance of breaking things.
   Or in other words, a follow-up to #41915 ?


-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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


##########
superset/models/core.py:
##########
@@ -644,7 +644,7 @@ def _get_sqla_engine(  # pylint: disable=too-many-locals  # noqa: C901
                 if cached := _ENGINE_CACHE.get(cache_key):
                     return cached
         try:
-            engine = create_engine(sqlalchemy_url, **engine_kwargs)
+            engine = create_engine(sqlalchemy_url, future=True, **engine_kwargs)

Review Comment:
   Addressed by [ff9d04f](https://github.com/apache/superset/pull/42277/commits/ff9d04ff536e7661cffc4e9247c89f73cc6bd778).



-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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

   ### <span aria-hidden="true">βœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">πŸ”¨</span> Latest commit | acf2918c0223bc3960bf25e984c4893bff9f4516 |
   |<span aria-hidden="true">πŸ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a5fb17a68a64b000853d765 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42277--superset-docs-preview.netlify.app](https://deploy-preview-42277--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.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQyMjc3LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.JhE1TyaBKb1zRgauobC23lDlxA1-BSy5PTGXls9elLo)<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#Dcs7DoQgEADQu0y9ZDEKGm_gMQYYlISfIxbG7N2X7jXvhcol1QYrwAcMY7ZHN5NH2wp_rzNitAelR6SwM7ZQsvB3u5kE5T1k6s1RjeXZXI8alTfDjHpBPRkp5aJGN2sFvz8) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-42277--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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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


##########
superset/db_engine_specs/gsheets.py:
##########
@@ -389,6 +389,7 @@ def validate_parameters(
                     }
                 }
             },
+            future=True,
         )
         conn = engine.connect()
         idx = 0

Review Comment:
   `validate_parameters` opens a SQLAlchemy connection via `conn = engine.connect()` but never closes it, and the early `return errors` branches inside the loop also bypass any cleanup. With `future=True` this code will still leak open connections/pools on repeated validation calls. Use a context manager (`with engine.connect() as conn:`) and avoid early returns (or ensure `conn.close()` happens before returning).



##########
superset/models/core.py:
##########
@@ -644,6 +644,8 @@ def _get_sqla_engine(  # pylint: disable=too-many-locals  # noqa: C901
                 if cached := _ENGINE_CACHE.get(cache_key):
                     return cached
         try:
+            if "future" not in engine_kwargs:
+                engine_kwargs["future"] = True
             engine = create_engine(sqlalchemy_url, **engine_kwargs)

Review Comment:
   `engine_kwargs["future"]` is added *after* the engine-cache key is computed (`repr(sorted(engine_kwargs.items()))`). This makes the cache key not reflect the actual kwargs passed to `create_engine`, and can also cause duplicate cached engines if a caller explicitly sets `future=True` in `engine_params` (different key, same behavior). Set the default `future=True` before computing/looking up the cache key, and then call `create_engine` without mutating kwargs afterward.



-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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

   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] refactor: engine enforce SQLAlchemy 2.0 [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 #42277:
URL: https://github.com/apache/superset/pull/42277#discussion_r3624468522


##########
superset/cli/test_db.py:
##########
@@ -280,7 +280,7 @@ def test_sqlalchemy_dialect(
     """
     Test the SQLAlchemy dialect, making sure it supports everything Superset needs.
     """
-    engine = create_engine(sqlalchemy_uri, **engine_kwargs)
+    engine = create_engine(sqlalchemy_uri, future=True, **engine_kwargs)

Review Comment:
   **Suggestion:** This call can fail with `TypeError: got multiple values for keyword argument` if `engine_kwargs` already includes `future`, which is plausible since this function accepts externally supplied engine options. Merge defaults safely instead of passing the same keyword both explicitly and via `**engine_kwargs`. [possible bug]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ CLI database dialect test crashes for some engine options.
   - ⚠️ Automated DB validation scripts may fail unexpectedly.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction βœ… </b></summary>
   
   ```mdx
   1. Open a Python shell in the Superset environment and import the function
   `test_sqlalchemy_dialect` from `superset/cli/test_db.py` (definition starts at line 275).
   
   2. Construct `engine_kwargs` with a `future` key, e.g. `engine_kwargs = {"future": True}`.
   This is supported by the function signature which accepts arbitrary SQLAlchemy engine
   options.
   
   3. Call `test_sqlalchemy_dialect(console=Console(), sqlalchemy_uri="sqlite://",
   engine_kwargs=engine_kwargs)` so execution reaches line 283 where
   `create_engine(sqlalchemy_uri, future=True, **engine_kwargs)` is invoked.
   
   4. Observe Python raising `TypeError: create_engine() got multiple values for keyword
   argument 'future'` because `future` is passed both explicitly and via `**engine_kwargs` at
   `superset/cli/test_db.py:283`, aborting the dialect test.
   ```
   </details>
   
   [![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=9279c1d0a81542d2abbeea95357c6974&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=9279c1d0a81542d2abbeea95357c6974&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/cli/test_db.py
   **Line:** 283:283
   **Comment:**
   	*Possible Bug: This call can fail with `TypeError: got multiple values for keyword argument` if `engine_kwargs` already includes `future`, which is plausible since this function accepts externally supplied engine options. Merge defaults safely instead of passing the same keyword both explicitly and via `**engine_kwargs`.
   
   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%2F42277&comment_hash=970a5700f1e0792d04a406b150294a3faadf6145892c2b6b1c4a4295ea4995a3&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42277&comment_hash=970a5700f1e0792d04a406b150294a3faadf6145892c2b6b1c4a4295ea4995a3&reaction=dislike'>πŸ‘Ž</a>



##########
superset/models/core.py:
##########
@@ -644,7 +644,7 @@ def _get_sqla_engine(  # pylint: disable=too-many-locals  # noqa: C901
                 if cached := _ENGINE_CACHE.get(cache_key):
                     return cached
         try:
-            engine = create_engine(sqlalchemy_url, **engine_kwargs)
+            engine = create_engine(sqlalchemy_url, future=True, **engine_kwargs)

Review Comment:
   **Suggestion:** Adding `future=True` directly while also expanding `**engine_kwargs` can raise a runtime `TypeError` when `engine_kwargs` already contains a `future` key (for example from user-provided engine options), which will prevent engine creation for those existing configurations. Ensure `future` is injected only when absent, or normalize/remove duplicate keys before calling `create_engine`. [possible bug]
   
   <details>
   <summary><b>Severity Level:</b> Critical 🚨</summary>
   
   ```mdx
   - ❌ Database engine creation fails for configs including `future`.
   - ❌ Queries and charts cannot access affected database engines.
   - ⚠️ Migration and CLI tasks using Database engine fail.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction βœ… </b></summary>
   
   ```mdx
   1. In a Superset Python shell, obtain a `Database` model instance whose `_get_sqla_engine`
   method is defined in `superset/models/core.py` around line 634.
   
   2. Prepare `engine_kwargs` to include a `future` key, e.g. `engine_kwargs = {"future":
   True}`, which is realistic since `engine_kwargs` are intended to carry
   user/config-supplied engine options (e.g. from `SQLALCHEMY_ENGINE_OPTIONS`).
   
   3. Call the internal engine creation routine so that `_get_sqla_engine(sqlalchemy_url,
   schema=None, source=None, cacheable=False, engine_kwargs=engine_kwargs)` is executed and
   reaches line 647: `engine = create_engine(sqlalchemy_url, future=True, **engine_kwargs)`.
   
   4. Observe a runtime `TypeError: create_engine() got multiple values for keyword argument
   'future'` raised at `superset/models/core.py:647`, preventing engine creation and causing
   any operation depending on this database connection (queries, migrations, dashboards) to
   fail.
   ```
   </details>
   
   [![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=969d76456fd944059dc298b672497e70&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=969d76456fd944059dc298b672497e70&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/models/core.py
   **Line:** 647:647
   **Comment:**
   	*Possible Bug: Adding `future=True` directly while also expanding `**engine_kwargs` can raise a runtime `TypeError` when `engine_kwargs` already contains a `future` key (for example from user-provided engine options), which will prevent engine creation for those existing configurations. Ensure `future` is injected only when absent, or normalize/remove duplicate keys before calling `create_engine`.
   
   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%2F42277&comment_hash=4a809a0de5c8ce05568961f72869a6d7b253de76f7422c53f32583ddf97d3bac&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42277&comment_hash=4a809a0de5c8ce05568961f72869a6d7b253de76f7422c53f32583ddf97d3bac&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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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

   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 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] refactor: engine enforce SQLAlchemy 2.0 [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #42277:
URL: https://github.com/apache/superset/pull/42277#issuecomment-5049749854

   I think the copilot findings are skippable here and can be addressed in follow-up touchups (just adding it to the tracker if warranted). Let's merge this thing! Thank you @hy144328 this is huge! 


-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42277:
URL: https://github.com/apache/superset/pull/42277


-- 
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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42277?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 `1 line` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.61%. Comparing base ([`3fa7cc5`](https://app.codecov.io/gh/apache/superset/commit/3fa7cc59862db69e8b111efe93519aaa8aa67f65?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`acf2918`](https://app.codecov.io/gh/apache/superset/commit/acf2918c0223bc3960bf25e984c4893bff9f4516?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 11 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42277?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/cli/test\_db.py](https://app.codecov.io/gh/apache/superset/pull/42277?src=pr&el=tree&filepath=superset%2Fcli%2Ftest_db.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY2xpL3Rlc3RfZGIucHk=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42277      +/-   ##
   ==========================================
   - Coverage   56.62%   56.61%   -0.02%     
   ==========================================
     Files        2775     2775              
     Lines      156816   156895      +79     
     Branches    35852    35854       +2     
   ==========================================
   + Hits        88798    88822      +24     
   - Misses      67186    67242      +56     
   + Partials      832      831       -1     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42277/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/42277/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.68% <50.00%> (-0.02%)` | :arrow_down: |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/42277/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.61% <50.00%> (-0.02%)` | :arrow_down: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42277/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.86% <50.00%> (-0.02%)` | :arrow_down: |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42277/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ΓΈ> (ΓΈ)` | |
   
   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/42277?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] refactor: engine enforce SQLAlchemy 2.0 [superset]

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


##########
superset/cli/test_db.py:
##########
@@ -280,7 +280,7 @@ def test_sqlalchemy_dialect(
     """
     Test the SQLAlchemy dialect, making sure it supports everything Superset needs.
     """
-    engine = create_engine(sqlalchemy_uri, **engine_kwargs)
+    engine = create_engine(sqlalchemy_uri, future=True, **engine_kwargs)

Review Comment:
   Addressed by [ff9d04f](https://github.com/apache/superset/pull/42277/commits/ff9d04ff536e7661cffc4e9247c89f73cc6bd778).



-- 
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