Skip to content

Scripts issue post v4.0.2 upgrade #16218

Closed
@cruse1977

Description

@cruse1977

Deployment Type

Self-hosted

NetBox Version

4.0.2

Python Version

3.12

Steps to Reproduce

This bug occurs with a 3.7 -> 4.x upgrade and cannot be resolved without removing affected scripts. It only occurs when the upgrade occurs with missing scripts.

Replicate empty 'file' environment whereas DB has been restored but files NOT:

  • Create Script using git datastore
  • Manually remove file from netbox scripts dir ; breaking things and replicating an unsynced environment

Go to Script:

  • Expected: NetBox 3.7: 'error: missing file'.
  • Observed: Missing file

Run Upgrade to 4.0.2 - upgrade succeeds

Go to scripts -

  • expected: runnable (if data source has synced)
  • Observed: unable to run scripts, run button missing, clicking edit yields to empty form

Sync datasource (UI, or manage.py syncdatasource --all) manually

  • Expected: script recreated, script can run
  • Observed: no change in behaviour as above - also no files created in scripts/ directory

REPO used: https://github.com/cruse1977/test-scripts

Expected Behavior

  • Following a git sync scripts should become runnable and exist in the /script directory

Observed Behavior

  • following a git sync (successful), no change in behaviour; no runs button, no files created in /scripts; editting the script gives an empty form with no pre-populated items (ie: the data source). Manually copying the affected script to /scripts also does not resolve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    severity: mediumResults in substantial degraded or broken functionality for specfic workflowstype: bugA confirmed report of unexpected behavior in the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions