Title: fix: Raise Trino monitoring query errors other than a missing table by ericdelorefice · Pull Request #6918 · feast-dev/feast · GitHub
Open Graph Title: fix: Raise Trino monitoring query errors other than a missing table by ericdelorefice · Pull Request #6918 · feast-dev/feast
X Title: fix: Raise Trino monitoring query errors other than a missing table by ericdelorefice · Pull Request #6918 · feast-dev/feast
Description: What this PR does / why we need it: Problem TrinoOfflineStore.query_monitoring_metrics catches every TrinoQueryError, logs it at debug level and returns []. The test for it, test_query_monitoring_metrics_handles_query_error, uses TABLE_NOT_FOUND, and that case is right: no table means no metrics yet. But the handler also returns [] for ACCESS_DENIED, a syntax error or an internal error. ensure_monitoring_tables in the same file already draws this line. It accepts COLUMN_ALREADY_EXISTS and raises everything else, and test_ensure_monitoring_tables_raises_on_permission_error pins that. An empty list has real consequences in the callers: MonitoringService calls _ensure_monitoring_tables() right before querying, so on that path the table exists and the handler only ever hides real errors behind an empty result. DQMJobManager.get_job returns None for [], and update_status returns early when the job is None. A failed read while marking a job running, completed or failed drops the status update without an error, and the job stays in its old state. Reproduction A mocked client raising TrinoQueryError({"errorName": "ACCESS_DENIED", ...}), on master: query_monitoring_metrics(...) returns [] and nothing is raised. The same for SYNTAX_ERROR and GENERIC_INTERNAL_ERROR. Change TABLE_NOT_FOUND and SCHEMA_NOT_FOUND still return [], since either means the monitoring table has not been created yet. Any other TrinoQueryError is logged and re-raised, the same as in ensure_monitoring_tables. Verification Two new tests in test_trino_monitoring.py. One covers SCHEMA_NOT_FOUND returning []. The other, parametrized over ACCESS_DENIED, SYNTAX_ERROR and GENERIC_INTERNAL_ERROR, checks that the error is raised. On master the 3 parametrized cases fail and the 2 not-found cases pass, including the existing TABLE_NOT_FOUND test. With the change, the Trino offline store tests are 28 passed. ruff check and ruff format --check are clean. Which issue(s) this PR fixes: None filed. The reproduction is above. This follows the Trino monitoring support added in #6779. Checks I've made sure the tests are passing. My commits are signed off (git commit -s) My PR title follows conventional commits format Testing Strategy Unit tests Integration tests Manual tests Testing is not required for this change
Open Graph Description: What this PR does / why we need it: Problem TrinoOfflineStore.query_monitoring_metrics catches every TrinoQueryError, logs it at debug level and returns []. The test for it, test_query_monitoring_m...
X Description: What this PR does / why we need it: Problem TrinoOfflineStore.query_monitoring_metrics catches every TrinoQueryError, logs it at debug level and returns []. The test for it, test_query_monitoring_m...
Opengraph URL: https://github.com/feast-dev/feast/pull/6918
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c872c948-31fd-d5e9-c355-131715680c83 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A8FA:5B76F:F87148:1520DC2:6AFE98A3 |
| html-safe-nonce | fc91ff628a282d30e58d54336f886481e4b670b6131db5027d0e2f75f338aab5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEZBOjVCNzZGOkY4NzE0ODoxNTIwREMyOjZBRkU5OEEzIiwidmlzaXRvcl9pZCI6IjQzMTU5NTcwNzc4NDg1MjkwNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2a92462a4aa6c4b142e688738d4cc761dc6673681825f416dd18f6541604b8a3 |
| hovercard-subject-tag | pull_request:4701645705 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6918/files |
| twitter:image | https://avatars.githubusercontent.com/u/114540347?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/114540347?s=400&v=4 |
| og:image:alt | What this PR does / why we need it: Problem TrinoOfflineStore.query_monitoring_metrics catches every TrinoQueryError, logs it at debug level and returns []. The test for it, test_query_monitoring_m... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width