Plugin Version
v0.8.3
NetBox Version
v4.4.5
Python Version
3.13
Steps to Reproduce
- setup to use S3 storage
- create and activate a branch 'b1'
- go to a site and add an image attachment and choose "Create and Add Another"
- add the same image again.
- go to merge the branch
Note this will create a duplicated image name in the ObjectChange due to NetBox issue: #21801.
The issue is at: https://github.com/netboxlabs/netbox-branching/blob/main/netbox_branching/models/changes.py#L58
if self.action == ObjectChangeActionChoices.ACTION_CREATE:
if hasattr(model, 'deserialize_object'):
...
except (FileNotFoundError) as e:
# If a file was deleted later in this branch it will fail here
# so we need to ignore it. We can assume the NetBox state is valid.
logger.warning(f'Ignoring missing file: {e}')
instance.save(using=using)
However S3 storage gives a different error than FileNotFound. - specifically
"Applying change 298402 using default (Extras | image attachment Install created by user(@site)",
"An error occurred (403) when calling the HeadObject operation: Forbidden"
The except should catch both errors from local file storage and the S3 Storages specific one.
Expected Behavior
The branch should merge successfully.
Observed Behavior
The branch cannot be merged.
Plugin Version
v0.8.3
NetBox Version
v4.4.5
Python Version
3.13
Steps to Reproduce
Note this will create a duplicated image name in the ObjectChange due to NetBox issue: #21801.
The issue is at: https://github.com/netboxlabs/netbox-branching/blob/main/netbox_branching/models/changes.py#L58
However S3 storage gives a different error than FileNotFound. - specifically
The except should catch both errors from local file storage and the S3 Storages specific one.
Expected Behavior
The branch should merge successfully.
Observed Behavior
The branch cannot be merged.