Repointing Job history hides unfinished built-in runs from migration checks

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

Maintainer thường phản hồi trong vòng 1 ngày

@pheus đang làm issue này rồi.

Từ ngày 6/11/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả 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 reading the migration steps and the Jobs verification and cleanup behavior described in the issue, then trace how Repoint references handles a scheduled Job that has not run yet. Check how the queued task retains its built-in Script association after the Job is repointed. Done means verification still identifies the unfinished built-in run and cleanup preserves the Script until that run is resolved.

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: accepted type: bug
Plugin Version

v0.0.1

NetBox Version

v4.7.4

Python Version

3.12

Steps to Reproduce
  1. On a test installation, upload a simple built-in Custom Script under Customization > Scripts.
  2. Under Scripts > Migration, complete the passes through Activate Projects, leaving Repoint references pending.
  3. As a superuser, schedule the built-in Script for the following day.
  4. Run Repoint references, then Verify.
  5. Run Clean up before the scheduled time, then let the run become due.

Step 3 deliberately submits a built-in run after cutover, outside the documented maintenance procedure. The issue is how migration treats that run once it exists.

Expected Behavior

The run remains identifiable as unfinished built-in work. Verification reports it, and cleanup preserves its built-in Script until the run is resolved.

Observed Behavior

Repoint references associates the Scheduled Job with the replacement Script. Verify's Jobs check then reports "No Job names the built-in feature", although the queued task still executes the built-in Script.

Clean up deletes the built-in module and marks the migration complete while the Job and its queued task remain. When the run becomes due, it ends Errored with DoesNotExist('Script matching query does not exist.').

If the run executes before cleanup instead, it runs the built-in Script, and its Job returns to the built-in association when execution starts.

Related to #4 and #99. Here, Repoint references moves an unfinished Job's association, so verification and cleanup no longer find it as built-in work. #4 covered how verification classifies Jobs that retain that association.
#99 concerns replaying a captured schedule after its deleted Job returns.

Also related: #1 and #65.

Ngôn ngữ chính
Python
Star
8
Fork
0
Merge trung bình
13 giờ 38 phút
Pull request đã merge (30 ngày)
50

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.