Skip to content

Job registry

Job registry #197

Triggered via pull request August 28, 2024 13:14
Status Failure
Total duration 2m 16s
Artifacts

tests.yml

on: pull_request
Matrix: Tests / Tests
Fit to window
Zoom out
Zoom in

Annotations

10 errors
Tests / Tests (3.9, postgresql14, opensearch2): tests/resources/test_resources.py#L132
test_simple_flow AssertionError: assert {'args': {'ty...1b9e2eb', ...} == {'args': {'ar...1b9e2eb', ...} Omitting 14 identical items, use -vv to show Differing items: {'args': {'type': 'custom'}} != {'args': {'args': {}, 'type': 'custom'}} Full diff: { - 'args': {'args': {}, 'type': 'custom'}, ? ------------ + 'args': {'type': 'custom'}, 'created': '2024-08-28T13:16:52.515973+00:00', 'finished_at': None, 'id': '1fed3a3d-e279-438f-8394-24ea11b9e2eb', 'job_id': '3fdce505-314f-4f08-9c7f-4e1b9357c368', 'links': {'logs': 'https://127.0.0.1:5000/api/jobs/3fdce505-314f-4f08-9c7f-4e1b9357c368/runs/1fed3a3d-e279-438f-8394-24ea11b9e2eb/logs', 'self': 'https://127.0.0.1:5000/api/jobs/3fdce505-314f-4f08-9c7f-4e1b9357c368/runs/1fed3a3d-e279-438f-8394-24ea11b9e2eb', 'stop': 'https://127.0.0.1:5000/api/jobs/3fdce505-314f-4f08-9c7f-4e1b9357c368/runs/1fed3a3d-e279-438f-8394-24ea11b9e2eb/actions/stop'}, 'message': None, 'queue': 'celery', 'started_at': None, 'started_by': {'id': '1', 'identities': {}, 'is_current_user': True, 'links': {}, 'profile': {'affiliations': 'CERN', 'full_name': 'User'}, 'type': 'user', 'username': 'user'}, 'started_by_id': 1, 'status': 'QUEUED', 'task_id': 'bab7f914-12f3-454a-84fe-9f56100056cd', 'title': 'Manually triggered run', 'updated': '2024-08-28T13:16:52.515977+00:00', }
Tests / Tests (3.9, postgresql14, opensearch2): invenio_jobs/models.py#L1
Black format check --- /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/models.py 2024-08-28 13:15:08.446285+00:00 +++ /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/models.py 2024-08-28 13:16:54.956244+00:00 @@ -160,11 +160,13 @@ that the Jinja template context only includes "safe" values, i.e. no DB model classes or Python objects or functions. Otherwise, we risk that users could execute arbitrary code, or perform harmful DB operations (e.g. delete rows). """ if task_arguments: - args = Task.get(job.task).build_task_arguments(job_obj=job, **task_arguments) + args = Task.get(job.task).build_task_arguments( + job_obj=job, **task_arguments + ) else: args = deepcopy(job.default_args) args = json.dumps(args, indent=4, sort_keys=True, default=str) args = json.loads(args) return args @@ -210,6 +212,5 @@ @classmethod def get(cls, id_): """Get registered task by id.""" return cls(current_jobs.registry.get(id_)) -
Tests / Tests (3.9, postgresql14, opensearch2): invenio_jobs/services/schema.py#L1
isort-check from invenio_i18n import lazy_gettext as _ from invenio_users_resources.services import schemas as user_schemas -from marshmallow import EXCLUDE, Schema, fields, post_load, pre_dump, types, validate, \ - pre_load +from marshmallow import ( + EXCLUDE, + Schema, + fields, + post_load, + pre_dump, + pre_load, + types, + validate, +) from marshmallow_oneofschema import OneOfSchema from marshmallow_utils.fields import SanitizedUnicode, TZDateTime from marshmallow_utils.permissions import FieldPermissionsMixin
Tests / Tests (3.9, postgresql14, opensearch2): invenio_jobs/services/schema.py#L1
Black format check --- /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/services/schema.py 2024-08-28 13:15:08.446285+00:00 +++ /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/services/schema.py 2024-08-28 13:17:01.006593+00:00 @@ -12,12 +12,20 @@ from copy import deepcopy from datetime import timezone from invenio_i18n import lazy_gettext as _ from invenio_users_resources.services import schemas as user_schemas -from marshmallow import EXCLUDE, Schema, fields, post_load, pre_dump, types, validate, \ - pre_load +from marshmallow import ( + EXCLUDE, + Schema, + fields, + post_load, + pre_dump, + types, + validate, + pre_load, +) from marshmallow_oneofschema import OneOfSchema from marshmallow_utils.fields import SanitizedUnicode, TZDateTime from marshmallow_utils.permissions import FieldPermissionsMixin from marshmallow_utils.validators import LazyOneOf
Tests / Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
Tests / Tests (3.12, postgresql14, opensearch2): tests/resources/test_resources.py#L132
test_simple_flow AssertionError: assert {'args': {'ty...019023e', ...} == {'args': {'ar...019023e', ...} Omitting 14 identical items, use -vv to show Differing items: {'args': {'type': 'custom'}} != {'args': {'args': {}, 'type': 'custom'}} Full diff: { - 'args': {'args': {}, 'type': 'custom'}, ? ------------ + 'args': {'type': 'custom'}, 'created': '2024-08-28T13:16:52.384628+00:00', 'finished_at': None, 'id': '32ed4637-d57d-4e66-9df6-41c3f019023e', 'job_id': '41d0350e-8003-44c4-b632-05b98ae3786d', 'links': {'logs': 'https://127.0.0.1:5000/api/jobs/41d0350e-8003-44c4-b632-05b98ae3786d/runs/32ed4637-d57d-4e66-9df6-41c3f019023e/logs', 'self': 'https://127.0.0.1:5000/api/jobs/41d0350e-8003-44c4-b632-05b98ae3786d/runs/32ed4637-d57d-4e66-9df6-41c3f019023e', 'stop': 'https://127.0.0.1:5000/api/jobs/41d0350e-8003-44c4-b632-05b98ae3786d/runs/32ed4637-d57d-4e66-9df6-41c3f019023e/actions/stop'}, 'message': None, 'queue': 'celery', 'started_at': None, 'started_by': {'id': '1', 'identities': {}, 'is_current_user': True, 'links': {}, 'profile': {'affiliations': 'CERN', 'full_name': 'User'}, 'type': 'user', 'username': 'user'}, 'started_by_id': 1, 'status': 'QUEUED', 'task_id': 'f2358442-dde4-4d30-9188-5dc7d94b35f7', 'title': 'Manually triggered run', 'updated': '2024-08-28T13:16:52.384635+00:00', }
Tests / Tests (3.12, postgresql14, opensearch2): invenio_jobs/models.py#L1
Black format check --- /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/models.py 2024-08-28 13:15:08.245471+00:00 +++ /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/models.py 2024-08-28 13:16:55.905833+00:00 @@ -160,11 +160,13 @@ that the Jinja template context only includes "safe" values, i.e. no DB model classes or Python objects or functions. Otherwise, we risk that users could execute arbitrary code, or perform harmful DB operations (e.g. delete rows). """ if task_arguments: - args = Task.get(job.task).build_task_arguments(job_obj=job, **task_arguments) + args = Task.get(job.task).build_task_arguments( + job_obj=job, **task_arguments + ) else: args = deepcopy(job.default_args) args = json.dumps(args, indent=4, sort_keys=True, default=str) args = json.loads(args) return args @@ -210,6 +212,5 @@ @classmethod def get(cls, id_): """Get registered task by id.""" return cls(current_jobs.registry.get(id_)) -
Tests / Tests (3.12, postgresql14, opensearch2): invenio_jobs/services/schema.py#L1
isort-check from invenio_i18n import lazy_gettext as _ from invenio_users_resources.services import schemas as user_schemas -from marshmallow import EXCLUDE, Schema, fields, post_load, pre_dump, types, validate, \ - pre_load +from marshmallow import ( + EXCLUDE, + Schema, + fields, + post_load, + pre_dump, + pre_load, + types, + validate, +) from marshmallow_oneofschema import OneOfSchema from marshmallow_utils.fields import SanitizedUnicode, TZDateTime from marshmallow_utils.permissions import FieldPermissionsMixin
Tests / Tests (3.12, postgresql14, opensearch2): invenio_jobs/services/schema.py#L1
Black format check --- /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/services/schema.py 2024-08-28 13:15:08.245471+00:00 +++ /home/runner/work/invenio-jobs/invenio-jobs/invenio_jobs/services/schema.py 2024-08-28 13:17:05.730273+00:00 @@ -12,12 +12,20 @@ from copy import deepcopy from datetime import timezone from invenio_i18n import lazy_gettext as _ from invenio_users_resources.services import schemas as user_schemas -from marshmallow import EXCLUDE, Schema, fields, post_load, pre_dump, types, validate, \ - pre_load +from marshmallow import ( + EXCLUDE, + Schema, + fields, + post_load, + pre_dump, + types, + validate, + pre_load, +) from marshmallow_oneofschema import OneOfSchema from marshmallow_utils.fields import SanitizedUnicode, TZDateTime from marshmallow_utils.permissions import FieldPermissionsMixin from marshmallow_utils.validators import LazyOneOf
Tests / Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.