From 74cfcce605e9a66db5d3c12952871320b031df44 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Tue, 26 May 2026 11:24:21 -0400 Subject: [PATCH] Broaden external_dependency_version_regex to handle custom XML property tags The regex previously only matched version values inside ... elements. Custom Maven property tags like 2.18.6 that carry valid {x-version-update} comments were silently skipped, causing version drift and bannedDependencies failures (see PR #49261 for the immediate fix). The new regex matches the content of any XML element, not just . The lookahead (?=) is not matched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/versioning/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/versioning/utils.py b/eng/versioning/utils.py index 0b2117c61c5c..cc542b620350 100644 --- a/eng/versioning/utils.py +++ b/eng/versioning/utils.py @@ -27,7 +27,11 @@ # External dependency versions do not have to match semver format and the semver regular expressions # will partially match and produce some hilarious results. -external_dependency_version_regex = r'(?<=).+?(?=)' +# Match version content inside any XML element, not just . +# This handles custom property tags like 2.18.6 +# that carry {x-version-update} comments but are not wrapped in elements. +# The lookahead (?=). +external_dependency_version_regex = r'(?<=>)[^<]+(?=