No changelogs entry for deleted tags #11434

Closed
opened 2025-12-29 21:45:12 +01:00 by adam · 5 comments
Owner

Originally created by @ederlf on GitHub (Aug 1, 2025).

Originally assigned to: @DanSheps on GitHub.

NetBox Version

v4.35

Python Version

3.12

Steps to Reproduce

Here are the curl api calls to reproduce:
(Assuming you have set a NETBOX_DEMO_TOKEN environment variable)

  1. Create Tag
curl -X POST "https://demo.netbox.dev/api/extras/tags/" \
  -H "Authorization: Token $NETBOX_DEMO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "test", "slug": "test"}'
  1. Add tag to interface
curl -X PATCH "https://demo.netbox.dev/api/dcim/interfaces/1/" \
  -H "Authorization: Token $NETBOX_DEMO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tags": [{"slug": "test"}]}'
  1. Remove tag from interface
curl -X PATCH "https://demo.netbox.dev/api/dcim/interfaces/1/" \
  -H "Authorization: Token $NETBOX_DEMO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tags": []}'

Expected Behavior

After executing the commands above, I'd expect two changelog entries for the target interface.
However there's is only a single change entry.

Image

The patch removal of the tag worked though, as it results in an interface without tags.

Observed Behavior

There should be two changelog entries.
One for the addition of the tag and another one for the removal.

Originally created by @ederlf on GitHub (Aug 1, 2025). Originally assigned to: @DanSheps on GitHub. ### NetBox Version v4.35 ### Python Version 3.12 ### Steps to Reproduce Here are the curl api calls to reproduce: (Assuming you have set a NETBOX_DEMO_TOKEN environment variable) 1. Create Tag ``` curl -X POST "https://demo.netbox.dev/api/extras/tags/" \ -H "Authorization: Token $NETBOX_DEMO_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "test", "slug": "test"}' ``` 2. Add tag to interface ``` curl -X PATCH "https://demo.netbox.dev/api/dcim/interfaces/1/" \ -H "Authorization: Token $NETBOX_DEMO_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tags": [{"slug": "test"}]}' ``` 3. Remove tag from interface ``` curl -X PATCH "https://demo.netbox.dev/api/dcim/interfaces/1/" \ -H "Authorization: Token $NETBOX_DEMO_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tags": []}' ``` ### Expected Behavior After executing the commands above, I'd expect two changelog entries for the target interface. However there's is only a single change entry. <img width="1734" height="314" alt="Image" src="https://github.com/user-attachments/assets/0347afce-bb11-4b98-a102-a7dc6cb9f22d" /> The patch removal of the tag worked though, as it results in an interface without tags. ### Observed Behavior There should be two changelog entries. One for the addition of the tag and another one for the removal.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:45:12 +01:00
adam closed this issue 2025-12-29 21:45:12 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 1, 2025):

Hello,

We require the raw API query to generate the results, not from tools like pynetbox

@DanSheps commented on GitHub (Aug 1, 2025): Hello, We require the **raw** API query to generate the results, not from tools like pynetbox
Author
Owner

@ederlf commented on GitHub (Aug 1, 2025):

Hi,

I have updated the issue with the API calls. The problem still reproduces.

@ederlf commented on GitHub (Aug 1, 2025): Hi, I have updated the issue with the API calls. The problem still reproduces.
Author
Owner

@DanSheps commented on GitHub (Aug 5, 2025):

This happens with pretty much any model that clears the tags.

@DanSheps commented on GitHub (Aug 5, 2025): This happens with pretty much any model that clears the tags.
Author
Owner

@fatred commented on GitHub (Sep 23, 2025):

As discussed over in NAF slack with Mark, we just hit this bug in 4.0.8, because we rely heavily on tags for integration with other workflows. The most painful example was our ACL rendering with aerleon, which uses tags to bring things into object lists, and assigning ACLs to interfaces.

We use the terraform provider to manage object creation which of course uses the API to interact with netbox. Some of these tags are then being removed, and not put back. This is not the fault of this bug, but the missing changelog entries mean we blind to diagnosing that, and waste significant time proving that this was the case.

We have already been qualifying 4.1.11 with the aim to get access to branching, and its taken us a significant time to complete all the testing we need, because we rely on netbox for many things.

There are a lot of changelogs there to track between 4.1.11 and 4.3.6, and i fear it would take significant time to solve this testing before we can avoid this bug.

Is there any way to see this backported to a new 4.0 release?

@fatred commented on GitHub (Sep 23, 2025): As discussed over in NAF slack with Mark, we just hit this bug in 4.0.8, because we rely heavily on tags for integration with other workflows. The most painful example was our ACL rendering with aerleon, which uses tags to bring _things_ into object lists, and assigning ACLs to interfaces. We use the terraform provider to manage object creation which of course uses the API to interact with netbox. Some of these tags are then being removed, and not put back. This is not the fault of this bug, but the missing changelog entries mean we blind to diagnosing that, and waste significant time proving that this was the case. We have already been qualifying 4.1.11 with the aim to get access to branching, and its taken us a significant time to complete all the testing we need, because we rely on netbox for many things. There are a lot of changelogs there to track between 4.1.11 and 4.3.6, and i fear it would take significant time to solve this testing before we can avoid this bug. Is there any way to see this backported to a new 4.0 release?
Author
Owner

@jeremystretch commented on GitHub (Sep 29, 2025):

@fatred I'm afraid we don't publish patch releases for prior minor versions of the community edition of NetBox. However, as NetBox is open source you are absolutely free to adapt the patch from PR #20026 to your current installation. You would only need to maintain this fork until you're able to upgrade to v4.3.6 or later.

@jeremystretch commented on GitHub (Sep 29, 2025): @fatred I'm afraid we don't publish patch releases for prior minor versions of the community edition of NetBox. However, as NetBox is open source you are absolutely free to adapt the patch from PR #20026 to your current installation. You would only need to maintain this fork until you're able to upgrade to v4.3.6 or later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11434