Closed ghost closed 10 months ago
rollback to v2.0.1 works.
deleted last_synced_from_sor
and reran
Likely the use of CustomField.objects.get_or_create()
in create_custom_field needs to be adapted, perhaps something like:
custom_field, _ = CustomField.objects.get_or_create(
key=key,
type=CustomFieldTypeChoices.TYPE_TEXT,
defaults={"label": label},
)
so that a difference in label
doesn't result in trying to create a custom field instance with a duplicate key
.
Issue likely caused by one of the following scenarios
key
key
, verified there are no conflicts in this appI agree with @glennmatthews comment, but could lead to a split brain scenario with 2 apps publishing conflicting CustomFields with different definitions. There is a roadmap item to revisit publishing CustomFields with official apps for issues like this.
@justinjeffery-ipf Do you have any other SSoT Apps integrated into your Nautobot environment? Just trying to see if it is possible that we have another App potentially creating this CustomField before I try to implement the fix that @glennmatthews mentioned.
Nope maybe it was because I was testing a different branch now that I think of it?
It is quite possible if you had done an update or change to use a different branch that had the same CustomField could cause a conflict, yes.
Environment
Expected Behavior
nautobot-server post_upgrade
fails when upgrading ssot from 2.0.0 to 2.0.2Observed Behavior
Steps to Reproduce