A built-in run cancelled by migration cutover can still execute
Maintainers usually reply within 1 day
@pheus is already working on this.
Since Oct 23, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Reproduce the race through Customization > Scripts and Scripts > Migration with one RQ worker, following the linked migration guide's worker arrangement. Observe the queued task across cancellation, cutover, and repointing, including a recurring run. Done means a cancelled built-in run does not execute, its eligible replacement runs once through the plugin, and no later built-in occurrence survives the completed cutover.
Written by the indexing model from the issue text.
Description
Plugin Version
v0.0.1
NetBox Version
v4.7.1
Python Version
3.12
Steps to Reproduce
- Under Customization > Scripts, schedule a built-in Custom Script to run a few minutes ahead. Use a recurring run to observe the scheduling effects as well.
- Under Scripts > Migration, run inventory and Stage Projects, then wait for valid revisions. Keep one RQ worker running.
- Select Enter cutover so cancellation overlaps the scheduler queueing the now-due run. This is a timing race. With Accept concurrent workers selected, a second worker taking the run just before cancellation can produce the same result.
- Run Activate Projects, then Repoint references.
Expected Behavior
A run reported as cancelled does not execute on the built-in side. Its eligible replacement executes once through the plugin.
Observed Behavior
The built-in Script executes despite the cancellation. Its Job changes from Failed back to Running. If it starts after repointing has recreated the run, both versions execute.
A recurring run also queues another built-in occurrence. The Jobs page may associate that occurrence with the replacement Script even though it still executes the built-in Script. The completed cutover does not cancel it, so the built-in schedule continues and cleanup retains its module.
NetBox starts the Job from the queued task's copy without checking the intervening cancellation. The migration guide describes the scheduler window.
- 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
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishablePossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mozilla/code-review#3794 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Update docs that still describe the security registry as emptyPossibly taken @github-actions claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] adb backup script reports "Done" & exits 0 when the backup failsPossibly taken @bhattmanthan claimed this today. Openrequest-issue-assignment
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OWASP/mastg#4034 · 5 comments ·
Maintainers usually reply within 1 day
-
agent-ui bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
correction metadata
Difficulty 1/5 Under an hour Newbie friendliness 72/100
acl-org/acl-anthology#10768 · 1 comment ·
Maintainers usually reply within 1 day