Multipart runs ignore the Script's default when commit is omitted
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start at the REST API script run entry point and trace how multipart form data is converted into the Script's run parameters, comparing it with the JSON request path. Reproduce with the provided CommitProbe script and a multipart request that omits commit. Done means the multipart run uses the Script's enabled default and keeps the created tag; check the Job log and Tags list.
Written by the indexing model from the issue text.
Description
Plugin Version
v0.0.1
NetBox Version
v4.7.3
Python Version
3.12
Steps to Reproduce
- Upload and activate the following
commit_probe.py. Leave the Script's commit override unset, and ensure no tag with the slugmultipart-commit-probeexists.from extras.models import Tag from netbox_scripts.scripts import Script class CommitProbe(Script): def run(self, data, commit): Tag.objects.create( name='Multipart commit probe', slug='multipart-commit-probe', ) - Request a multipart run without
commit, replacing12with the Script's ID:curl -sS -X POST \ -H "Authorization: Token $NETBOX_TOKEN" \ -F 'data={}' \ https://netbox.example.com/api/plugins/netbox-scripts/scripts/12/run/ - Wait for the returned Job to finish, then check its log and the Tags list.
Expected Behavior
The run uses the Script's effective commit default, which is enabled, and keeps the new tag. The execution guide documents this behavior when commit is omitted.
Observed Behavior
The Job records commit as false and completes as a dry run. The tag is absent, and the log contains:
Database changes have been reverted, this was a dry run.
The equivalent JSON request follows the Script's default. Adding -F 'commit=true' to the multipart request also keeps the tag.
This is separate from #16, which covers the multipart request schema.
- Dominant language
- Python
- Stars
- 8
- Forks
- 0
- Avg merge
- 11h 23m
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from netbox-community/netbox-scripts
-
app: scripts severity: low status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
netbox-community/netbox-scripts#94 ·
Maintainers usually reply within 1 day
-
app: scripts severity: medium status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
netbox-community/netbox-scripts#83 ·
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
netbox-community/netbox-scripts#80 ·
Maintainers usually reply within 1 day
-
app: scripts severity: medium status: backlog type: bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
netbox-community/netbox-scripts#79 ·
Maintainers usually reply within 1 day
-
app: scripts severity: medium status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
netbox-community/netbox-scripts#77 ·
Maintainers usually reply within 1 day
All issues in netbox-community/netbox-scripts
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
521xueweihan/HelloGitHub#4237 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jejjohnson/gaussx#721 ·
Maintainers usually reply within 1 day
-
mock-core-configs/etc/mock/rocky-10-riscv64.cfg contains the wrong architecture in config_opts['root']Possibly taken @jasonmontleon claimed this 4 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 94/100
rpm-software-management/mock#1834 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
elastic/elastic-otel-python#683 ·
Maintainers usually reply within 1 day
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retriesOpenfollow-up
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day