Skip to content

Python traceback "No module named 'plan.service' after move from codecov/enterprise-api -> codecov/self-hosted-api  #17

@gojun077

Description

@gojun077

Hello Codecov,

My company previously used Codecov Enterprise v5 on-prem, but we are trying to migrate to the new self-hosted-{api,frontend,gateway,worker}:rolling images on Dockerhub. We are running Codecov v5 on k8s deployed with the helm templates from https://github.com/codecov/helm-charts/tree/main/codecov/templates

I edited the live deployment YAML manifests as a quick test, and self-hosted-{frontend,gateway,worker} are working great; however I'm getting the following Python traceback in the "api" pod logs after editing the deployment to use codecov/self-hosted-api:rolling instead of codecov/enterprise-api:v5.0.1:

api-6c5b455cd4-cx49f During handling of the above exception, another exception occurred:
api-6c5b455cd4-cx49f 
api-6c5b455cd4-cx49f Traceback (most recent call last):
api-6c5b455cd4-cx49f   File "gunicorn/workers/sync.py", line 136, in handle
api-6c5b455cd4-cx49f   File "gunicorn/workers/sync.py", line 179, in handle_request
api-6c5b455cd4-cx49f   File "django/core/handlers/wsgi.py", line 124, in __call__
api-6c5b455cd4-cx49f     response = self.get_response(request)
api-6c5b455cd4-cx49f   File "django/core/handlers/base.py", line 140, in get_response
api-6c5b455cd4-cx49f     response = self._middleware_chain(request)
api-6c5b455cd4-cx49f   File "django/core/handlers/exception.py", line 57, in inner
api-6c5b455cd4-cx49f     response = response_for_exception(request, exc)
api-6c5b455cd4-cx49f   File "django/core/handlers/exception.py", line 140, in response_for_exception
api-6c5b455cd4-cx49f     response = handle_uncaught_exception(
api-6c5b455cd4-cx49f   File "django/core/handlers/exception.py", line 184, in handle_uncaught_exception
api-6c5b455cd4-cx49f     callback = resolver.resolve_error_handler(500)
api-6c5b455cd4-cx49f   File "django/urls/resolvers.py", line 729, in resolve_error_handler
api-6c5b455cd4-cx49f     callback = getattr(self.urlconf_module, "handler%s" % view_type, None)
api-6c5b455cd4-cx49f   File "django/utils/functional.py", line 57, in __get__
api-6c5b455cd4-cx49f     res = instance.__dict__[self.name] = self.func(instance)
api-6c5b455cd4-cx49f   File "django/urls/resolvers.py", line 708, in urlconf_module
api-6c5b455cd4-cx49f     return import_module(self.urlconf_name)
api-6c5b455cd4-cx49f   File "importlib/__init__.py", line 127, in import_module
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap_external>", line 1181, in exec_module
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
api-6c5b455cd4-cx49f   File "codecov/urls.py", line 9, in init codecov.urls
api-6c5b455cd4-cx49f   File "django/urls/conf.py", line 38, in include
api-6c5b455cd4-cx49f     urlconf_module = import_module(urlconf_module)
api-6c5b455cd4-cx49f   File "importlib/__init__.py", line 127, in import_module
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap_external>", line 1181, in exec_module
api-6c5b455cd4-cx49f   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
api-6c5b455cd4-cx49f   File "billing/urls.py", line 3, in init billing.urls
api-6c5b455cd4-cx49f   File "billing/views.py", line 12, in init billing.views
api-6c5b455cd4-cx49f ModuleNotFoundError: No module named 'plan.service'

Could you recommend a workaround for this? Perhaps I could try a different tag instead of "rolling" for codecov/self-hosted-api...

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions