From 2071dd5deca382b5eafc22cf187c7554af2d8413 Mon Sep 17 00:00:00 2001 From: Nic Grayson <793886+nicgrayson@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:59:56 -0500 Subject: [PATCH 1/2] [BUGFIX] Migrate back to github hosted runners until docker issue is fixed (#10011) --- .github/workflows/ci.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d9f954d8c0a..39b304a49b69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,13 @@ concurrency: jobs: ci-does-not-run-on-draft-pull-requests: - runs-on: enterprise-arc + runs-on: ubuntu-latest if: github.event.pull_request.draft == true steps: - run: echo "CI jobs won't run because this is a draft pull request." ci-is-on-main-repo: - runs-on: enterprise-arc + runs-on: ubuntu-latest # job only runs on main repo where we have access to credentials, or as part of the release if: | github.event.pull_request.head.repo.full_name == github.repository || @@ -52,7 +52,7 @@ jobs: - run: echo "This CI step only runs on the main repo, where we have access to credentials." static-analysis: - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -83,7 +83,7 @@ jobs: (github.event.pull_request.draft == false && github.base_ref == 'develop') || (github.event_name == 'push' && contains(github.ref, 'refs/tags/1.')) || github.event_name == 'merge_group' - runs-on: enterprise-arc + runs-on: ubuntu-latest strategy: matrix: doc-step: @@ -177,7 +177,7 @@ jobs: unit-tests: strategy: matrix: - os: [enterprise-arc] + os: [ubuntu-latest] python-version: ["3.8", "3.9", "3.10", "3.11"] runs-on: ${{ matrix.os }} @@ -212,7 +212,7 @@ jobs: doc-checks: needs: [static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -251,7 +251,7 @@ jobs: (github.event.pull_request.draft == false && github.base_ref == 'develop') || (github.event_name == 'push' && contains(github.ref, 'refs/tags/1.')) || github.event_name == 'merge_group' - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -275,7 +275,7 @@ jobs: permissions: id-token: write contents: read - runs-on: enterprise-arc + runs-on: ubuntu-latest env: GX_CLOUD_BASE_URL: ${{vars.MERCURY_BASE_URL}} PACT_BROKER_READ_WRITE_TOKEN: ${{secrets.PACT_BROKER_READ_WRITE_TOKEN}} @@ -361,7 +361,7 @@ jobs: SNOWFLAKE_SCHEMA: ${{secrets.SNOWFLAKE_SCHEMA}} SNOWFLAKE_WAREHOUSE: ${{secrets.SNOWFLAKE_WAREHOUSE}} SNOWFLAKE_ROLE: ${{secrets.SNOWFLAKE_ROLE}} - runs-on: enterprise-arc + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -419,7 +419,7 @@ jobs: py38-min-versions: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -437,7 +437,7 @@ jobs: py39-min-versions: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -455,7 +455,7 @@ jobs: py310-min-versions: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -473,7 +473,7 @@ jobs: py311-min-versions: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -491,7 +491,7 @@ jobs: pydantic-v1: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -509,7 +509,7 @@ jobs: numpy-2: needs: [unit-tests, static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -528,7 +528,7 @@ jobs: airflow-min-versions: needs: [unit-tests, static-analysis] - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -547,7 +547,7 @@ jobs: import_gx: needs: [static-analysis] if: github.event.pull_request.draft == false - runs-on: enterprise-arc + runs-on: ubuntu-latest strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] @@ -588,7 +588,7 @@ jobs: ] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') name: Build and publish Python distributions to PyPI - runs-on: enterprise-arc + runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/great-expectations @@ -636,7 +636,7 @@ jobs: build-n-publish, ] if: always() && !cancelled() && contains(needs.*.result, 'failure') && github.event_name != 'pull_request' && github.event_name != 'merge_group' - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Scheduled CI job failure id: slack @@ -652,7 +652,7 @@ jobs: notify_on_release: needs: [build-n-publish] - runs-on: enterprise-arc + runs-on: ubuntu-latest steps: - name: Announce Release id: slack From 8421ffd5f60e0c60017b8bb8de0955aec452adbe Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 6 Jun 2024 11:35:21 -0400 Subject: [PATCH 2/2] [MAINTENANCE] ruff `0.4.8` (#10009) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- contrib/cli/requirements.txt | 2 +- great_expectations/data_context/util.py | 2 +- .../expectations/core/expect_column_values_to_be_of_type.py | 2 +- great_expectations/expectations/row_conditions.py | 2 +- .../render/renderer/content_block/content_block.py | 2 +- great_expectations/render/renderer_configuration.py | 2 +- reqs/requirements-dev-contrib.txt | 2 +- tasks.py | 2 +- tests/data_context/test_data_context_utils.py | 2 +- tests/integration/test_script_runner.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f2781725304..b2f809390f09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: detect-private-key exclude: tests/test_fixtures/database_key_test* - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.4.4" + rev: "v0.4.8" hooks: - id: ruff args: ["--fix"] diff --git a/contrib/cli/requirements.txt b/contrib/cli/requirements.txt index 67f9bdd3a259..0ead4ae56149 100644 --- a/contrib/cli/requirements.txt +++ b/contrib/cli/requirements.txt @@ -3,6 +3,6 @@ cookiecutter==2.1.1 # Project templating mypy==1.10.0 # Type checker pydantic>=1.0 # Needed for mypy plugin pytest>=5.3.5 # Test framework -ruff==0.4.4 # Linting / code style / formatting +ruff==0.4.8 # Linting / code style / formatting twine==3.7.1 # Packaging wheel==0.38.1 # Packaging diff --git a/great_expectations/data_context/util.py b/great_expectations/data_context/util.py index cb3a18c99e74..9941d4ce2006 100644 --- a/great_expectations/data_context/util.py +++ b/great_expectations/data_context/util.py @@ -26,7 +26,7 @@ # TODO: Rename config to constructor_kwargs and config_defaults -> constructor_kwarg_default # TODO: Improve error messages in this method. Since so much of our workflow is config-driven, this will be a *super* important part of DX. # noqa: E501 -def instantiate_class_from_config( # noqa: C901, PLR0912 +def instantiate_class_from_config( # noqa: C901 config, runtime_environment, config_defaults=None ): """Build a GX class from configuration dictionaries.""" diff --git a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py index d9bc228b712d..861f4bfbba3b 100644 --- a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py +++ b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py @@ -605,7 +605,7 @@ def _validate( ) -def _get_dialect_type_module( # noqa: C901, PLR0911, PLR0912 +def _get_dialect_type_module( # noqa: C901, PLR0911 execution_engine, ): if execution_engine.dialect_module is None: diff --git a/great_expectations/expectations/row_conditions.py b/great_expectations/expectations/row_conditions.py index 4dfb9abe2580..765a146e41a0 100644 --- a/great_expectations/expectations/row_conditions.py +++ b/great_expectations/expectations/row_conditions.py @@ -125,7 +125,7 @@ def _parse_great_expectations_condition(row_condition: str): # noinspection PyUnresolvedReferences -def parse_condition_to_spark( # type: ignore[return] # return or raise exists for all branches # noqa: C901, PLR0911, PLR0912 +def parse_condition_to_spark( # type: ignore[return] # return or raise exists for all branches # noqa: C901, PLR0911 row_condition: str, ) -> pyspark.Column: parsed = _parse_great_expectations_condition(row_condition) diff --git a/great_expectations/render/renderer/content_block/content_block.py b/great_expectations/render/renderer/content_block/content_block.py index 93f846320dac..eb899188a0cc 100644 --- a/great_expectations/render/renderer/content_block/content_block.py +++ b/great_expectations/render/renderer/content_block/content_block.py @@ -214,7 +214,7 @@ def _render_list( # noqa: C901, PLR0912, PLR0913 return None @classmethod - def _render_other( # noqa: C901, PLR0912, PLR0913 + def _render_other( # noqa: C901, PLR0913 cls, render_object: Any, exception_list_content_block: bool, diff --git a/great_expectations/render/renderer_configuration.py b/great_expectations/render/renderer_configuration.py index 101c1f474965..c43d48c2205e 100644 --- a/great_expectations/render/renderer_configuration.py +++ b/great_expectations/render/renderer_configuration.py @@ -206,7 +206,7 @@ class Config: allow_mutation = False @root_validator(pre=True) - def _validate_param_type_matches_value( # noqa: C901, PLR0912 + def _validate_param_type_matches_value( # noqa: C901 cls, values: dict ) -> dict: """ diff --git a/reqs/requirements-dev-contrib.txt b/reqs/requirements-dev-contrib.txt index 578d34eb599c..ac3a284c5b72 100644 --- a/reqs/requirements-dev-contrib.txt +++ b/reqs/requirements-dev-contrib.txt @@ -2,5 +2,5 @@ adr-tools-python==1.0.3 invoke>=2.0.0 mypy==1.10 pre-commit>=2.21.0 -ruff==0.4.4 +ruff==0.4.8 tomli>=2.0.1 diff --git a/tasks.py b/tasks.py index e177557e77e2..b6e15fa9bc28 100644 --- a/tasks.py +++ b/tasks.py @@ -494,7 +494,7 @@ def docker( " Can be combined with `--sync` to reset the /schemas dir and remove stale schemas", }, ) -def type_schema( # noqa: C901, PLR0912 - too complex +def type_schema( # noqa: C901 - too complex ctx: Context, sync: bool = False, clean: bool = False, diff --git a/tests/data_context/test_data_context_utils.py b/tests/data_context/test_data_context_utils.py index 3aebb6b520b3..c2d6e593f0fb 100644 --- a/tests/data_context/test_data_context_utils.py +++ b/tests/data_context/test_data_context_utils.py @@ -54,7 +54,7 @@ def test_load_class_raises_error_when_module_name_is_not_string(): @pytest.mark.filterwarnings( "ignore:SQLAlchemy is not installed*:UserWarning:great_expectations.data_context.util" ) -def test_password_masker_mask_db_url( # noqa: PLR0912,PLR0915,C901- 11 +def test_password_masker_mask_db_url( # noqa: PLR0915, C901- 11 monkeypatch, tmp_path ): """ diff --git a/tests/integration/test_script_runner.py b/tests/integration/test_script_runner.py index 33cd909bcaa9..dd4afcaee782 100644 --- a/tests/integration/test_script_runner.py +++ b/tests/integration/test_script_runner.py @@ -422,7 +422,7 @@ def test_integration_tests(test_configuration, tmp_path, pytest_parsed_arguments _execute_integration_test(test_configuration, tmp_path) -def _execute_integration_test( # noqa: C901, PLR0912, PLR0915 +def _execute_integration_test( # noqa: C901, PLR0915 integration_test_fixture: IntegrationTestFixture, tmp_path: pathlib.Path ): """