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

SPARK-30573 test #3

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -66,15 +65,7 @@ jobs:
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
export MAVEN_CLI_OPTS="--no-transfer-progress"
mkdir -p ~/.m2
# `Maven Central` is too flaky in terms of downloading artifacts in `GitHub Action` environment.
# `Google Maven Central Mirror` is too slow in terms of sycing upstream. To get the best combination,
# 1) we set `Google Maven Central` as a mirror of `central` in `GitHub Action` environment only.
# 2) we duplicates `Maven Central` in pom.xml with ID `central_without_mirror`.
# In other words, in GitHub Action environment, `central` is mirrored by `Google Maven Central` first.
# If `Google Maven Central` doesn't provide the artifact due to its slowness, `central_without_mirror` will be used.
# Note that we aim to achieve the above while keeping the existing behavior of non-`GitHub Action` environment unchanged.
echo "<settings><mirrors><mirror><id>google-maven-central</id><name>GCS Maven Central mirror</name><url>https://maven-central.storage-download.googleapis.com/repos/central/data/</url><mirrorOf>central</mirrorOf></mirror></mirrors></settings>" > ~/.m2/settings.xml
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -P${{ matrix.hive }} -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} install
./build/mvn -X $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -P${{ matrix.hive }} -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} install
rm -rf ~/.m2/repository/org/apache/spark


Expand Down
5 changes: 2 additions & 3 deletions dev/scalafmt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# limitations under the License.
#

# by default, format only files that differ from git master
params="${@:---diff}"
VERSION="${@:-2.12}"
./build/mvn -Pscala-$VERSION mvn-scalafmt_$VERSION:format -Dscalafmt.skip=false

./build/mvn -Pscala-2.12 mvn-scalafmt_2.12:format -Dscalafmt.skip=false -Dscalafmt.parameters="$params"
61 changes: 28 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<commons.collections.version>3.2.2</commons.collections.version>
<scala.version>2.12.10</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<scalafmt.parameters>--diff --test</scalafmt.parameters>
<scalafmt.parameters>--test</scalafmt.parameters>
<!-- for now, not running scalafmt as part of default verify pipeline -->
<scalafmt.skip>true</scalafmt.skip>
<codehaus.jackson.version>1.9.13</codehaus.jackson.version>
Expand Down Expand Up @@ -246,10 +246,9 @@
</properties>
<repositories>
<repository>
<id>central</id>
<!-- This should be at top, it makes maven try the central repo first and then others and hence faster dep resolution -->
<name>Maven Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<id>gcs-mirror</id>
<name>GCS Maven Mirror</name>
<url>https://maven-central.storage-download.googleapis.com/repos/central/data</url>
<releases>
<enabled>true</enabled>
</releases>
Expand All @@ -258,12 +257,8 @@
</snapshots>
</repository>
<repository>
<id>central_without_mirror</id>
<!--
This is used as a fallback when a mirror to `central` fail.
For example, when we use Google Maven Central in GitHub Action as a mirror of `central`,
this will be used when Google Maven Central is out of sync due to its late sync cycle.
-->
<id>maven-central</id>
<!-- This should be at top, it makes maven try the central repo first and then others and hence faster dep resolution -->
<name>Maven Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<releases>
Expand All @@ -276,7 +271,7 @@
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<id>maven-central</id>
<url>https://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
Expand Down Expand Up @@ -2879,6 +2874,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antipathy</groupId>
<artifactId>mvn-scalafmt_${scala.binary.version}</artifactId>
<version>1.0.3</version>
<configuration>
<parameters>${scalafmt.parameters}</parameters> <!-- (Optional) Additional command line arguments -->
<skip>${scalafmt.skip}</skip> <!-- (Optional) skip formatting -->
<skipSources>${scalafmt.skip}</skipSources>
<skipTestSources>${scalafmt.skip}</skipTestSources>
<configLocation>dev/.scalafmt.conf</configLocation> <!-- (Optional) config location -->
<onlyChangedFiles>true</onlyChangedFiles>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Couple of dependencies are coming in bundle format (bundle is just a normal jar which
contains OSGi metadata in the manifest). If one don't use OSGi, then a bundle will work as
Expand Down Expand Up @@ -3043,27 +3059,6 @@
<build>
<pluginManagement>
<plugins>
<!-- SPARK-29293 currently not able to update to 1.x for Scala 2.13 -->
<plugin>
<groupId>org.antipathy</groupId>
<artifactId>mvn-scalafmt_2.12</artifactId>
<version>0.12_1.5.1</version>
<configuration>
<parameters>${scalafmt.parameters}</parameters> <!-- (Optional) Additional command line arguments -->
<skip>${scalafmt.skip}</skip> <!-- (Optional) skip formatting -->
<skipSources>${scalafmt.skip}</skipSources>
<skipTestSources>${scalafmt.skip}</skipTestSources>
<configLocation>dev/.scalafmt.conf</configLocation> <!-- (Optional) config location -->
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down