-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Stale reports remain in Netbox after modifying the Python code #14799
Comments
The same happens with scripts: if the class name is changed, then there are two scripts listed, but only the "current one" works. Just to be sure, on 3.7.1 as well:
--> Looks like the script classes are saved to some other memory as well, not just in the script files. |
Apparently restarting NetBox services after deleting the script helps: then only the correct class is shown in the list when the script is added again. |
@markkuleinio - This was one of the silent removals in 3.5 with the new script system. Pre-3.5 there was code present to ensure that the sys.modules cache was cleared on script load, however this code was removed. So I assume it's intentional not supporting reloading scripts without restarting netbox anymore. netbox/netbox/extras/scripts.py Lines 545 to 554 in 72767fb
|
No, this is not intentional, and you can very easily see that uploading new reports/scripts works without needing to restart any services. @kkthxbye-code since you've already tracked this down perhaps you'd like to put in a PR? |
Deployment Type
Self-hosted
NetBox Version
v3.7.0
Python Version
3.10
Steps to Reproduce
file:///etc/netbox/config/reports
UniquePrefixReport
classExpected Behavior
It should show only one report for
UniqueIPReport
Observed Behavior
It still shows both reports.
Trying to view the source results in an error.
/extras/reports/ip_duplicate/UniquePrefixReport/source/
The text was updated successfully, but these errors were encountered: