Ouranosinc/cowbird

[BUG] Error requesting the `/version` endpoint

Closed this issue · 0 comments

Describe the bug

Traceback:

cowbird            | [2023-03-22 14:54:08,170] INFO       [ThreadPoolExecutor-0_0][cowbird.utils] Request: [GET 10.0.2.15:443 /cowbird/version]
cowbird            | [2023-03-22 14:54:08,174] ERROR      [ThreadPoolExecutor-0_0][cowbird.api.generic] Request exception.
cowbird            | Traceback (most recent call last):
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/tweens.py", line 41, in excview_tween
cowbird            |     response = handler(request)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/router.py", line 148, in handle_request
cowbird            |     registry, request, context, context_iface, view_name
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/view.py", line 683, in _call_view
cowbird            |     response = view_callable(context, request)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/config/views.py", line 188, in attr_view
cowbird            |     return view(context, request)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/config/views.py", line 214, in predicate_wrapper
cowbird            |     return view(context, request)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/viewderivers.py", line 401, in viewresult_to_response
cowbird            |     result = view(context, request)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/pyramid/viewderivers.py", line 144, in _requestonly_view
cowbird            |     response = view(request)
cowbird            |   File "/opt/local/src/cowbird/cowbird/api/home/views.py", line 40, in get_version
cowbird            |     task = get_worker_version.delay()
cowbird            |   File "/usr/local/lib/python3.7/site-packages/celery/local.py", line 143, in __getattr__
cowbird            |     return getattr(self._get_current_object(), name)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/celery/local.py", line 105, in _get_current_object
cowbird            |     return loc(*self.__args, **self.__kwargs)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/celery/app/__init__.py", line 70, in task_by_cons
cowbird            |     name or app.gen_task_name(fun.__name__, fun.__module__)
cowbird            |   File "/usr/local/lib/python3.7/site-packages/celery/app/registry.py", line 18, in __missing__
cowbird            |     raise self.NotRegistered(key)
cowbird            | celery.exceptions.NotRegistered: 'cowbird.api.home.views.get_worker_version'

To Reproduce
Steps to reproduce the behavior:

  1. Run cowbird in birdhouse stack.
  2. Either login with Magpie admin or grant public access to Cowbird's /version endpoint.
  3. Request https://{PAVICS_FQDN_PUBLIC}/cowbird/version endpoint.

Expected behavior
JSON response with the service and worker versions returned successfully.

Details
Version: cowbird:1.1.0