You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/10/09 06:23:00 UTC
[jira] [Assigned] (SPARK-60013) Ensure Ivy contexts are popped after Maven resolution failures
[ https://issues.apache.org/jira/browse/SPARK-60013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uroš Bojanić reassigned SPARK-60013:
------------------------------------
Assignee: Qianlan Chen
> Ensure Ivy contexts are popped after Maven resolution failures
> --------------------------------------------------------------
>
> Key: SPARK-60013
> URL: https://issues.apache.org/jira/browse/SPARK-60013
> Project: Spark
> Issue Type: Bug
> Components: Connect
> Affects Versions: 4.4.0
> Reporter: Qianlan Chen
> Assignee: Qianlan Chen
> Priority: Major
> Labels: pull-request-available
>
> {{MavenUtils.resolveMavenCoordinatesWithCancellation}} creates a primary Ivy instance and may create a second no-cache Ivy instance for fallback resolution.
> Both paths call {{{}Ivy.pushContext(){}}}, but the corresponding {{popContext()}} calls currently occur only on successful paths. Exceptions from resolve, retrieve, or cancellation can bypass cleanup and leave thread-local Ivy context state behind.
> If the thread is reused, a later Maven resolution may observe stale Ivy state or settings.
> h2. Proposed change
> Pair every {{Ivy.pushContext()}} with {{popContext()}} in a {{finally}} block.
> A small {{withIvyContext}} helper can wrap both the primary and no-cache resolution paths while preserving their nesting and fallback behavior.
> h2. Acceptance criteria
> * Primary Ivy context is removed after success and failure.
> * No-cache fallback context is removed after success and failure.
> * Existing retry-without-cache behavior remains unchanged.
> * Add regression tests that inject failures into both paths and verify that the context is restored.
> * A subsequent Maven resolution on the same thread succeeds without inheriting stale context.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org