Committed `runcustomscript` runs do not deliver Event Rule actions
维护者通常 1 天内回复
评估
调研方向
先定位 runcustomscript 构造 NetBoxFakeRequest 的位置,然后追踪 NetBox 如何为 Event Rule 操作复制该请求。检查命令的测试,并为触发 Event Rule 的已提交脚本添加覆盖。按照复现步骤中的描述,命令成功执行且匹配的操作进入队列,即为完成。
由索引模型根据 Issue 内容生成。
描述
Plugin Version
v0.0.1
NetBox Version
v4.7.4
Python Version
3.12
Steps to Reproduce
- Create a Webhook and an enabled Event Rule that triggers it when a Tag is created.
- Upload and activate a Project containing
deploy.py:from extras.models import Tag from netbox_scripts import Script class MakeTag(Script): def run(self, data, commit): Tag.objects.create(name='From Revision', slug='from-revision') self.log_success('The tag was created.') - Run the Script from the command line:
python netbox/manage.py runcustomscript deploy.MakeTag --commit - Check the command output, Job status, and Webhook receiver.
Expected Behavior
The Tag is created, the command completes successfully, and the matching Webhook is queued for delivery, as it is when the Script runs through the UI or REST API.
Observed Behavior
The Tag is created, but the Webhook is not queued. The command exits with an error, and the Job is marked as failed:
[error] The Script did not finish: 'NetBoxFakeRequest' object has no attribute 'path_info'
An Event Rule configured to run a Script from this plugin is also affected. The triggered Script is not queued, and NetBox logs Error processing event rule with the same AttributeError.
The runcustomscript command constructs a NetBoxFakeRequest without path_info, which NetBox requires when copying the request for an Event Rule action.
This is related to #122, but separate: #122 concerns the Job's failure message, whereas this issue prevents the Event Rule action from being queued.
- 主要语言
- Python
- 星标
- 8
- 派生
- 0
- 平均合并
- 12 小时 34 分钟
- 30 天内合并 PR
- 57
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
netbox-community/netbox-scripts 的其他 Issue
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 78/100
netbox-community/netbox-scripts#164 ·
维护者通常 1 天内回复
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 74/100
netbox-community/netbox-scripts#153 ·
维护者通常 1 天内回复
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 76/100
netbox-community/netbox-scripts#146 ·
维护者通常 1 天内回复
-
Document that Project revisions do not preserve symbolic links or device files可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭app: scripts status: backlog type: documentation
难度 1/5 1 小时以内 新手友好度 91/100
netbox-community/netbox-scripts#137 ·
维护者通常 1 天内回复
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 67/100
netbox-community/netbox-scripts#134 ·
维护者通常 1 天内回复
查看 netbox-community/netbox-scripts 的全部 Issue
相似的 Issue
-
namespace
难度 1/5 1 小时以内 新手友好度 68/100
EclipseFdn/open-vsx.org#15604 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 5 天内回复
-
Public function to read participants.tsv可能已有人在做 @bruAristimunha 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 85/100
huggingface/tau#799 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
allenai/open-instruct#2245 ·
维护者通常 1 天内回复