codeant-ai-for-open-source[bot] commented on code in PR #45952:
URL: https://github.com/apache/superset/pull/45952#discussion_r4453609162


##########
superset/commands/streaming_export/base.py:
##########
@@ -338,6 +321,13 @@ def _execute_query_and_stream(
             with merged_database.get_sqla_engine(
                 catalog=catalog, schema=schema
             ) as engine:
+                # Building the engine may have refreshed the user's OAuth2
+                # token, which is only staged on the session. Commit it, as the
+                # buffered export's query logging does, instead of losing it
+                # when the session closes (a single-use refresh token would be
+                # spent), and so no metadata transaction is held open while the
+                # rows stream.
+                session.commit()  # pylint: disable=consider-using-transaction

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag the OAuth2 refresh-lock commit race at streaming export call 
sites; address refresh-token coordination in superset/utils/oauth2.py.
   
   **Applied to:**
     - `superset/commands/streaming_export/base.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] fix(ex... geido (via GitHub) via notifications
    • Re: [P... codecov[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... rebenitez1802 (via GitHub) via notifications
    • Re: [P... geido (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... geido (via GitHub) via notifications
    • Re: [P... geido (via GitHub) via notifications
    • Re: [P... alexandrusoare (via GitHub) via notifications
    • Re: [P... netlify[bot] (via GitHub) via notifications
    • Re: [P... geido (via GitHub) via notifications

Reply via email to