Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make new build default and combine into dist package #3411

Merged
merged 113 commits into from Sep 10, 2021

Conversation

tgravescs
Copy link
Collaborator

@tgravescs tgravescs commented Sep 8, 2021

contributes to #3223

This pr is based off of #3381 and includes:

  1. makes the new build targets the defaults. it builds a single version of spark by default and the dist jar only includes that single version unless other profiles specified.
  2. removes many of the old ones
  3. Combines the spark version packages into a single dist package - this requires installing all other versions into .m2. This adds some profiles to combine snapshots (-Pallwithsnapshots), snapshots with db (-PallwithsnapshotsDB), no snapshots (-Pallnosnapshots) and no snapshots with DB (-Pallnosnapshotswithdb).
  4. Supports building databricks 301db and 311db with PR 3381 changes
  5. tries to update the jenkins build scripts
  6. adds a scripts build/buildall that just installs all the apache and CDH versions and create a dist package with -Pallwithsnapshots. This is very basic and we can make it better with more options later.
  7. checked jar contents against older jars and it seems like we have everything for dependencies and properties files and license, notice, etc.
  8. removed shims/aggregator module since no longer needed
  9. Added an aggregator module that is responsible for shading each of the spark versions. This combines the sql-plugin, shuffle, udf, etc and then shades the dependencies. Those aggregated modules are what end up being combined into the file uber jar in the dist directory where they are put into a spark specific directory.

The jar is much larger right now until we can dedup the code. it was at 115M

Default build with no targest builds spark301. to build another version you specify -Dbuildver=spark3XX.

I tested databricks builds and one of the apache spark version integration tests. all versions ran unit tests.
I can't test on cloudera right now because the override shim in pr 3381 isn't working and it needs these changes to test so I think we can fix this after they are merged.

There is more to do but I think the release jar is working for everything I've tested so would be good to switch to it and get a base.

I have not tested UCX or the udf examples.

In progress of righting a nightly build to see if that script works.

docs/configs.md Outdated Show resolved Hide resolved
@tgravescs
Copy link
Collaborator Author

build

<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>com.nvidia.spark.rapids.SparkShimServiceProvider.*</exclude>
Copy link
Collaborator

Choose a reason for hiding this comment

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

the shade plugin outputs dependency-reduced-pom.xml under the pom's basedir by default since we were not using dependencyReducedPomLocation config. As a consequence many developers who have used the old build in their local repo prior to this PR will have a stale file under dist that is not cleaned up by maven

I suggest to add it to the exclude list in this PR to minimize reported build failures.

In a follow up we can add dependencyReducedPomLocation to the shade plugin configs

@tgravescs
Copy link
Collaborator Author

there are other shuffle related classes I need to handle to make those non-shimmed, working through them.

@tgravescs
Copy link
Collaborator Author

the shuffle stuff got very ugly, started requiring a lot of things to be unshimmed which then eventually broke using it without rapids shuffle, need to investigate a better way to handle shuffle

<id>create-parallel-world</id>
<configuration>
<target>

Copy link
Collaborator

Choose a reason for hiding this comment

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

TODO explore ant-contrib for loops and try to have a single execution configured where the missing input for unzip is skipped

- created profile representative shims for each FEATURE version and a
  vendor shim
- Use VisibleShuffleManager mostly for tagging, so stop inheriting
  ShuffleManager
- prevent ClassCastExceptions when casting to VisibleShuffleManager
  by not using it in the ShimLoader method signatures

Signed-off-by: Gera Shegalov <gera@apache.org>
@gerashegalov
Copy link
Collaborator

shuffle should be fixed if you merge tgravescs#3 into your branch

 Fix classloading via ProxyRapidsShuffleManager
@tgravescs
Copy link
Collaborator Author

build

<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: The indentation under configuration appears to be off, only filters appears to be indented correctly.

<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Indention appears to be off here.

<goals>
<goal>shade</goal>
</goals>
<configuration>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tried to put the common configuration under the plugin, and only the differences in the execution itself? That should hopefully make this much more readable, with less duplication.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will fix in #3440

set -ex

# Install all the versions we support
mvn -U -Dbuildver=302 clean install -Drat.skip=true -DskipTests -Dmaven.javadoc.skip=true -Dskip -pl aggregator -am
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if this was discussed before, but if we don't want rat, or tests or javadocs/etc, why do we have them on by default in the maven build at all? I would much rather see a way to pass parameters to the shell script on to the maven build so I can decide what I want and what I don't instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah the build script is very basic right now just to get started, lots of improvements to it need to be done

#

set -ex

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we do something to make sure that the directory is the correct one? This assumes that you are in the root directory calling build/buildall.

@@ -29,11 +29,13 @@ else
if [ -d "$LOCAL_JAR_PATH" ]; then
CUDF_JARS=$(echo "$LOCAL_JAR_PATH"/cudf-*.jar)
PLUGIN_JARS=$(echo "$LOCAL_JAR_PATH"/rapids-4-spark_*.jar)
# TODO - this should really only pick up the specific version being tested
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a follow on issue for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

its subitem in #3223

# Disabled until Spark 3.2 source incompatibility fixed, see https://github.com/NVIDIA/spark-rapids/issues/2052
#mvn -U -B -Pspark320tests,snapshot-shims test $MVN_URM_MIRROR -Dmaven.repo.local=$M2DIR -Dcuda.version=$CUDA_CLASSIFIER
# Install all the versions we support
mvn -U -B -Dbuildver=302 clean install $MVN_URM_MIRROR -Dmaven.repo.local=$M2DIR -Dcuda.version=$CUDA_CLASSIFIER
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we made buildall configurable then we could reuse it here instead of copying everything

@tgravescs
Copy link
Collaborator Author

@revans2 thanks for the review, if you are ok, I'd like to do nits and things in followup since ci passed here and would like to get it as base?

Release 21.10 automation moved this from Review in progress to Reviewer approved Sep 10, 2021
Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

All of the issues I pointed out before can be done as follow on work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to CI / CD or cleanly building
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[FEA] create the plugin package capable of storing conflicting multiple versions of same named classes
6 participants