DS5

2026 年 5 月的 DolphinScheduler 社区更新,关键词只有两个:。一方面,Master failover 这类“线上一出问题就影响面很大”的稳定性隐患被补齐;另一方面,API 权限校验、插件依赖冲突、远程任务空指针这类“用着用着就踩坑”的细节也被系统性修复。

本月报把 5 月合并到 dev 分支的重点变化讲清楚,包括你会受哪些影响、要不要升级、怎么验证。

本月数据

  • 合并 PR:50
  • 贡献者:7
  • 代码变更:+10036 / -8542
  • 主要涉及模块:API、DAO、Master、Task Plugin、CI/测试

你会看到“测试相关变更”占比很高:这是社区在为后续迭代打地基——把 CI/UT 跑稳、跑快,才能让功能更敢合、修复更快落地。

谁需要看:

  • 终端用户/业务方:想知道“这个月修了哪些常见坑、线上会更稳吗”
  • 运维/平台同学:关心 failover、权限、日志、插件稳定性
  • 开发者:想快速抓到近期工程治理方向(CI/UT/测试体系)

对用户最有感的 6 件事

  1. Master 故障转移更可靠
    典型场景:Master 挂掉后集群恢复慢、或 failover 卡住。5 月的修复重点之一是避免 failover 的锁泄漏,降低“故障后迟迟无法恢复可调度”的概率。
    对应 PR:https://github.com/apache/dolphinscheduler/pull/18207
  2. 关键 API 的权限更“严谨”
    补齐了部分 API 的项目鉴权缺口(例如 view-gantt / view-variables / trigger workflow),这会让权限模型更符合直觉:没有权限就应当访问不到。
    对应 PR:https://github.com/apache/dolphinscheduler/pull/18212
  3. RemoteShell 任务更不容易 NPE
    远程任务一旦空指针通常很难排查(日志远、上下文多)。本月修复了 RemoteShell 的空指针类问题,让“任务失败原因”更可解释、也更可修。
    对应 PR:https://github.com/apache/dolphinscheduler/pull/18210
  4. 部分任务插件依赖冲突得到治理
    以 AliyunServerlessSpark 为代表的插件,过去常见问题是“依赖拉扯导致 ClassNotFound / 冲突”。本月针对依赖冲突和异常处理做了增强,插件可用性更稳。对应 PR:https://github.com/apache/dolphinscheduler/pull/18180
  5. CI/单测更快、更不容易被跳过
    这不是“新功能”,但对用户很关键:CI 越稳定,越能把问题挡在合并前;测试越扎实,线上故障率越低。
    对应 PR:https://github.com/apache/dolphinscheduler/pull/18213、https://github.com/apache/dolphinscheduler/pull/18214、https://github.com/apache/dolphinscheduler/pull/18205
  6. AWS S3 远程日志支持更灵活的 Region/Endpoint
    对使用 S3 兼容存储(或私有化 endpoint)的用户更友好:region 和 endpoint 的组合更可控,减少“配置正确但连不上”的排障时间。
    对应 PR:https://github.com/apache/dolphinscheduler/pull/18268

升级与验证建议

这份更新基于 2026 年 5 月合并到 dev 分支的 PR,适合做“跟进趋势与提前验证”。如果你是生产用户,建议优先按“风险”决定是否跟进:

  • 建议尽快关注/跟进:涉及 Master failover、权限校验、安全相关、任务插件稳定性的问题修复。
  • 可以按需跟进:CI/测试优化、文档与格式类修订、类型返回迁移(更多是工程质量提升)。

本月变更集中在 dev 分支合并 PR,验证建议(给测试/集成环境):

git fetch origin dev
git checkout dev
git pull --rebase

然后优先回归这三类场景:

  • Master 异常重启 / failover(是否能快速恢复调度)
  • 关键 API 权限(是否符合预期的“有权/无权”)
  • 常用任务插件(RemoteShell、ServerlessSpark 等的运行与日志)

贡献者致谢

感谢所有在 2026 年 5 月 为 Apache DolphinScheduler 提交与合并 PR 的贡献者。你们让调度系统在稳定性、可用性与生态扩展上持续进化。

GitHub 用户名 / Username 主要贡献 / Main Contribution 合并 PR 数 / PRs +Lines -Lines 综合得分 / Score
@ruanwenjun 测试用例 / Tests 40 7367 6506 349.69
@SbloodyS 测试用例 / Tests 4 2503 1988 45.83
@hiSandog 文档完善 / Documentation 2 34 7 15.12
@leocook 问题定位与修复 / Debug & Fix 1 34 29 9.15
@includetts 问题定位与修复 / Debug & Fix 1 16 6 9.06
@llphxd 文档完善 / Documentation 1 4 4 9.02
@wcmolin 测试用例 / Tests 1 78 2 8.26

关键技术变更深度分析

本月共合并 50 个 PR,技术焦点集中在“稳定性 + 安全权限 + 插件可靠性 + CI/测试效率”四个方向。为便于读者快速抓住重点,下面选取 5 项代表性变更展开分析。

1. [Fix-18197][Master] Fix master failover lock leak (#18207)(PR #18207)

  • 链接 / Link:https://github.com/apache/dolphinscheduler/pull/18207
  • 作者 / Author:@ruanwenjun
  • Base/Head:dev ← dev_wenjun_fix18197
  • Diff 统计 / Diff stats:+171 / -10
  • 背景与痛点:Master 发生故障转移(failover)时依赖分布式锁保证“同一地址的 failover 不被并发重复执行”。锁释放路径不对会导致锁节点泄漏,进而阻塞后续 failover,表现为集群在故障后“迟迟无法恢复到可调度状态”。
  • 设计思路与实现原理:将锁获取接口改为返回可关闭句柄(AutoCloseable),用 try-with-resources 强制 acquire/release 对称;同时让调用方保存精确 lock path,避免释放父路径这种隐蔽错误。
  • 量化对比建议:在测试集群中构造 3 Master 的 failover 风暴(kill -9 + 自动拉起),对比修复前后:failover 成功率、平均恢复时间(MTTR)、failover 线程阻塞时长。建议把 Registry 锁节点数量作为可观测指标(泄漏会持续累积)。
  • 兼容性与回滚:接口签名变化会影响调用方;回滚策略是回退到修复前版本,但需要同步清理已泄漏的锁节点,避免“回滚后仍不可用”。

2. [Fix][API] Add missing project authorization on view-gantt/view-variables and trigger workflow APIs (#18212)(PR #18212)

  • 链接 / Link:https://github.com/apache/dolphinscheduler/pull/18212
  • 作者 / Author:@ruanwenjun
  • Base/Head:dev ← dev_wenjun_fixCvePermissionCheck
  • Diff 统计 / Diff stats:+321 / -16
  • 背景与痛点:工作流相关的 API 如果缺失项目级鉴权,很容易出现“只要知道 ID 就能访问/触发”的越权风险;这类问题在企业多租户环境尤其敏感。
  • 设计思路与实现原理:在 view-gantt/view-variables/trigger workflow 等入口补齐项目授权校验,把权限校验前置到 Controller/Service 层,保证所有调用路径一致生效。
  • 量化对比建议:用压测工具对比补齐鉴权前后延迟开销(鉴权通常是 DB/缓存读),并在安全测试中加入“跨项目访问”用例,确保回归。
  • 最佳实践:建议企业用户开启更严格的租户/项目隔离策略,并将敏感 API 纳入审计日志。

3. [Fix-18201][TaskPlugin] Fix RemoteShell task NullPointerException and… (#18210)(PR #18210)

  • 链接 / Link:https://github.com/apache/dolphinscheduler/pull/18210
  • 作者 / Author:@leocook
  • Base/Head:dev ← fix-18201-remoteshell-npe
  • Diff 统计 / Diff stats:+34 / -29
  • 背景与痛点:RemoteShell 任务属于“运维/集成型任务”,在生产中很容易因网络抖动、命令输出流处理差异导致 NPE 或日志丢失。一旦失败,用户看到的往往只是“任务失败”而缺少可定位信息。
  • 设计思路与实现原理:围绕 SSH channel 的输入/输出流处理做健壮性修复,避免空指针;同时改进异常处理路径,确保用户能在日志中看到根因。
  • 量化对比建议:用故障注入(模拟远端断连/输出流为空/命令立即退出)跑 1k 次任务执行,统计 NPE 发生率与日志完整率。
  • 风险与回滚:变更集中在插件侧,回滚较简单;但建议同时保留回归用例覆盖“空输出/大输出/非 0 退出码”。

4. [Fix-18177][Task Plugin] Fix AliyunServerlessSpark plugin dependency conflicts and improve exception handling (#18180)(PR #18180)

  • 链接 / Link:https://github.com/apache/dolphinscheduler/pull/18180
  • 作者 / Author:@includetts
  • Base/Head:dev ← fix/aliyun-serverless-spark-deps-v2
  • Diff 统计 / Diff stats:+16 / -6
  • 背景与痛点:插件依赖冲突属于“编译期不报错、运行期爆炸”的典型问题,常见表现是 NoSuchMethodError / NoSuchFieldError。对用户来说,问题往往只在某些环境、某些依赖组合下才出现,非常难排查。
  • 设计思路与实现原理:修正关键依赖版本并改进异常封装,确保 root cause 不被吞掉;让用户从日志里直接看到冲突的类与方法,缩短排障链路。
  • 量化对比建议:在不同依赖树(如多版本 Hadoop/Spark client)下执行插件 smoke test,统计启动成功率与异常可读性评分(如是否能直接定位冲突 jar)。
  • 最佳实践:生产中建议为 task plugin 引入依赖隔离策略(如 shading/relocation 或独立 classloader),降低跨插件污染风险。

5. [Chore] Unit-Test performance optimize (#18213)(PR #18213)

  • 链接 / Link:https://github.com/apache/dolphinscheduler/pull/18213
  • 作者 / Author:@SbloodyS
  • Base/Head:dev ← ut_performance_optimize
  • Diff 统计 / Diff stats:+22 / -6
  • 背景与痛点:CI/单测体系如果“慢、易跳过、易 flaky”,会把稳定性问题推迟到线上。测试体系的工程化优化虽然不显眼,但决定了社区迭代速度与质量底线。
  • 设计思路与实现原理:通过优化 UT 执行与 CI 配置,避免用例被意外 skip,并在 CI 环境问题时做短期兜底(暂时禁用/恢复),保证主干可用。
  • 量化对比建议:对比优化前后 CI 总耗时、UT 用例数、被 skip 的用例比例、flaky 用例重跑次数。
  • 风险与回滚:临时禁用类改动需要跟踪恢复计划;建议将禁用策略和恢复条件写入 issue/PR 描述,并在后续版本及时回收。

附录:

  • PR #18204: https://github.com/apache/dolphinscheduler/pull/18204
  • PR #18208: https://github.com/apache/dolphinscheduler/pull/18208
  • PR #18206: https://github.com/apache/dolphinscheduler/pull/18206
  • PR #18207: https://github.com/apache/dolphinscheduler/pull/18207
  • PR #18205: https://github.com/apache/dolphinscheduler/pull/18205
  • PR #18213: https://github.com/apache/dolphinscheduler/pull/18213
  • PR #18209: https://github.com/apache/dolphinscheduler/pull/18209
  • PR #18180: https://github.com/apache/dolphinscheduler/pull/18180
  • PR #18212: https://github.com/apache/dolphinscheduler/pull/18212
  • PR #18210: https://github.com/apache/dolphinscheduler/pull/18210
  • PR #18214: https://github.com/apache/dolphinscheduler/pull/18214
  • PR #18221: https://github.com/apache/dolphinscheduler/pull/18221
  • PR #18218: https://github.com/apache/dolphinscheduler/pull/18218
  • PR #18225: https://github.com/apache/dolphinscheduler/pull/18225
  • PR #18227: https://github.com/apache/dolphinscheduler/pull/18227
  • PR #18241: https://github.com/apache/dolphinscheduler/pull/18241
  • PR #18240: https://github.com/apache/dolphinscheduler/pull/18240
  • PR #18226: https://github.com/apache/dolphinscheduler/pull/18226
  • PR #18228: https://github.com/apache/dolphinscheduler/pull/18228
  • PR #18229: https://github.com/apache/dolphinscheduler/pull/18229
  • PR #18232: https://github.com/apache/dolphinscheduler/pull/18232
  • PR #18223: https://github.com/apache/dolphinscheduler/pull/18223
  • PR #18230: https://github.com/apache/dolphinscheduler/pull/18230
  • PR #18234: https://github.com/apache/dolphinscheduler/pull/18234
  • PR #18242: https://github.com/apache/dolphinscheduler/pull/18242
  • PR #18236: https://github.com/apache/dolphinscheduler/pull/18236
  • PR #18233: https://github.com/apache/dolphinscheduler/pull/18233
  • PR #18245: https://github.com/apache/dolphinscheduler/pull/18245
  • PR #18250: https://github.com/apache/dolphinscheduler/pull/18250
  • PR #18251: https://github.com/apache/dolphinscheduler/pull/18251
  • PR #18252: https://github.com/apache/dolphinscheduler/pull/18252
  • PR #18257: https://github.com/apache/dolphinscheduler/pull/18257
  • PR #18270: https://github.com/apache/dolphinscheduler/pull/18270
  • PR #18271: https://github.com/apache/dolphinscheduler/pull/18271
  • PR #18258: https://github.com/apache/dolphinscheduler/pull/18258
  • PR #18253: https://github.com/apache/dolphinscheduler/pull/18253
  • PR #18260: https://github.com/apache/dolphinscheduler/pull/18260
  • PR #18259: https://github.com/apache/dolphinscheduler/pull/18259
  • PR #18256: https://github.com/apache/dolphinscheduler/pull/18256
  • PR #18263: https://github.com/apache/dolphinscheduler/pull/18263
  • PR #18262: https://github.com/apache/dolphinscheduler/pull/18262
  • PR #18261: https://github.com/apache/dolphinscheduler/pull/18261
  • PR #18254: https://github.com/apache/dolphinscheduler/pull/18254
  • PR #18279: https://github.com/apache/dolphinscheduler/pull/18279
  • PR #18284: https://github.com/apache/dolphinscheduler/pull/18284
  • PR #18288: https://github.com/apache/dolphinscheduler/pull/18288
  • PR #18268: https://github.com/apache/dolphinscheduler/pull/18268
  • PR #18296: https://github.com/apache/dolphinscheduler/pull/18296
  • PR #18300: https://github.com/apache/dolphinscheduler/pull/18300
  • PR #18301: https://github.com/apache/dolphinscheduler/pull/18301
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐