一句话:提出 MICROSCOPE,用 Datalog 规则统一建模多语言微服务代码与配置,以识别受变更影响的接口。
微服务应用常由多语言代码、框架与配置构成,提交代码变更后需尽早确定受影响的公共接口以加速测试,但多语言异构建模使变更影响分析困难。本文提出 MICROSCOPE,将代码、配置文件、框架和代码变更统一表示为关系式 Datalog 规则,借助高效 Datalog 求解器计算受影响接口,实现语言无关的变更影响分析。在蚂蚁集团的实验表明,MICROSCOPE 能有效识别 112 个代码提交影响的接口,时间开销适中,并可减少 97% 待测接口、节省 73% 测试时间。
The shift-left principle in the industry requires us to test a software application as early as possible. In particular, when code changes in a microservice application are committed to the code repository, we have to efficiently identify all public microservice interfaces affected by the changes so that the impacted interfaces can be tested as soon as possible. However, developing an efficient change impact analysis is extremely challenging in microservices due to the multilingual problem: microservice applications are often implemented using varying programming languages and involve diverse frameworks and configuration files. To address this issue, this paper presents MICROSCOPE, a language-agnostic change impact analysis that uniformly represents code, configuration files, frameworks, and code changes by relational Datalog rules. MICROSCOPE then benefits from an efficient Datalog solver to identify impacted interfaces. Experiments based on the use of MICROSCOPE in Ant Group, a leading software vendor, demonstrate that MICROSCOPE is both effective and fast, as it successfully identifies interfaces affected by 112 code commits, with moderate time overhead, and could reduce 97% of interfaces to test and save 73% of testing time after code changes.
DOI 原文 ·
@inproceedings{paperbot8817,
title = {Datalog-Based Language-Agnostic Change Impact Analysis for Microservices},
author = {Qingkai Shi and Xiaoheng Xie and Xianjin Fu and Peng Di and Huawei Li and Ang Zhou and Gang Fan},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00115}
}