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

[PR] fix(versioning): stop filing every operational failure under the migration race [superset]

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

   ### SUMMARY
   
   The versioning capture path swallows `OperationalError`/`ProgrammingError` to survive the pre-migration window where the versioning tables don't exist yet. But those exception classes also cover deadlocks, lock timeouts, and dropped connections — and the class-based swallow filed all of them under "table missing": no log line, no capture-error metric, while the user's save reported success and its version history quietly didn't exist. That defeats the module's own documented posture that capture regressions should be "alertable rather than log-grep-only."
   
   Three sites, three consequences:
   
   - `changes/listener.py` — the whole save's change records dropped silently
   - `baseline/collection.py` — `shadow_row_count` returns `None`, so the caller skips baseline capture for the flush
   - `queries.py` (read path) — every affected save renders an empty change list
   
   This PR adds `is_missing_table_error()`, which verifies the specific condition — `pgcode`/`sqlstate` `42P01` on PostgreSQL, errno `1146` on MySQL, `"no such table"` on SQLite — instead of inferring it from the exception class. The genuine migration race stays exactly as quiet as before; everything else now logs and, on the persist path, increments the existing `superset.versioning.capture.*` counter. The predicate is deliberately narrow: an ambiguous error gets logged, not swallowed — over-reporting is recoverable, a silent capture drop is not.
   
   Disclosure: this change was developed with AI assistance (Claude), on behalf of and reviewed by @mikebridge.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — observability-only change; no user-facing behaviour.
   
   ### TESTING INSTRUCTIONS
   
   - `pytest tests/unit_tests/versioning/test_db_errors.py` — 9 tests pinning the driver shapes per supported metadata DB (psycopg2 `pgcode`, psycopg3 `sqlstate`, MySQL errno, SQLite message), including the negative cases (deadlock, lock-wait timeout, locked database, connection drop).
   - `pytest tests/unit_tests/versioning/test_listener.py` — the new `test_transient_persist_failure_is_logged_and_counted` fails against the previous listener (no log, no metric); `test_missing_table_stays_silent_during_persist` passes before and after, pinning that the benign case's behaviour is unchanged.
   - Manual: point a dev instance at a metadata DB where the versioning migration hasn't run — saves still succeed with no error noise (the migration race stays silent).
   
   ### ADDITIONAL INFORMATION
   
   - [ ] 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] fix(versioning): stop filing every operational failure under the migration race [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42709?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 `33.33333%` with `20 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.53%. Comparing base ([`06628bb`](https://app.codecov.io/gh/apache/superset/commit/06628bbd68ed5c5822e2877eb545db6d20a8f811?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cb7faf0`](https://app.codecov.io/gh/apache/superset/commit/cb7faf0e39f307cdaec4907cf01dc21ed78cccbb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 12 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42709?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/versioning/db\_errors.py](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&filepath=superset%2Fversioning%2Fdb_errors.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmVyc2lvbmluZy9kYl9lcnJvcnMucHk=) | 38.46% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [superset/versioning/changes/listener.py](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&filepath=superset%2Fversioning%2Fchanges%2Flistener.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmVyc2lvbmluZy9jaGFuZ2VzL2xpc3RlbmVyLnB5) | 16.66% | [5 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [superset/versioning/baseline/collection.py](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&filepath=superset%2Fversioning%2Fbaseline%2Fcollection.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmVyc2lvbmluZy9iYXNlbGluZS9jb2xsZWN0aW9uLnB5) | 20.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [superset/versioning/queries.py](https://app.codecov.io/gh/apache/superset/pull/42709?src=pr&el=tree&filepath=superset%2Fversioning%2Fqueries.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmVyc2lvbmluZy9xdWVyaWVzLnB5) | 50.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42709?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   #42709      +/-   ##
   ==========================================
   - Coverage   65.43%   64.53%   -0.90%     
   ==========================================
     Files        2810     2811       +1     
     Lines      159528   159554      +26     
     Branches    36410    36415       +5     
   ==========================================
   - Hits       104380   102976    -1404     
   - Misses      53102    54556    +1454     
   + Partials     2046     2022      -24     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42709/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/42709/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/42709/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/42709/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/42709/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42709/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.43% <33.33%> (-1.77%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/42709/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.43% <33.33%> (-0.01%)` | :arrow_down: |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42709/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/42709?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] fix(versioning): stop filing every operational failure under the migration race [superset]

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

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | c959f6a8e82d9ae8e1cc53b07feaca962f347241 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a70b26f88857a00081c1c1d |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42709--superset-docs-preview.netlify.app](https://deploy-preview-42709--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.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQyNzA5LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.ZUWgk9Iia6i7Fy3iS7zgowakx4Zl3vok2s9B4PfKZMI)<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#DctBCoAgEEDRu8w6wYJUukHHGHUqoVRGiyK6e_I3f_NeyJyOXGEC6MAyRre1X8ItLuISUhRuw7hSEQ5zPZlEsoX4Qhv2UJ-GPOU9PbNvTKGWdlCLMWbUKKU0vWt5-H4) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-42709--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] fix(versioning): stop filing every operational failure under the migration race [superset]

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


-- 
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] fix(versioning): stop filing every operational failure under the migration race [superset]

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

   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] fix(versioning): stop filing every operational failure under the migration race [superset]

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

   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