FileVar uploads collide with REST run parameters
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start at the REST run endpoint's multipart request handling and trace how uploaded file parts are separated from execution parameters. The report reproduces collisions for FileVar names commit and data; use its documented multipart requests to check both cases. Done means the endpoint accepts those uploads as variables, keeps run settings separate, and returns HTTP 201 with the file available to the Script.
索引モデルが issue の本文から書いたものです。
説明
Plugin Version
v0.0.1
NetBox Version
v4.7.3
Python Version
3.12
Steps to Reproduce
- Create a Script Project for uploaded files, upload the following Script, and activate its revision:
from netbox_scripts.scripts import FileVar, Script class TakesNamedFile(Script): commit = FileVar(label='Named file') def run(self, data, commit): return data['commit'].read().decode() - Create a small
notes.txtfile and request a run using the documented multipart format. Replace<id>with the Script's ID:printf 'hello\n' > notes.txt curl -i -sS -X POST \ -H "Authorization: Token $NETBOX_TOKEN" \ -F 'data={}' \ -F [email protected] \ 'https://netbox.example.com/api/plugins/netbox-scripts/scripts/<id>/run/'
Expected Behavior
The request returns HTTP 201 and queues the Script with the uploaded file in data['commit']. The file variable is kept separate from the run's commit setting.
The REST execution guide documents file parts named after their variables and separates variable values from execution parameters.
Observed Behavior
The request returns HTTP 400:
{"commit": ["Must be a valid boolean."]}
A FileVar named data, sent alongside the JSON data part, similarly returns:
{"data": ["Value must be valid JSON."]}
The endpoint reads the uploaded file as the top-level run parameter with the same name.
This affects request handling and is separate from the OpenAPI schema change in #16.
- 主要言語
- Python
- スター
- 8
- フォーク
- 0
- 平均マージ
- 11時間 22分
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netbox-community/netbox-scripts のほかの issue
-
app: scripts Bucket: Improve status: backlog type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
netbox-community/netbox-scripts#80 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts Bucket: KTLO severity: low status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
netbox-community/netbox-scripts#76 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Raise the minimum NetBox version to v4.7.5対応中かも @pheus が 1 日前に担当しました。 オープンapp: scripts Bucket: KTLO status: backlog type: housekeeping
netbox-community/netbox-scripts#123 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
A committed run is reported as unfinished when its events cannot be queued対応中かも @pheus が 1 日前に担当しました。 オープンapp: scripts Bucket: KTLO severity: low status: accepted type: bug
netbox-community/netbox-scripts#122 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Failed post-commit callback reports committed changes as reverted and drops events対応中かも @pheus が 1 日前に担当しました。 オープンapp: scripts Bucket: KTLO severity: low status: accepted type: bug
netbox-community/netbox-scripts#121 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
netbox-community/netbox-scripts の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NVIDIA/auto-ontology#463 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NousResearch/hermes-agent#151165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
code-health
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tinaudio/synth-setter#3750 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] vllm-sr config migrate drops providers.models[].deployment対応中かも @Bevisy が今日担当しました。 オープンneeds-acceptance wg/developer-experience-ecosystem
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
vllm-project/semantic-router#5996 ·
メンテナーはふだん 2 日以内に返信