From 461c6b5d056247ba49271bc92e3bbacb837a9260 Mon Sep 17 00:00:00 2001 From: Josh Stauffer <66793731+joshua-stauffer@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:54:10 +0200 Subject: [PATCH 1/4] [MAINTENANCE] Remove deprecated v0.13.28 V2 API style custom rendering The V2 API style custom rendering path was deprecated in v0.13.28 with a removal target of v0.16. We are now well past that window (current v1.16.1), so the fallback method and its companion helper are removed along with the test that exercised the deprecated path. --- .../validation_results_table_content_block.py | 51 +---------- ...idationResultsTableContentBlockRenderer.py | 91 ------------------- 2 files changed, 1 insertion(+), 141 deletions(-) diff --git a/great_expectations/render/renderer/content_block/validation_results_table_content_block.py b/great_expectations/render/renderer/content_block/validation_results_table_content_block.py index 5e94d52ccad4..bd41c6326f4b 100644 --- a/great_expectations/render/renderer/content_block/validation_results_table_content_block.py +++ b/great_expectations/render/renderer/content_block/validation_results_table_content_block.py @@ -2,7 +2,6 @@ import logging import traceback -import warnings from copy import deepcopy from typing import TYPE_CHECKING, Callable @@ -90,10 +89,6 @@ def _get_content_block_fn( # noqa: C901 # FIXME CoP ) expectation_string_fn = content_block_fn - if expectation_string_fn is None: - expectation_string_fn = cls._get_legacy_v2_api_style_expectation_string_fn( - expectation_type - ) if expectation_string_fn is None: expectation_string_fn = cls._missing_content_block_fn @@ -172,11 +167,7 @@ def row_generator_fn( # noqa: C901 # FIXME CoP renderer_type=LegacyDiagnosticRendererType.OBSERVED_VALUE, ) observed_value = [ - observed_value_renderer[1](result=result) - if observed_value_renderer - else ( - cls._get_legacy_v2_api_observed_value(expectation_string_fn, result) or "--" - ) + observed_value_renderer[1](result=result) if observed_value_renderer else "--" ] except Exception as e: exception_traceback = traceback.format_exc() @@ -206,43 +197,3 @@ def row_generator_fn( # noqa: C901 # FIXME CoP return output_row return row_generator_fn - - @classmethod - def _get_legacy_v2_api_style_expectation_string_fn(cls, expectation_type): - legacy_expectation_string_fn = getattr(cls, expectation_type, None) - if legacy_expectation_string_fn is None: - # With the V2 API, expectation rendering was implemented by defining a method with the same name as the expectation. # noqa: E501 # FIXME CoP - # If no legacy rendering is present, return None. - return None - - # deprecated-v0.13.28 - warnings.warn( - "V2 API style custom rendering is deprecated as of v0.13.28 and is not fully supported anymore; " # noqa: E501 # FIXME CoP - "As it will be removed in v0.16, please transition to V3 API and associated rendering style", # noqa: E501 # FIXME CoP - DeprecationWarning, - ) - - def expectation_string_fn_with_legacy_translation( - configuration: ExpectationConfiguration, runtime_configuration: dict - ): - if runtime_configuration is None: - runtime_configuration = {} - - # With the V2 API, the expectation string function had a different signature; the below translates from the new signature to the legacy signature. # noqa: E501 # FIXME CoP - return legacy_expectation_string_fn( - expectation=configuration, - styling=runtime_configuration.get("styling", None), - include_column_name=runtime_configuration.get("include_column_name", True), - ) - - return expectation_string_fn_with_legacy_translation - - @staticmethod - def _get_legacy_v2_api_observed_value(expectation_string_fn, result): - if expectation_string_fn.__name__ != "expectation_string_fn_with_legacy_translation": - # If legacy V2 API style rendering is used, "expectation_string_fn" will be the method defined in the above "_get_legacy_v2_api_style_expectation_string_fn". # noqa: E501 # FIXME CoP - # If this isn't the case, return None, so we don't do any legacy logic. - return None - - # With V2 API style rendering, the result had an "observed_value" entry that could be rendered. # noqa: E501 # FIXME CoP - return result["result"].get("observed_value") diff --git a/tests/render/test_render_ValidationResultsTableContentBlockRenderer.py b/tests/render/test_render_ValidationResultsTableContentBlockRenderer.py index ee1607152e5d..a703efd6efa3 100644 --- a/tests/render/test_render_ValidationResultsTableContentBlockRenderer.py +++ b/tests/render/test_render_ValidationResultsTableContentBlockRenderer.py @@ -485,97 +485,6 @@ def test_ValidationResultsTableContentBlockRenderer_get_content_block_fn(evr_suc assert content_block_fn_output == content_block_fn_expected_output -@pytest.mark.filterwarnings("ignore:V2 API style custom rendering*:DeprecationWarning") -def test_ValidationResultsTableContentBlockRenderer_get_content_block_fn_with_v2_api_style_custom_rendering(): # noqa: E501 # FIXME CoP - """Test backwards support for custom expectation rendering with the V2 API as described at - https://docs.greatexpectations.io/en/latest/reference/spare_parts/data_docs_reference.html#customizing-data-docs. - """ - - custom_expectation_template = "custom_expectation_template" - custom_expectation_observed_value = "custom_expectation_observed_value" - - class ValidationResultsTableContentBlockRendererWithV2ApiStyleCustomExpectations( - ValidationResultsTableContentBlockRenderer - ): - @classmethod - def expect_custom_expectation_written_in_v2_api_style( - cls, expectation, styling=None, include_column_name: bool = True - ): - return [ - RenderedStringTemplateContent( - content_block_type="string_template", - string_template={ - "template": custom_expectation_template, - "params": expectation.kwargs, - "styling": styling, - }, - ) - ] - - evr = ExpectationValidationResult( - success=True, - result={ - "observed_value": custom_expectation_observed_value, - }, - exception_info={ - "raised_exception": False, - "exception_message": None, - "exception_traceback": None, - }, - expectation_config=ExpectationConfiguration( - type="expect_custom_expectation", - kwargs={"column": "a_column_name", "result_format": "SUMMARY"}, - ), - ) - - content_block_fn = ValidationResultsTableContentBlockRendererWithV2ApiStyleCustomExpectations._get_content_block_fn( # noqa: E501 # FIXME CoP - "expect_custom_expectation_written_in_v2_api_style" - ) - content_block_fn_output = content_block_fn(result=evr) - - content_block_fn_expected_output = [ - [ - RenderedStringTemplateContent( - **{ - "content_block_type": "string_template", - "string_template": { - "template": "$icon", - "params": {"icon": "", "markdown_status_icon": "✅"}, - "styling": { - "params": { - "icon": { - "classes": [ - "fas", - "fa-check-circle", - "text-success", - ], - "tag": "i", - } - } - }, - }, - "styling": {"parent": {"classes": ["hide-succeeded-validation-target-child"]}}, - } - ), - RenderedStringTemplateContent( - **{ - "content_block_type": "string_template", - "string_template": { - "template": custom_expectation_template, - "params": { - "column": "a_column_name", - "result_format": "SUMMARY", - }, - "styling": None, - }, - } - ), - custom_expectation_observed_value, - ] - ] - assert content_block_fn_output == content_block_fn_expected_output - - def test_ValidationResultsTableContentBlockRenderer_get_observed_value(evr_success): evr_no_result_key = ExpectationValidationResult( success=True, From 7e226d825ce4293865355aba49e39e5fb0ce5f86 Mon Sep 17 00:00:00 2001 From: Josh Stauffer <66793731+joshua-stauffer@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:43:37 +0200 Subject: [PATCH 2/4] [MAINTENANCE] restore continue-on-error on Can I deploy? step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The continue-on-error flag originally added in #11829 was dropped when #11822 refactored the pact-contract-check into its own job. Without it, PRs fail whenever Mercury has not verified the new consumer pact within the 10-minute retry window — which is a timing/infrastructure signal, not an indicator that the PR itself has regressed a contract. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5323aae274cb..7ebad278c203 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -664,6 +664,7 @@ jobs: - name: Can I deploy? if: env.PACT_BROKER_READ_WRITE_TOKEN != '' + continue-on-error: true run: | docker run --rm \ pactfoundation/pact-cli:1.5.0.4 \ From 1256e31fe96bf4343336766337ee7cd0605fd9d9 Mon Sep 17 00:00:00 2001 From: Josh Stauffer <66793731+joshua-stauffer@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:21:34 +0200 Subject: [PATCH 3/4] Revert "[MAINTENANCE] restore continue-on-error on Can I deploy? step" This reverts commit 7e226d825ce4293865355aba49e39e5fb0ce5f86. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ebad278c203..5323aae274cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -664,7 +664,6 @@ jobs: - name: Can I deploy? if: env.PACT_BROKER_READ_WRITE_TOKEN != '' - continue-on-error: true run: | docker run --rm \ pactfoundation/pact-cli:1.5.0.4 \ From fbbd499a82c168f84700c98cc95aab09c61781b0 Mon Sep 17 00:00:00 2001 From: Josh Stauffer <66793731+joshua-stauffer@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:46:27 +0200 Subject: [PATCH 4/4] [MAINTENANCE] allow pyarrow fallback assignment under pyarrow 24 stubs pyarrow 24.0.0 started shipping stubs that declare the top-level `pyarrow` as a specific Module subtype, making the `pyarrow = PYARROW_NOT_IMPORTED` fallback fail mypy's [assignment] check. The fallback only runs when the import fails, so silencing the assignment error with a targeted type-ignore matches the existing pattern elsewhere in this compatibility/ package. --- great_expectations/compatibility/pyarrow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/great_expectations/compatibility/pyarrow.py b/great_expectations/compatibility/pyarrow.py index 1b75860a5646..b1053e0bd836 100644 --- a/great_expectations/compatibility/pyarrow.py +++ b/great_expectations/compatibility/pyarrow.py @@ -7,4 +7,4 @@ try: import pyarrow except ImportError: - pyarrow = PYARROW_NOT_IMPORTED + pyarrow = PYARROW_NOT_IMPORTED # type: ignore[assignment]