Skip to content

HIVE-28216: Add commons-configuration2 2.15.0 dependency - #6754

Open
Akanksha-kedia wants to merge 1 commit into
apache:masterfrom
Akanksha-kedia:hive-28216-commons-configuration2
Open

HIVE-28216: Add commons-configuration2 2.15.0 dependency#6754
Akanksha-kedia wants to merge 1 commit into
apache:masterfrom
Akanksha-kedia:hive-28216-commons-configuration2

Conversation

@Akanksha-kedia

Copy link
Copy Markdown

What changes were proposed in this pull request?

Adds org.apache.commons:commons-configuration2:2.15.0 as a dependency in ql/pom.xml (property declared in root pom.xml), alongside the existing commons-configuration:commons-configuration:1.10 dependency, which is left untouched.

This picks up the thread from #5213, which proposed migrating commons-configuration 1.x to commons-configuration2 but stalled after review.

Why are the changes needed?

#5213 aimed to fix CVEs in commons-configuration 1.x by moving to config2. However, the only two consumers in this repo — AtlasRestClientBuilder.java and TestAtlasDumpTask.java — feed org.apache.atlas.ApplicationProperties.set(Configuration), and Atlas 2.4.0's API (pinned in ql/pom.xml) hardcodes org.apache.commons.configuration.Configuration (config1). Swapping those call sites to config2's ConfigurationConverter does not compile against that Atlas API, and since Atlas itself depends on config1 internally, the vulnerable jar stays on the classpath transitively regardless of what Hive declares directly — a full fix needs an Atlas client upgrade as well, which is out of scope here.

This PR only adds the config2 dependency so it's available, without touching the Atlas-coupled call sites, so as not to break the build while that larger Atlas upgrade is out of scope.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

mvn install -DskipTests -pl ql -am — dependency resolves and ql compiles cleanly with commons-configuration2 added alongside the existing commons-configuration 1.x dependency.

cc @ayushtkn @devaspatikrishnatri

Continues apache#5213, which stalled after review flagged that the
config1 -> config2 import swap wasn't safe: the only in-repo
consumers (AtlasRestClientBuilder, TestAtlasDumpTask) feed
org.apache.atlas.ApplicationProperties.set(Configuration), and
Atlas 2.4.0's API hardcodes commons-configuration 1.x's Configuration
type, so those call sites can't move to config2 without an Atlas
upgrade too.

This adds commons-configuration2 as an available dependency for
future use without touching the Atlas-coupled call sites, leaving
the existing commons-configuration 1.x dependency and its two
consumers untouched.
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

@Akanksha-kedia

Copy link
Copy Markdown
Author

The failing continuous-integration/jenkins/pr-head check here is Jenkins' own "Existing failures" bucket (2457 pre-existing failures — mostly TestHiveIcebergTypes parameterized variants, TestWorker2, TestLlapDaemon, and other known-flaky infra-heavy suites), which already fail on the base branch independent of this change. Nothing in this diff touches those areas, so there's nothing to fix on this PR's side.

@ayushtkn @devaspatikrishnatri would appreciate a review when you have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants