Repository navigation
fix: Windows bklite_script 执行路径与 slim 补编缺失插件 - #7
Merged
Merged
Conversation
Materialize scripts with .ps1/.cmd, inject PowerShell -File and cmd /C, avoid Windows SystemTemp/Temp, and strip CR from stdout/stderr. Track build/slim-plugins.conf so slim builds keep outputs.file, inputs.postgresql_extensible, inputs.nginx_vts, and inputs.sql.
ZhongmingFan
commented
Nov 18, 2026
ZhongmingFan
left a comment
Author
There was a problem hiding this comment.
独立审 WeOps-Lab/telegraf #7 活 HEAD dc8c8a25a8600ed53ba7509695515239c59c43a3:PASS-with-residuals,must-fix 0。按 Fan 授权,审过后将用 Mac gh --merge 合入 bklite。
范围
- 1 commit,父
560fb4820ad0cddfc968599c906edcc166d80845(与当前 liveorigin/bklite一致,ahead 1 / behind 0,mergeable true)。 - 作者/提交者均为
zhongmingFan <fanzm96@gmail.com>,无 Cursor 署名。 - 本笔 9 文件 +434/−19:只动
.gitignore、build/slim-plugins.conf、plugins/inputs/bklite_script/*。未带 RocketMQ 改动,未带snmp/sample.conf或其它脏文件。
1. Windows inputs.bklite_script
- 按解释器给临时脚本补后缀:powershell/pwsh →
.ps1,cmd →.cmd,python →.py。 - PowerShell 注入
-NoProfile -ExecutionPolicy Bypass -File(params 里已有的不重复);cmd 补/C。 - 默认或落到
Windows\SystemTemp/Windows\Temp时改到%ProgramData%\bklite_script(再不行用用户 cache)。用户目录下的Local\Temp不误伤。 - stdout/stderr 去
\r只在run_windows.go(//go:build windows)。 - 单测覆盖后缀、argv、受限临时目录、materialize
.ps1、去\r。
2. slim 补编
.gitignore从/build改为/build/*并白名单!/build/slim-plugins.conf,写法正确。build/slim-plugins.conf已含outputs.file、inputs.postgresql_extensible、inputs.nginx_vts、inputs.sql,以及探测/下发常用的inputs.bklite_script、processors.starlark/enum/converter、win_perf_counters、outputs.nats/kafka/influxdb等。- 其中
user:pass@tcp(127.0.0.1:3306)等是 custom_builder 占位,不是现场凭据。
残留(不挡合)
- CI
Target Branch / master失败:工作流要求 PR 基于master,本单正确以bklite为 base,2 秒内exit 1。Lint Code Base 已通过。不视为本单缺陷。 - head 是
fix/bklite-windows-script-and-slim而不是直接推bklite:GitHub 不能对同一分支开 PR,父提交已是 livebklite,合入后bklite即前进。 .bat未单独给后缀(只处理cmd→.cmd);本轮先验是 PowerShell。- 空
run_dir在非 SYSTEM 临时目录下的默认改道,单测未在 Windows SYSTEM 环境实跑(显式 SystemTemp 路径已覆盖)。
合闸只合本单,不顺带其它分支。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
供 Fan 查看 0.5.0 先验相关改动。先不合闸,等 Fan 看完。
本 PR 新提交(
dc8c8a25,父 SHA560fb482)inputs.bklite_scriptWindows 修复:临时脚本补.ps1/.cmd,PowerShell 注入-NoProfile -ExecutionPolicy Bypass -File,cmd 补/C;避开Windows\SystemTemp与Windows\Temp,改用%ProgramData%\bklite_script;stdout/stderr 去\r。build/slim-plugins.conf(原来被/build忽略),补上outputs.file、inputs.postgresql_extensible、inputs.nginx_vts、inputs.sql。关于 RocketMQ
消费偏移 / TPS / 堆积 diff 修复已经在
bklite上(56c436f9及后续 #5 / #6),本机工作区没有新的 RocketMQ 未提交改动,这次没有再叠一笔。本地仍在
bklite。GitHub 要对现有bklite开出只含这批改动的 PR,head 不能还是bklite本身,所以把同一笔提交推到fix/bklite-windows-script-and-slim。origin/bklite先不更新。作者 / 提交者zhongmingFan <fanzm96@gmail.com>,无 Cursor 署名。