spark-3.5-scala-2.13/GHSA-8qv5-68g4-248j/GHSA-2jc4-r94c-rp7h-fix #39819
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context and implications of the changes:
The inability to update
org.scala-lang:scala-library
to version2.13.9
or higher inspark-3.5.x
arises from a critical build issue documented in SPARK-44376. This problem stems from the transition to Scala2.13.11
(SPARK-40497) and the deprecation of the-target
argument in favor of-release
in the scala-maven-plugin. This change introduces stricter compatibility checks, breaking builds when using Java 11 or later.The key errors include inaccessible
sun.*
classes likeDirectBuffer
andUnsafe
, which are not exported in Java versions above 8 (source). Despite manual attempts to adjust Maven configurations, such as switching-target:jvm-1.8
to-release:8
, compilation failures persist due to inherent restrictions imposed by the-release
argument. This issue is compounded by the Scala Maven plugin's automatic addition of the-release
argument for Scala2.13.9
and above, leading to incompatibilities when targeting Java 8 compatibility while running on newer Java versions.While upstream remediated by upgrading to
2.13.11
, even2.13.9
is not possible withscala-maven-plugin
version4.8.0
. Currently,scala.version
is hardcoded to2.13.8
, and fixing this requires implementation of the following PRs:The only reason remediation is achievable is due to the following conditions:
4.0.0
release.scala-maven-plugin
to4.7.1
does not introduce any new CVEs beyond those already existing in4.8.0
.This was a more involved remediation due to:
scala.version
property, which does not follow usualpom.xml
conventions, with the same property value defined twice in thepom.xml
, causing maven/pombump to not function.Bonus: Was able to tack on an additional remediation for ivy/GHSA-2jc4-r94c-rp7h