netbox-lifecycle icon indicating copy to clipboard operation
netbox-lifecycle copied to clipboard

Upgrade of NetBox v4.3.0 Fails with NetBox Lifecycle Plugin

Open jonzey0 opened this issue 7 months ago • 2 comments

Plugin version

v1.1.5

NetBox version

v4.3.0

Python version

3.9

Steps to Reproduce

  1. Existing NetBox instance running and working with NetBox-Lifecycle Plugin v1.1.5 installed on v4.2.9
  2. Standard Upgrade Process Followed using ./upgrade.sh script
  3. Upgrade fails returning error on supported version

Expected Behavior

Upgrade successfully complete. Suspect it's a hard coded version parameter in the plugin somewhere.

Observed Behavior

Following errors seen during Upgrade Process. Key item highlighted below

/opt/netbox-4.3.0/netbox/netbox/settings.py:849: UserWarning: Unable to load plugin netbox_lifecycle: Plugin netbox_lifecycle requires NetBox maximum version 4.2.99 (current: 4.3.0).

Successfully installed django-polymorphic-3.1.0 drf_extra_fields-3.7.0 filetype-1.2.0 netbox-documents-0.7.2 netbox-inventory-2.3.0 netbox-lifecycle-1.1.5 netbox-reorder-rack-1.1.3
Applying database migrations (python3 netbox/manage.py migrate)...
/opt/netbox-4.3.0/netbox/netbox/settings.py:849: UserWarning: Unable to load plugin netbox_lifecycle: Plugin netbox_lifecycle requires NetBox maximum version 4.2.99 (current: 4.3.0).
  warnings.warn(f'Unable to load plugin {plugin_name}: {e}')
Traceback (most recent call last):
  File "/opt/netbox-4.3.0/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/netbox_inventory/__init__.py", line 36, in ready
    super().ready()
  File "/opt/netbox-4.3.0/netbox/netbox/plugins/__init__.py", line 129, in ready
    if graphql_schema := self._load_resource('graphql_schema'):
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox-4.3.0/netbox/netbox/plugins/__init__.py", line 95, in _load_resource
    module = import_module(default_module)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/netbox_inventory/graphql/__init__.py", line 1, in <module>
    from .schema import (
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/netbox_inventory/graphql/schema.py", line 12, in <module>
    from .types import (
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/netbox_inventory/graphql/types.py", line 17, in <module>
    from .filters import (
  File "/opt/netbox-4.3.0/venv/lib64/python3.12/site-packages/netbox_inventory/graphql/filters.py", line 3, in <module>
    from netbox.graphql.filter_mixins import autotype_decorator, BaseFilterMixin
ImportError: cannot import name 'autotype_decorator' from 'netbox.graphql.filter_mixins' (/opt/netbox-4.3.0/netbox/netbox/graphql/filter_mixins.py)```

Disabling the plugin allowed the upgrade to complete. 

jonzey0 avatar May 02 '25 00:05 jonzey0

This is because of the recent GraphQL changes. I might remove GraphQL unless someone is specifically using it.

DanSheps avatar May 05 '25 19:05 DanSheps

This is because of the recent GraphQL changes. I might remove GraphQL unless someone is specifically using it.

This would only apply to API calls into the plugin, correct?

pwinkeler avatar May 09 '25 16:05 pwinkeler