Isolate bundled metric resolution failures by compute domain#11658
Isolate bundled metric resolution failures by compute domain#11658Mr-Neutr0n wants to merge 2 commits intogreat-expectations:developfrom
Conversation
When bundled metrics are resolved together via resolve_metric_bundle(), a single domain error (e.g. missing condition_parser) causes all bundled metrics to be reported as failed, even those belonging to entirely separate compute domains. Group bundled metric configurations by their compute domain before resolving, so each domain group is processed independently. A failure in one group only marks the metrics in that group as failed, while metrics in other groups resolve normally. Fixes great-expectations#10709
|
| Name | Link |
|---|---|
| 🔨 Latest commit | 553234e |
|
A new contributor, HUZZAH! Welcome and thanks for joining our community. In order to accept a pull request we require that all contributors sign our Contributor License Agreement. We have two different CLAs, depending on whether you are contributing to GX in a personal or professional capacity. Please sign the one that is applicable to your situation so that we may accept your contribution: Individual Contributor License Agreement v1.0 Once you have signed the CLA, you can add a comment with the text Please reach out to the #gx-community-support channel, on our Slack if you have any questions or if you have already signed the CLA and are receiving this message in error. Users missing a CLA: mr-neutr0n |
for more information, see https://pre-commit.ci
|
A new contributor, HUZZAH! Welcome and thanks for joining our community. In order to accept a pull request we require that all contributors sign our Contributor License Agreement. We have two different CLAs, depending on whether you are contributing to GX in a personal or professional capacity. Please sign the one that is applicable to your situation so that we may accept your contribution: Individual Contributor License Agreement v1.0 Once you have signed the CLA, you can add a comment with the text Please reach out to the #gx-community-support channel, on our Slack if you have any questions or if you have already signed the CLA and are receiving this message in error. Users missing a CLA: mr-neutr0n |
Summary
Fixes #10709 — one expectation failure causes all expectations to fail with the same traceback.
When multiple expectations are validated together, their metrics get bundled into a single
resolve_metric_bundle()call. If any single metric's domain fails (e.g., a missingcondition_parserfor Spark), the resulting exception is attributed to all bundled metrics — even those belonging to completely independent compute domains that would have resolved successfully.This happens because
_process_direct_and_bundled_metric_computation_configurationswraps the entire bundled resolution in one try/except and lists every bundled metric as failed regardless of which domain actually caused the error.Changes
In
ExecutionEngine._process_direct_and_bundled_metric_computation_configurations:MetricComputationConfigurationobjects by theircompute_domain_kwargs(usingIDDict.to_id()— the same grouping mechanism already used insideresolve_metric_bundlein both the Spark and SQLAlchemy engines)resolve_metric_bundle()once per domain group instead of once for all bundled metricsThis is a minimal, targeted fix in the base
ExecutionEngineclass so it applies to all backends (Spark, SQLAlchemy, Pandas) without changing any engine-specific code.Test plan
condition_parserfails; the independentexpect_column_values_to_not_be_nullexpectation resolves successfully