Revision validation failure reasons expose internal exception details

Đang mở
#258 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing how revision validation and validation Job messages construct failure reasons; the issue does not name specific files or tests. Check the related issues #119, #139, and #237 for context. Done means user-facing failures use explicitly constructed messages without exception class names or raw exception details, while diagnostic information remains available in server logs.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

app: scripts Bucket: KTLO severity: low status: backlog type: bug
Plugin Version

v0.2.0

NetBox Version

v4.7.6

Python Version

3.12

Steps to Reproduce
  1. Create an upload-backed Script Project with deploy.py selected as a Script File.
  2. Upload deploy.py containing import netaddr.absent_submodule.
  3. Wait for the validation Job to finish.
  4. Retrieve the revision through /api/plugins/netbox-scripts/project-revisions/<revision_id>/ and inspect last_validation_failure.
Expected Behavior

The revision remains materialized and records a clear, actionable failure reason without exposing internal exception details.

The original exception is available in the server logs for troubleshooting. The same convention applies to the validation Job's user-facing messages.

Observed Behavior

The revision returns to materialized, but last_validation_failure contains the exception class name and its original message:

ScriptFileImportError: The script file "deploy.py" failed to import. No module named 'netaddr.absent_submodule'

Storage, cache, source corruption and timeout failures also expose exception class names or exception messages.

Failure reasons should consistently use explicitly constructed, user-facing messages while retaining useful diagnostic information.

Related: #119, #139 and #237.

Ngôn ngữ chính
Python
Star
9
Fork
0
Merge trung bình
18 giờ 59 phút
Pull request đã merge (30 ngày)
93

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của netbox-community/netbox-scripts

Tất cả issue của netbox-community/netbox-scripts

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.