Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular interfaces cause ExampleDataSource job to fail #525

Open
gsnider2195 opened this issue Aug 26, 2024 · 0 comments
Open

Modular interfaces cause ExampleDataSource job to fail #525

gsnider2195 opened this issue Aug 26, 2024 · 0 comments
Labels
integration: contrib Contrib related issues and PRs type: bug Issues/PRs addressing a bug.

Comments

@gsnider2195
Copy link
Contributor

Environment

  • Python version: v3.11
  • Nautobot version: v2.3.0
  • nautobot-ssot version: v3.0.1

Expected Behavior

Job succeeds

Observed Behavior

Job fails with

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 1136, in run_job
    result = job(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 149, in __call__
    return self.run(*args, **deserialized_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/source/nautobot_ssot/jobs/examples.py", line 875, in run
    super().run(dryrun, memory_profiling, *args, **kwargs)
  File "/source/nautobot_ssot/jobs/base.py", line 314, in run
    self.sync_data(memory_profiling)
  File "/source/nautobot_ssot/jobs/base.py", line 133, in sync_data
    self.load_source_adapter()
  File "/source/nautobot_ssot/jobs/examples.py", line 880, in load_source_adapter
    self.source_adapter.load()
  File "/source/nautobot_ssot/jobs/examples.py", line 503, in load
    self.load_interfaces()
  File "/source/nautobot_ssot/jobs/examples.py", line 694, in load_interfaces
    "name": interface["device"]["name"],
            ~~~~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Steps to Reproduce

  1. Run Example Data Source job against a Nautobot instance that contains modular interfaces (An interface with a null device)
@jdrew82 jdrew82 added type: bug Issues/PRs addressing a bug. integration: contrib Contrib related issues and PRs labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: contrib Contrib related issues and PRs type: bug Issues/PRs addressing a bug.
Projects
None yet
Development

No branches or pull requests

5 participants
@jdrew82 @gsnider2195 and others