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

Update openeo_driver dependency and fix errors with get_log_entries #106

Closed
JohanKJSchreurs opened this issue Apr 13, 2023 · 1 comment
Closed
Assignees

Comments

@JohanKJSchreurs
Copy link
Contributor

Recently the openeo-python-driver was updated to support a minimum log level in the views and functions to retrieve batch jobs logs. Also the openeo-python-client and openeo-geopyspark-driver were updated for this change.
These changes were made to alleviate the problems in issue Open-EO/openeo-python-driver#170 .

However, this change in the python driver is causing some unit tests to fail in the aggregator because the back ends are getting a method argument they don't recognize.

The version of the dependency needs to be upgraded, and some changes will also need to be made in the aggregator to make it compatible.

One example of the relevant exception:

self = <openeo_driver.testing.ApiResponse object at 0x7ff1b311ea00>, status_code = 200

    def assert_status_code(self, status_code: int) -> 'ApiResponse':
        """Check HTTP status code"""
        if self.status_code != status_code:
            message = f"Expected response with status code {status_code} but got {self.status_code}."
            if self.status_code >= 400:
                message += f" Error: {self.json}"
>           raise ApiException(message)
E           openeo_driver.testing.ApiException: Expected response with status code 200 but got 500. Error: {'code': 'Internal', 'id': 'r-f532ca98d7734704a219d63c9c9e2355', 'message': 'Server error: TypeError("get_log_entries() got an unexpected keyword argument \'level\'")'}

venv/lib/python3.8/site-packages/openeo_driver/testing.py:119: ApiException

The list of failing tests from the pytest report:

================================================================================= short test summary info ==================================================================================
FAILED tests/test_views.py::TestBatchJobs::test_get_logs - openeo_driver.testing.ApiException: Expected response with status code 200 but got 500. Error: {'code': 'Internal', 'id': 'r-f532ca98d7734704a219d63c9c9e2355', 'message': 'Server erro...
FAILED tests/test_views.py::TestBatchJobs::test_get_logs_not_found_on_backend[th3j0b] - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-aeeb197b39014f1696607d6570cf226f', 'message': 'Server erro...
FAILED tests/test_views.py::TestBatchJobs::test_get_logs_not_found_on_backend[th-3j-0b] - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-878834ccb786447a957de7eb459ea922', 'message': 'Server erro...
FAILED tests/test_views.py::TestBatchJobs::test_get_logs_not_found_on_backend[th.3j.0b] - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-b603beda0c434d109da8f13ca9c893db', 'message': 'Server erro...
FAILED tests/test_views.py::TestBatchJobs::test_get_logs_not_found_on_backend[th~3j~0b] - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-ff9ef618d5fa4f599c4c83d8a6eed7c0', 'message': 'Server erro...
FAILED tests/test_views.py::TestBatchJobs::test_get_logs_not_found_on_aggregator - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-6b43758641e34abda4686d74a97b080c', 'message': 'Server erro...
FAILED tests/partitionedjobs/test_api.py::TestFlimsyBatchJobSplitting::test_get_logs - openeo_driver.testing.ApiException: Expected response with status code 200 but got 500. Error: {'code': 'Internal', 'id': 'r-613609735e11476188654d6b81a19253', 'message': 'Server erro...
FAILED tests/partitionedjobs/test_api.py::TestFlimsyBatchJobSplitting::test_get_logs_wrong_user - openeo_driver.testing.ApiException: Expected response with status code 404 but got 500. Error: {'code': 'Internal', 'id': 'r-00b807c6de474964a4c7b034771c9c36', 'message': 'Server erro...
======================================================================= 8 failed, 545 deselected, 1 warning in 1.35s =======================================================================

JohanKJSchreurs added a commit that referenced this issue Apr 13, 2023
- Update openeo_driver dependency from v0.38 to v0.40
- Update some functions to support level and fix errors raised by get_log_entries

#106
JohanKJSchreurs added a commit that referenced this issue Apr 13, 2023
@JohanKJSchreurs JohanKJSchreurs self-assigned this Apr 13, 2023
@soxofaan
Copy link
Member

thanks!

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

No branches or pull requests

2 participants