Repository: great-expectations/great_expectations

Issue:
WarningAndFailureExpectationSuitesValidationOperator doesn't accept evaluation_parameters when run
The `run` method of `WarningAndFailureExpectationSuitesValidationOperator` does not accept evaluation_parameters. This is different than the same method in `ActionListValidationOperator` as of version 0.9.9.


Discussion:

Resolving patch:
diff --git a/great_expectations/validation_operators/validation_operators.py b/great_expectations/validation_operators/validation_operators.py
--- a/great_expectations/validation_operators/validation_operators.py
+++ b/great_expectations/validation_operators/validation_operators.py
@@ -402,7 +402,7 @@ def _build_slack_query(self, run_return_obj):
         
         return query
 
-    def run(self, assets_to_validate, run_id, base_expectation_suite_name=None):
+    def run(self, assets_to_validate, run_id, base_expectation_suite_name=None, evaluation_parameters=None):
         if base_expectation_suite_name is None:
             if self.base_expectation_suite_name is None:
                 raise ValueError("base_expectation_suite_name must be configured in the validation operator or passed at runtime")
@@ -452,7 +452,8 @@ def run(self, assets_to_validate, run_id, base_expectation_suite_name=None):
 
             if failure_expectation_suite:
                 return_obj["failure"][failure_validation_result_id] = {}
-                failure_validation_result = batch.validate(failure_expectation_suite, result_format="SUMMARY")
+                failure_validation_result = batch.validate(failure_expectation_suite, result_format="SUMMARY",
+                                                           evaluation_parameters=evaluation_parameters)
                 return_obj["failure"][failure_validation_result_id]["validation_result"] = failure_validation_result
                 failure_actions_results = self._run_actions(
                     batch,
@@ -487,7 +488,8 @@ def run(self, assets_to_validate, run_id, base_expectation_suite_name=None):
 
             if warning_expectation_suite:
                 return_obj["warning"][warning_validation_result_id] = {}
-                warning_validation_result = batch.validate(warning_expectation_suite, result_format="SUMMARY")
+                warning_validation_result = batch.validate(warning_expectation_suite, result_format="SUMMARY",
+                                                           evaluation_parameters=evaluation_parameters)
                 return_obj["warning"][warning_validation_result_id]["validation_result"] = warning_validation_result
                 warning_actions_results = self._run_actions(
                     batch,


Test patch:
diff --git a/tests/actions/test_validation_operators_in_data_context.py b/tests/actions/test_validation_operators_in_data_context.py
--- a/tests/actions/test_validation_operators_in_data_context.py
+++ b/tests/actions/test_validation_operators_in_data_context.py
@@ -71,18 +71,20 @@ def test_validation_operator_evaluation_parameters(validation_operators_data_con
     )
     assert res["success"] is True
 
+    validation_operators_data_context.save_expectation_suite(parameterized_expectation_suite, "param_suite.failure")
     res = validation_operators_data_context.run_validation_operator(
-        "store_val_res_and_extract_eval_params",
+        "errors_and_warnings_validation_operator",
         assets_to_validate=[
             (
                 validation_operators_data_context.build_batch_kwargs("my_datasource", "subdir_reader", "f1"),
-                "param_suite"
+                "param_suite.failure"
             )
         ],
         evaluation_parameters={
             "urn:great_expectations:validations:source_patient_data.default:expect_table_row_count_to_equal.result"
             ".observed_value": 10
-        }
+        },
+        base_expectation_suite_name="param_suite"
     )
     assert res["success"] is False