Multipart runs ignore the Script's default when commit is omitted
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu tại điểm vào chạy script của REST API và theo dõi cách dữ liệu biểu mẫu multipart được chuyển đổi thành các tham số chạy của Script; so sánh với đường xử lý yêu cầu JSON. Tái hiện bằng script CommitProbe được cung cấp và một yêu cầu multipart bỏ qua commit. Hoàn thành khi lần chạy multipart sử dụng giá trị mặc định đang bật của Script và giữ lại tag đã tạo; kiểm tra nhật ký Job và danh sách Tags.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 8
- Fork
- 0
- Merge trung bình
- 11 giờ 23 phút
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của netbox-community/netbox-scripts
-
app: scripts severity: low status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
netbox-community/netbox-scripts#94 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: medium status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
netbox-community/netbox-scripts#83 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts status: backlog type: documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
netbox-community/netbox-scripts#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: medium status: backlog type: bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
netbox-community/netbox-scripts#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: medium status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
netbox-community/netbox-scripts#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của netbox-community/netbox-scripts
Issue tương tự
-
good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
ANCORATE/EncryptHome#8 ·
-
PluginProvider.storeInstance races and clobbers the dedup cache for concurrent loadsCó thể đã có người làm @Wilson0511 đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug: failed Together chat calls do not record operation duration or error.typeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
community documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100