You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2026/10/22 15:09:48 UTC
[PR] fix(bigquery): return empty extra metadata instead of 500 when table is not found [superset]
eschutho opened a new pull request, #45634:
URL: https://github.com/apache/superset/pull/45634
### SUMMARY
**Root cause:** `DatabaseRestApi.table_extra_metadata` calls `BigQueryEngineSpec.get_extra_table_metadata`, which calls `get_time_partition_column` -> `client.get_table(...)`. If the table no longer exists in BigQuery (dropped, renamed, stale reference), `google.api_core.exceptions.NotFound` propagates and the endpoint returns a 500. Verified `BigQueryEngineSpec` overrides `get_extra_table_metadata` and this is the path the API executes (both `table_extra_metadata` endpoints in `databases/api.py` call it).
**Fix:** catch `NotFound` (only) around the partition-column lookup in `get_extra_table_metadata`, log a warning, and return an empty payload. Partition/index info is optional enrichment, so the UI simply shows no extra metadata. Other errors (e.g. 403 Forbidden) still propagate. No change for other engines. `get_time_partition_column` itself is unchanged, so `where_latest_partition` / `select_star` behavior is untouched.
**Tradeoffs:** a missing table now yields a 200 with empty metadata instead of a 500 — a deliberate error-to-degrade failure-mode change. Callers can no longer distinguish "table missing" from "table has no partitions" via this endpoint; the condition is logged at WARNING.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
### TESTING INSTRUCTIONS
`pytest tests/unit_tests/db_engine_specs/test_bigquery.py` (73 passed). New tests: NotFound -> `{}` with no raise; Forbidden still raises; partitioned happy path unchanged. The NotFound test fails without the fix and passes with it. `ruff check`/`ruff format` clean.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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(bigquery): return empty extra metadata instead of 500 when table is not found [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45634:
URL: https://github.com/apache/superset/pull/45634#issuecomment-6344605899
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45634?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 `57.14286%` with `3 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 65.37%. Comparing base ([`47300cf`](https://app.codecov.io/gh/apache/superset/commit/47300cf4c2f13aa3a4bef6c7f349f58397de0035?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b5ee211`](https://app.codecov.io/gh/apache/superset/commit/b5ee211c3577bba864dde6193822729203cd1938?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 4 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/45634?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/bigquery.py](https://app.codecov.io/gh/apache/superset/pull/45634?src=pr&el=tree&filepath=superset%2Fdb_engine_specs%2Fbigquery.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2JpZ3F1ZXJ5LnB5) | 57.14% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/45634?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 (47300cf) and HEAD (b5ee211). Click for more details.
>
> <details><summary>HEAD has 5 uploads less than BASE</summary>
>
>| Flag | BASE (47300cf) | HEAD (b5ee211) |
>|------|------|------|
>|python|7|3|
>|postgres|2|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #45634 +/- ##
===========================================
- Coverage 84.10% 65.37% -18.73%
===========================================
Files 3056 3056
Lines 201358 201363 +5
Branches 47085 47085
===========================================
- Hits 169356 131645 -37711
- Misses 28756 66756 +38000
+ Partials 3246 2962 -284
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/45634/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/45634/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.88% <0.00%> (-0.01%)` | :arrow_down: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/45634/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/45634/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.84% <57.14%> (+<0.01%)` | :arrow_up: |
| [presto](https://app.codecov.io/gh/apache/superset/pull/45634/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.60% <0.00%> (-0.01%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/45634/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.91% <57.14%> (-34.43%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/45634/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/45634/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/45634?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(bigquery): return empty extra metadata instead of 500 when table is not found [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45634:
URL: https://github.com/apache/superset/pull/45634#issuecomment-6344303363
## CodeAnt PR Risk: Low Risk
- The PR appears safe to merge; no actionable issues were identified in the review.
**Assessed commit:** `b5ee211c3577`
--
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(bigquery): return empty extra metadata instead of 500 when table is not found [superset]
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #45634:
URL: https://github.com/apache/superset/pull/45634
--
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