-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Seems we have python worker are not putting the 'Express Load completed' log and worker pid crashes in Master.
More investigation required. This does not affect 2.11.x
2025-05-30 20:37:17,657 INFO [ckan.config.environment] Loading templates from /srv/app/src/ckan/ckan/templates
ckanext/xloader/tests/test_action.py ......... [ 8%]
ckanext/xloader/tests/test_jobs.py FFFFFFF...F [ 18%]
ckanext/xloader/tests/test_loader.py ..ss...............s....ss......... [ 50%]
. [ 51%]
ckanext/xloader/tests/test_parser.py .... [ 55%]
ckanext/xloader/tests/test_plugin.py ........... [ 65%]
ckanext/xloader/tests/test_utils.py .................................... [ 99%]
. [100%]
=================================== FAILURES ===================================
_______________ TestXLoaderJobs.test_xloader_data_into_datastore _______________
self = <ckanext.xloader.tests.test_jobs.TestXLoaderJobs object at 0x7f91831ba1d0>
cli = <ckan.tests.helpers.CKANCliRunner object at 0x7f91831b7df0>
data = {'api_key': '***': 'ca4295f6-2222-4c7f-91f0-1afbec467b57', ...}, 'result_url': 'http://localhost:5000/api/3/action/xloader_hook'}
def test_xloader_data_into_datastore(self, cli, data):
self.enqueue(jobs.xloader_data_into_datastore, [data])
with mock.patch("ckanext.xloader.jobs.get_response", get_response):
stdout = cli.invoke(ckan, ["jobs", "worker", "--burst"]).output
assert "File hash: d44fa65eda3675e11710682fdb5f1648" in stdout
assert "Fields: [{'id': 'x', 'type': 'text', 'strip_extra_white': True}, {'id': 'y', 'type': 'text', 'strip_extra_white': True}]" in stdout
assert "Copying to database..." in stdout
assert "Creating search index..." in stdout
> assert "Express Load completed" in stdout
Name Stmts Miss Cover
----------------------------------------------------------
ckanext/xloader/__init__.py 0 0 100%
ckanext/xloader/action.py 151 50 67%
ckanext/xloader/auth.py 10 2 80%
ckanext/xloader/cli.py 40 23 42%
ckanext/xloader/command.py 91 78 14%
ckanext/xloader/db.py 135 49 64%
ckanext/xloader/helpers.py 58 50 14%
ckanext/xloader/interfaces.py 6 2 67%
ckanext/xloader/job_exceptions.py 18 6 67%
ckanext/xloader/jobs.py 354 132 63%
ckanext/xloader/loader.py 350 48 86%
ckanext/xloader/parser.py 59 1 98%
ckanext/xloader/plugin.py 143 38 73%
ckanext/xloader/schema.py 18 0 100%
ckanext/xloader/tests/__init__.py 0 0 100%
ckanext/xloader/tests/ckan_setup.py 21 21 0%
ckanext/xloader/tests/fixtures.py 64 49 23%
ckanext/xloader/tests/test_action.py 64 2 97%
ckanext/xloader/tests/test_jobs.py 146 26 82%
ckanext/xloader/tests/test_loader.py 394 37 91%
ckanext/xloader/tests/test_parser.py 26 0 100%
ckanext/xloader/tests/test_plugin.py 65 3 95%
ckanext/xloader/tests/test_utils.py 21 0 100%
ckanext/xloader/utils.py 182 56 69%
ckanext/xloader/views.py 39 29 26%
----------------------------------------------------------
TOTAL 2455 702 71%
=========================== short test summary info ============================
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_xloader_data_into_datastore - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:24,749 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:25,731 INFO [ckan.lib.jobs] Worker rq:worker:2a0de08c151741e0a9f8771e93e138e0 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_download_resource_data_with_ckanext_xloader_site_url - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:26,350 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:27,281 INFO [ckan.lib.jobs] Worker rq:worker:8e9103ea35874bccbd6f72f2f6f40848 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_download_resource_data_with_ckan_site_url - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:27,930 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:28,850 INFO [ckan.lib.jobs] Worker rq:worker:a0550f4414b94b1fa9d473edfda1ae45 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_download_resource_data_with_different_original_url - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:29,468 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:30,389 INFO [ckan.lib.jobs] Worker rq:worker:10bde992909d4e96b5506ddf642cdfa0 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_callback_xloader_hook_with_ckanext_xloader_site_url - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:31,032 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:31,979 INFO [ckan.lib.jobs] Worker rq:worker:5f959ef0ea1e4b8d9d13f4f83596cdf5 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_callback_xloader_hook_with_ckan_site_url - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:32,596 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:33,521 INFO [ckan.lib.jobs] Worker rq:worker:1b0ded9f2f614b9983583288e647e846 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestXLoaderJobs::test_xloader_ignore_hash - AssertionError: assert 'Express Load completed' in '2025-05-30 20:37:34,215 INFO [ckan.cli] Using configuration file /__w/ckanext-xloader/ckanext-xloader/test.ini\n2025...025-05-30 20:37:35,146 INFO [ckan.lib.jobs] Worker rq:worker:09dc8eebeece4bb6899dfef7bea46f26 (PID 173) has stopped\n'
FAILED ckanext/xloader/tests/test_jobs.py::TestSetResourceMetadata::test_simple - AssertionError: both default and custom schema data must be passed
============== 8 failed, 95 passed, 5 skipped in 65.20s (0:01:05) ==============
Metadata
Metadata
Assignees
Labels
No labels