Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suje ff test #10769

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

suje ff test #10769

wants to merge 6 commits into from

Conversation

roblim
Copy link
Member

@roblim roblim commented Dec 12, 2024

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

For more information about contributing, visit our community resources.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit b80c22e
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/675b2cc833e2c60008c4720e

Copy link

codecov bot commented Dec 12, 2024

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
22702 7 22695 4186
View the full list of 3 ❄️ flaky tests
tests.datasource.fluent.test_pandas_datasource::test_cloud_get_csv_asset_not_in_memory

Flake rate in main: 71.43% (Passed 2 times, Failed 5 times)

Stack Traces | 1.73s run time
self = <great_expectations.data_context.store.gx_cloud_store_backend.GXCloudStoreBackend object at 0x7f4b563fcd00>
id = '3d716eea-e199-41a8-b5f4-22c535f7df76'
value = {'assets': [{'filepath_or_buffer': '.../tests/test_sets/taxi_yello..., 'type': 'csv'}], 'id': '3d716eea-e199-41a8-b5f4-22c535f7df76', 'name': 'default_pandas_datasource', 'type': 'pandas'}

    def _put(self, id: str, value: Any) -> GXCloudResourceRef | bool:
        # This wonky signature is a sign that our abstractions are not helping us.
        # The cloud backend returns a bool for some resources, and the updated
        # resource for others. Since we route all update calls through this single
        # method, we need to handle both cases.
    
        resource_type = self.ge_cloud_resource_type
        organization_id = self.ge_cloud_credentials["organization_id"]
        attributes_key = self.PAYLOAD_ATTRIBUTES_KEYS[resource_type]
    
        data = self.construct_versioned_payload(
            resource_type=resource_type.value,
            attributes_key=attributes_key,
            attributes_value=value,
            organization_id=organization_id,
            resource_id=id or None,  # filter out empty string
        )
    
        url = self.construct_versioned_url(
            base_url=self.ge_cloud_base_url,
            organization_id=organization_id,
            resource_name=self.ge_cloud_resource_name,
        )
    
        if id:
            url = urljoin(f"{url}/", id)
    
        try:
            response = self._session.put(url, json=data)
            response_status_code = response.status_code
    
            # 2022-07-28 - Chetan - GX Cloud does not currently support PUT requests
            # for the ExpectationSuite endpoint. As such, this is a temporary fork to
            # ensure that legacy PATCH behavior is supported.
            if (
                response_status_code == 405  # noqa: PLR2004
                and resource_type is GXCloudRESTResource.EXPECTATION_SUITE
            ):
                response = self._session.patch(url, json=data)
                response_status_code = response.status_code
    
>           response.raise_for_status()

.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/gx_cloud_store_backend.py:298: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""
    
        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason
    
        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )
    
        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )
    
        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:.../0ccac18e-7631-4bdd-8a42-3c35cce574c6/datasources/3d716eea-e199-41a8-b5f4-22c535f7df76

.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../site-packages/requests/models.py:1024: HTTPError

The above exception was the direct cause of the following exception:

valid_file_path = PosixPath('.../test_sets/taxi_yellow_tripdata_samples/yellow_tripdata_sample_2018-03.csv')

    @pytest.mark.cloud
    def test_cloud_get_csv_asset_not_in_memory(valid_file_path: pathlib.Path):
        # this test runs end-to-end in a real Cloud Data Context
        context = gx.get_context(mode="cloud")
        csv_asset_name = f"DA_{uuid.uuid4().hex}"
        datasource = context.data_sources.pandas_default
>       _ = datasource.add_csv_asset(
            name=csv_asset_name,
            filepath_or_buffer=valid_file_path,
        )

.../datasource/fluent/test_pandas_datasource.py:480: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../datasource/fluent/pandas_datasource.py:785: in add_csv_asset
    return self._add_asset(asset=asset)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../datasource/fluent/pandas_datasource.py:603: in _add_asset
    return super()._add_asset(asset=asset, connect_options=connect_options)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../datasource/fluent/interfaces.py:871: in _add_asset
    updated_datasource = self._data_context._update_fluent_datasource(datasource=self)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/data_context/abstract_data_context.py:595: in _update_fluent_datasource
    updated_datasource = self.data_sources.all().set_datasource(
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../great_expectations/datasource/datasource_dict.py:84: in set_datasource
    datasource = self._datasource_store.set(key=None, value=config)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/datasource_store.py:221: in set
    return self._persist_datasource(key=key, config=value)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/datasource_store.py:228: in _persist_datasource
    ref: Optional[Union[bool, GXCloudResourceRef]] = super().set(key=key, value=config)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/store.py:293: in set
    return self._store_backend.set(self.key_to_tuple(key), self.serialize(value), **kwargs)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/_store_backend.py:132: in set
    return self._set(key, value, **kwargs)
.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/gx_cloud_store_backend.py:363: in _set
    return self._put(id=id, value=value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <great_expectations.data_context.store.gx_cloud_store_backend.GXCloudStoreBackend object at 0x7f4b563fcd00>
id = '3d716eea-e199-41a8-b5f4-22c535f7df76'
value = {'assets': [{'filepath_or_buffer': '.../tests/test_sets/taxi_yello..., 'type': 'csv'}], 'id': '3d716eea-e199-41a8-b5f4-22c535f7df76', 'name': 'default_pandas_datasource', 'type': 'pandas'}

    def _put(self, id: str, value: Any) -> GXCloudResourceRef | bool:
        # This wonky signature is a sign that our abstractions are not helping us.
        # The cloud backend returns a bool for some resources, and the updated
        # resource for others. Since we route all update calls through this single
        # method, we need to handle both cases.
    
        resource_type = self.ge_cloud_resource_type
        organization_id = self.ge_cloud_credentials["organization_id"]
        attributes_key = self.PAYLOAD_ATTRIBUTES_KEYS[resource_type]
    
        data = self.construct_versioned_payload(
            resource_type=resource_type.value,
            attributes_key=attributes_key,
            attributes_value=value,
            organization_id=organization_id,
            resource_id=id or None,  # filter out empty string
        )
    
        url = self.construct_versioned_url(
            base_url=self.ge_cloud_base_url,
            organization_id=organization_id,
            resource_name=self.ge_cloud_resource_name,
        )
    
        if id:
            url = urljoin(f"{url}/", id)
    
        try:
            response = self._session.put(url, json=data)
            response_status_code = response.status_code
    
            # 2022-07-28 - Chetan - GX Cloud does not currently support PUT requests
            # for the ExpectationSuite endpoint. As such, this is a temporary fork to
            # ensure that legacy PATCH behavior is supported.
            if (
                response_status_code == 405  # noqa: PLR2004
                and resource_type is GXCloudRESTResource.EXPECTATION_SUITE
            ):
                response = self._session.patch(url, json=data)
                response_status_code = response.status_code
    
            response.raise_for_status()
    
            HTTP_NO_CONTENT = 204
            if response_status_code == HTTP_NO_CONTENT:
                # endpoint has returned NO_CONTENT, so the caller expects a boolean
                return True
            else:
                # expect that there's a JSON payload associated with this response
                response_json = response.json()
                return GXCloudResourceRef(
                    resource_type=resource_type,
                    id=id,
                    url=url,
                    response_json=response_json,
                )
    
        except requests.HTTPError as http_exc:
>           raise StoreBackendError(  # noqa: TRY003
                f"Unable to update object in GX Cloud Store Backend: {get_user_friendly_error_message(http_exc)}"  # noqa: E501
            ) from http_exc
E           great_expectations.exceptions.exceptions.StoreBackendError: Unable to update object in GX Cloud Store Backend: Please contact the Great Expectations team at support@greatexpectations.io

.../hostedtoolcache/Python/3.9.20......................................./x64/lib/python3.9.../data_context/store/gx_cloud_store_backend.py:315: StoreBackendError
tests.integration.cloud.end_to_end.test_pandas_filesystem_datasource::test_checkpoint_run[parquet_batch_definition]

Flake rate in main: 71.43% (Passed 2 times, Failed 5 times)

Stack Traces | 4.89s run time
No failure message available
tests.integration.cloud.end_to_end.test_pandas_filesystem_datasource::test_checkpoint_run[csv_batch_definition]

Flake rate in main: 71.43% (Passed 2 times, Failed 5 times)

Stack Traces | 6.78s run time
No failure message available

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant