Skip to content

[INTERNAL]: Fix bannedDependencies failure: bump scala-jackson.version to 2.18.7#49263

Merged
jeet1995 merged 2 commits into
mainfrom
fix/jackson-module-scala-enforcer-bump
May 26, 2026
Merged

[INTERNAL]: Fix bannedDependencies failure: bump scala-jackson.version to 2.18.7#49263
jeet1995 merged 2 commits into
mainfrom
fix/jackson-module-scala-enforcer-bump

Conversation

@jeet1995
Copy link
Copy Markdown
Member

Problem

After the Jackson 2.18.6 to 2.18.7 dependency bump in PR #49180, the maven-enforcer-plugin bannedDependencies rule in azure-cosmos-spark_3/pom.xml rejects jackson-module-scala 2.18.7 as banned. This blocks all PRs that trigger Cosmos Spark builds (e.g., #49095, #49258).

Root Cause

The update_versions.py script's regex (external_dependency_version_regex in eng/versioning/utils.py) only matches values inside <version>...</version> XML elements. Custom Maven property tags like <scala-jackson.version> are silently skipped despite having valid {x-version-update} comments.

When PR #49180 ran update_versions.py:

  • Updated all <version> tags to 2.18.7
  • Updated all {x-include-update} enforcer entries to [2.18.7]
  • Silently skipped the <scala-jackson.version> properties (left at 2.18.6 or 2.18.4)

The enforcer allowlist (which uses ${scala-jackson.version}) then permits only the stale version, while Maven resolves 2.18.7 -- banned.

Fix

Bump <scala-jackson.version> to 2.18.7 in all four Spark parent POMs:

  • azure-cosmos-spark_3/pom.xml (2.18.6 -> 2.18.7)
  • azure-cosmos-spark_3-5/pom.xml (2.18.4 -> 2.18.7)
  • azure-cosmos-spark_3-5_2-12/pom.xml (2.18.4 -> 2.18.7)
  • azure-cosmos-spark_4/pom.xml (2.18.6 -> 2.18.7)

The underlying script limitation is tracked in draft PR #49262.

Supersedes #49261 (closed due to branch update).

The update_versions.py script's regex only matches <version> XML elements,
silently skipping custom property tags like <scala-jackson.version> despite
valid {x-version-update} comments. When PR #49180 bumped Jackson to 2.18.7,
these properties were left stale, causing the enforcer to ban the correct
2.18.7 dependency.

Bump scala-jackson.version from 2.18.6/2.18.4 to 2.18.7 in all four Spark
parent POMs. The underlying script limitation is tracked in PR #49262.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 15:43
@jeet1995 jeet1995 requested review from a team and kirankumarkolli as code owners May 26, 2026 15:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR unblocks Cosmos Spark builds by aligning the scala-jackson.version Maven property with the Jackson 2.18.7 bump, avoiding maven-enforcer-plugin bannedDependencies failures caused by a stale allowlist version.

Changes:

  • Bump scala-jackson.version to 2.18.7 in Spark parent POMs for Spark 3.x, 3.5, 3.5 (2.12), and Spark 4.x.
  • Keep existing {x-version-update} annotations on the property lines while updating the pinned version value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
sdk/cosmos/azure-cosmos-spark_3/pom.xml Updates scala-jackson.version to 2.18.7 for Spark 3 parent.
sdk/cosmos/azure-cosmos-spark_3-5/pom.xml Updates scala-jackson.version to 2.18.7 for Spark 3.5 parent.
sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml Updates scala-jackson.version to 2.18.7 for Spark 3.5 (2.12) parent.
sdk/cosmos/azure-cosmos-spark_4/pom.xml Updates scala-jackson.version to 2.18.7 for Spark 4 parent.

Comment thread sdk/cosmos/azure-cosmos-spark_3/pom.xml
Comment thread sdk/cosmos/azure-cosmos-spark_4/pom.xml
Comment thread sdk/cosmos/azure-cosmos-spark_3-5/pom.xml
Comment thread sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml
Copy link
Copy Markdown
Member

@xinlian12 xinlian12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@jeet1995 jeet1995 merged commit de31cd3 into main May 26, 2026
43 checks passed
@jeet1995 jeet1995 deleted the fix/jackson-module-scala-enforcer-bump branch May 26, 2026 18:23
@jeet1995 jeet1995 changed the title Fix bannedDependencies failure: bump scala-jackson.version to 2.18.7 [INTERNAL]: Fix bannedDependencies failure: bump scala-jackson.version to 2.18.7 May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants