Skip to content
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

4.0.2 scripts can only be launched by api with ID and no longer with a name. #16145

Closed
MalfuncEddie opened this issue May 15, 2024 · 3 comments · Fixed by #16170
Closed

4.0.2 scripts can only be launched by api with ID and no longer with a name. #16145

MalfuncEddie opened this issue May 15, 2024 · 3 comments · Fixed by #16170
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@MalfuncEddie
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.0.2

Python Version

3.10

Steps to Reproduce

see #16123

In the past I could run the script with "https://netbox-test/api/extras/scripts/scriptA.class"
This does not work anymore and I need an ID ;(

Exception Value: | Field 'id' expected a number but got 'ProcessLogging'.

Expected Behavior

it works lik in 3.7.7

Observed Behavior

ValueError at /api/extras/scripts/ProcessLogging/

launching it with /api/extras/scripts/6/

Does work.

@MalfuncEddie MalfuncEddie added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels May 15, 2024
@jeffgdotorg
Copy link
Collaborator

Thanks for reporting a problem you've encountered in NetBox.

Although the OpenAPI schema does not indicate that scripts can be invoked by name, the 4.0.2 docs do provide an example in that style, so this feels like a regression against a documented behavior.

@jeffgdotorg jeffgdotorg removed their assignment May 15, 2024
@jeffgdotorg jeffgdotorg added severity: low Does not significantly disrupt application functionality, or a workaround is available status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels May 15, 2024
@MalfuncEddie
Copy link
Author

Hi,

Most definitely a regression. Problem is that you cannot change the id so if you delete the script and add it again it gets a new id and then you have to change all your endpoints that use it.

@arthanson arthanson self-assigned this May 16, 2024
@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label May 16, 2024
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label May 17, 2024
@MalfuncEddie
Copy link
Author

It works again!
You might not hear this enough but thank you for this fix and this great project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants