Cleanup completes migration while a retained module still has an unfinished built-in run
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
Start with _refusal_for() in netbox_scripts/migration/cleanup.py and trace how permanent history refusals are ordered relative to live_script_jobs. Reproduce the cleanup flow with a retained module that has a waiting or running built-in Job, including Jobs attached directly to the module. Done means cleanup reports the module as blocked and leaves the migration open in both cases.
Written by the indexing model from the issue text.
Description
Plugin Version
v0.0.1
NetBox Version
v4.7.3
Python Version
3.12
Steps to Reproduce
- Create a built-in module containing two Custom Scripts, synchronized from a Data Source.
- Run one Script to completion. Remove its class from the source and synchronize the same module, keeping its Job history and the other Script.
- Under Scripts > Migration, complete the passes through Repoint references.
- As a superuser, schedule the remaining built-in Script for the following day.
- Select Clean up.
Expected Behavior
Cleanup counts the module as blocked and leaves migration open while it has a waiting or running built-in Job, even when its historical Jobs require the module to be retained.
Observed Behavior
Cleanup counts the module as retained, reports no blocked modules, and marks the migration migrated. Its warning mentions only the removed class's Job history. The scheduled Job still refers to the remaining built-in Script and can execute it later.
The same problem occurs when Job history belongs directly to the module. On main (7b7cdf1), _refusal_for() in netbox_scripts/migration/cleanup.py returns these permanent history refusals before checking live_script_jobs. A retained module does not keep the migration open.
Related: #4 covers Verify reporting, and #14 covers cleanup recovery advice.
- 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
-
HandyModRTransform.deriv3 is wrong for m > 2Possibly taken @SajalDevX claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
read_messages: the first read after subscribe/psubscribe returns no messages even when some are waitingPossibly taken @matheussilvano claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
The-Swarm-Corporation/swarms-framework-docs#399 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bump patch
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#1321 ·
Maintainers usually reply within 1 day