-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Error when adding/editing secrets with webhooks for secrets enabled #5381
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
Comments
I'm not able to reproduce this on v2.9.10: Secrets are created with tags as expected. Additionally, the exception being reported makes no sense. Have you modified your NetBox code base in any way? If not, please post the entire stack trace (enable debugging by setting |
Running the stock docker image with
Stack trace:
|
Please note that all bug reports must be reproducible in an unmodified instance of the latest official release. The stack trace you posted indicates a problem with a webhook you've created, which was not mentioned in your original report. Disabling or correcting the webhook will likely resolve this issue. |
The webhook is valid and the error is triggered by creating or changing a secret with the webhook enabled. Deleting the secret works without errors and issues the webhook as expected. The webhook is as simple as you can define it, no headers or body. Same webhook is used on several object types for audit alerts, without issues (and works on delete events on secrets). I'll see if I can replicate on a virgin install. Updating title as it is misleading. |
Well, I've gotten as far as reproducing this. It might take some time to unpack exactly what's going on, though. @tyldum you've only seen this with secrets, correct? No other models? |
That is correct. |
No no, it should definitely work as-is. When you first reported that it was due to a webhook I figured it was due to some invalid template code, because the exception message didn't make any sense. And it still doesn't. |
Have we tried to disable caching to see if it is a caching related issue? |
Yeah, I've been testing it without caching enabled. Best I can tell it has something to do with the serializer for secrets, but I'm not sure what specifically is causing the exception. I did come across this very similar-looking bug but it seems to have been something related to SQLite. Still need to dig into this more. |
All I've been able to identify so far is that omitting the |
Closing this out as it will ultimately be addressed by #5278 in v2.12. |
Environment
Steps to Reproduce
secrets
Expected Behavior
No errors, return to list of secrets
Observed Behavior
Got an error:
The secret is stored without the tag.
Tags can be added afterwards without further issues.
(in light of the proposal to move this functionality into a plugin, I realize it might quickly become obsolete)
The text was updated successfully, but these errors were encountered: