用强化学习动态优化流水线测试,提速30%且漏测率低于5%
Reinforcement Learning for Dynamic Workflow Optimization in CI/CD Pipelines
- 将流水线建模为马尔可夫决策过程,智能决定全量/部分/跳过测试
- 测试时间减少25%,吞吐量提升30%,缺陷漏检率低于5%
- 适合追求高效自动化、降低测试开销的DevOps团队
持续集成与部署(CI/CD)流水线是现代软件交付的核心,但其静态流程在系统扩展时易产生效率瓶颈。本文提出一种基于强化学习(RL)的动态优化方法,将流水线建模为马尔可夫决策过程,训练智能体在运行时决策是否执行全量、部分或跳过测试,以最大化吞吐量并最小化测试开销。构建了一个可配置的CI/CD仿真环境,评估该方法在构建、测试和部署阶段的表现。实验结果表明,与静态基线相比,该方法使吞吐量提升最高达30%,测试执行时间减少约25%,同时缺陷漏检率保持在5%以下。智能体学会对低风险提交选择性跳过或缩短测试,加快反馈周期,而失败风险未显著上升。结果证明强化学习可实现自适应、智能化的DevOps流程,为更高效、稳健、可持续的CI/CD自动化提供可行路径。
原文摘要 · Abstract (English)
Continuous Integration and Continuous Deployment (CI/CD) pipelines are central to modern software delivery, yet their static workflows often introduce inefficiencies as systems scale. This paper proposes a reinforcement learning (RL) based approach to dynamically optimize CI/CD pipeline workflows. The pipeline is modeled as a Markov Decision Process, and an RL agent is trained to make runtime decisions such as selecting full, partial, or no test execution in order to maximize throughput while minimizing testing overhead. A configurable CI/CD simulation environment is developed to evaluate the approach across build, test, and deploy stages. Experimental results show that the RL optimized pipeline achieves up to a 30 percent improvement in throughput and approximately a 25 percent reduction in test execution time compared to static baselines, while maintaining a defect miss rate below 5 percent. The agent learns to selectively skip or abbreviate tests for low risk commits, accelerating feedback cycles without significantly increasing failure risk. These results demonstrate the potential of reinforcement learning to enable adaptive and intelligent DevOps workflows, providing a practical pathway toward more efficient, resilient, and sustainable CI/CD automation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。