Environment
- Python version: 3.12
- Nautobot version: 3.0.4
- nautobot-ssot version: 4.1.0
Expected Behavior
DNA Center to Nautobot Job complete without issues.
Observed Behavior
Sync Job is failing with this error message:
{
"exc_message": [
"Date values must be in the format YYYY-MM-DD.",
null,
null
],
"exc_module": "django.core.exceptions",
"exc_type": "ValidationError"
}
Here is the tarceback
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 361, in clean
datetime.strptime(value, "%Y-%m-%d")
File "/usr/lib/python3.12/_strptime.py", line 554, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/_strptime.py", line 336, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: T07:33:53
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.12/site-packages/celery/app/trace.py", line 479, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/celery/app/trace.py", line 779, in protected_call
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/jobs.py", line 1312, in run_job
result = job(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/jobs.py", line 186, in call
return self.run(*args, **deserialized_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/dna_center/jobs.py", line 211, in run
super().run(dryrun=self.dryrun, memory_profiling=self.memory_profiling, *args, **kwargs)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 640, in run
self.sync_data(self.memory_profiling)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 476, in sync_data
self.execute_sync()
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 166, in execute_sync
self.source_adapter.sync_to(self.target_adapter, flags=self.diffsync_flags)
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/init.py", line 626, in sync_to
return target.sync_from(self, diff_class=diff_class, flags=flags, callback=callback, diff=diff)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/init.py", line 598, in sync_from
result = syncer.perform_sync()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 329, in perform_sync
changed |= self.sync_diff_element(element)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 379, in sync_diff_element
changed, modified_model = self.sync_model(src_model=src_model, dst_model=dst_model, ids=ids, attrs=attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 432, in sync_model
dst_model = dst_model.update(attrs=attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/dna_center/diffsync/models/nautobot.py", line 143, in update
metadata = add_or_update_metadata_on_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/metadata_utils.py", line 70, in add_or_update_metadata_on_object
metadata.value = datetime.now().isoformat(timespec="seconds")
^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 241, in value
self.clean()
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/plugins/validators.py", line 24, in wrapper
model_clean_func(model_instance)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 365, in clean
raise ValidationError("Date values must be in the format YYYY-MM-DD.")
django.core.exceptions.ValidationError: ['Date values must be in the format YYYY-MM-DD.']
Looks like it stops working with Nautobot upgrade to version 3.0
Steps to Reproduce
- run a job and wait for results.
Environment
Expected Behavior
DNA Center to Nautobot Job complete without issues.
Observed Behavior
Sync Job is failing with this error message:
{
"exc_message": [
"Date values must be in the format YYYY-MM-DD.",
null,
null
],
"exc_module": "django.core.exceptions",
"exc_type": "ValidationError"
}
Here is the tarceback
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 361, in clean
datetime.strptime(value, "%Y-%m-%d")
File "/usr/lib/python3.12/_strptime.py", line 554, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/_strptime.py", line 336, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: T07:33:53
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.12/site-packages/celery/app/trace.py", line 479, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/celery/app/trace.py", line 779, in protected_call
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/jobs.py", line 1312, in run_job
result = job(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/jobs.py", line 186, in call
return self.run(*args, **deserialized_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/dna_center/jobs.py", line 211, in run
super().run(dryrun=self.dryrun, memory_profiling=self.memory_profiling, *args, **kwargs)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 640, in run
self.sync_data(self.memory_profiling)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 476, in sync_data
self.execute_sync()
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/jobs/base.py", line 166, in execute_sync
self.source_adapter.sync_to(self.target_adapter, flags=self.diffsync_flags)
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/init.py", line 626, in sync_to
return target.sync_from(self, diff_class=diff_class, flags=flags, callback=callback, diff=diff)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/init.py", line 598, in sync_from
result = syncer.perform_sync()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 329, in perform_sync
changed |= self.sync_diff_element(element)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 379, in sync_diff_element
changed, modified_model = self.sync_model(src_model=src_model, dst_model=dst_model, ids=ids, attrs=attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/diffsync/helpers.py", line 432, in sync_model
dst_model = dst_model.update(attrs=attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/dna_center/diffsync/models/nautobot.py", line 143, in update
metadata = add_or_update_metadata_on_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot_ssot/integrations/metadata_utils.py", line 70, in add_or_update_metadata_on_object
metadata.value = datetime.now().isoformat(timespec="seconds")
^^^^^^^^^^^^^^
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 241, in value
self.clean()
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/plugins/validators.py", line 24, in wrapper
model_clean_func(model_instance)
File "/opt/nautobot/lib/python3.12/site-packages/nautobot/extras/models/metadata.py", line 365, in clean
raise ValidationError("Date values must be in the format YYYY-MM-DD.")
django.core.exceptions.ValidationError: ['Date values must be in the format YYYY-MM-DD.']
Looks like it stops working with Nautobot upgrade to version 3.0
Steps to Reproduce