Skip to content
Draft
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,4 @@ hail/python/hail/backend/hail.jar
hail/install-editable
hail/python/install-editable
batch/jvm-entryway/bin
.helix
/hail/mill-build/config/hail-build-mode
/hail/mill-build/config/scala-version
.helix
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ pylint-hailtop:
$(PYTHON) -m pylint --rcfile pylintrc hail/python/hailtop --score=n

.PHONY: check-hail
check-hail: export HAIL_BUILD_MODE=Dev
check-hail: HAIL_DEPLOY_TARGET='spark_2.13:3.5.3'
check-hail: check-hail-fast pylint-hailtop
cd hail && HAIL_BUILD_MODE=Dev SCALA_VERSION=2.13 $(MILL) $(MILLOPTS) hail[].__.checkFormat + hail[].__.fix --check
cd hail && $(MILL) $(MILLOPTS) hail[].__.checkFormat + hail[].__.fix --check

.PHONY: check-batch
check-batch: check-batch-fast pylint-batch
Expand Down
54 changes: 22 additions & 32 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -773,23 +773,18 @@ steps:
set -ex
cd /io/repo/hail

export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=Release
time retry sh mill --no-daemon --version

# We've encountered the following sporadic error in CI between `mill`
# finishing assembling the jar and `Make` copying the jar:
#
# cp -f out/assembly.dest/out.jar python/hail/backend/hail-all-spark.jar
# cp: cannot stat 'out/assembly.dest/out.jar': No such file or directory
#
# This was likely from running mill in server mode; mill main exits before
# This was caused by running mill in daemon mode; mill main exits before
# the jar has finished being written.
time retry make shadowJar
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
echo 'no out.jar found after mill assembly returned. going to sleep'
sleep 5
fi
export MILLOPTS='--no-daemon'

export HAIL_DEPLOY_TARGET=dataproc-2.3.x HAIL_BUILD_MODE=Release
time retry sh mill --no-daemon --version
time retry make DEV_CLARIFIER=hail-ci-build wheel

# Check wheel size is small enough for pypi (< 200 MiB)
Expand Down Expand Up @@ -851,12 +846,12 @@ steps:
set -ex
cd /io/repo/hail

export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
export HAIL_DEPLOY_TARGET=dataproc-2.3.x HAIL_BUILD_MODE=CI MILLOPTS='--no-daemon'
time retry sh mill --no-daemon --version

# See `build_hail_jar_and_wheel`
time retry make shadowJar
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
if [ ! -f "out/hail/${HAIL_DEPLOY_TARGET}/assembly.dest/out.jar" ]; then
echo 'no out.jar found after mill assembly returned. going to sleep'
sleep 5
fi
Expand Down Expand Up @@ -884,12 +879,12 @@ steps:
set -ex
cd /io/repo/hail

export MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
export HAIL_DEPLOY_TARGET=dataproc-2.3.x MILLOPTS='--no-daemon' HAIL_BUILD_MODE=CI
time retry sh mill --no-daemon --version

# See `build_hail_jar_and_wheel`
time retry make shadowTestJar
if [ ! -f out/hail/2.12/test/assembly.dest/out.jar ]; then
if [ ! -f "out/hail/${HAIL_DEPLOY_TARGET}/test/assembly.dest/out.jar" ]; then
echo 'no out.jar found after mill assembly returned. going to sleep'
sleep 5
fi
Expand Down Expand Up @@ -944,16 +939,11 @@ steps:
set -ex
cd /io/repo/hail

export SPARK_VERSION="3.0.2" SCALA_VERSION="2.12.13" HAIL_BUILD_MODE=Release MILLOPTS='--no-daemon'
export SPARK_VERSION="3.3.1" SCALA_VERSION="2.12.13"

export MILLOPTS='--no-daemon'
export HAIL_DEPLOY_TARGET=hdinsight-5.1 HAIL_BUILD_MODE=Release
time retry sh mill --no-daemon --version

# See `build_hail_jar_and_wheel`
time retry make shadowJar
if [ ! -f out/hail/2.12/assembly.dest/out.jar ]; then
echo 'no out.jar found after mill assembly returned. going to sleep'
sleep 5
fi

time retry make wheel
inputs:
- from: /repo
Expand Down Expand Up @@ -1081,7 +1071,7 @@ steps:
inputs:
- from: /resources.tar.gz
to: /io/resources.tar.gz
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
to: /io/hail-test.jar
- from: /splits.tar.gz
to: /io/splits.tar.gz
Expand Down Expand Up @@ -1691,7 +1681,7 @@ steps:
- hail_linting_image
- merge_code
- kind: runImage
name: compile_hail_213
name: compile_hail_dataproc_3_0_x
image:
valueFrom: base_image.image
resources:
Expand All @@ -1701,8 +1691,8 @@ steps:
set -ex
cd /io/repo/hail

HAIL_BUILD_MODE='CI'
time retry sh mill --no-daemon hail[2.13].__.compile
export HAIL_BUILD_MODE='CI'
time retry sh mill --no-daemon 'hail[dataproc-3.0.x].__.compile'
inputs:
- from: /repo
to: /io/repo
Expand Down Expand Up @@ -2573,7 +2563,7 @@ steps:
valueFrom: default_ns.name
mountPath: /batch-gsa-key
inputs:
- from: /derived/release/hail/out/hail/2.12/assembly.dest/out.jar
- from: /derived/release/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
to: /io/hail.jar
- from: /repo/hail/env/REVISION
to: /io/REVISION
Expand Down Expand Up @@ -3499,7 +3489,7 @@ steps:
# #14452 - must build wheel with release `hailtop/hailctl/deploy.yaml`
# use `-o` to prevent `mill` from rebuilding the "SHADOW_JAR"
make upload-artifacts HAIL_BUILD_MODE=Release DEPLOY_REMOTE=origin \
-o out/hail/2.12/assembly.dest/out.jar
-o shadowJar

echo Setting arguments and invoking release.sh.

Expand All @@ -3524,8 +3514,8 @@ steps:
inputs:
- from: /repo
to: /io/repo
- from: /derived/release/hail/out/hail/2.12/assembly.dest/out.jar
to: /io/repo/hail/out/hail/2.12/assembly.dest/out.jar
- from: /derived/release/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
to: /io/repo/hail/out/hail/dataproc-2.3.x/assembly.dest/out.jar
- from: /azure-wheel
to: /io/azure-wheel
- from: /www.tar.gz
Expand Down Expand Up @@ -3769,7 +3759,7 @@ steps:
inputs:
- from: /resources.tar.gz
to: /io/resources.tar.gz
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
to: /io/hail-test.jar
- from: /repo/hail/testng-fs.xml
to: /io/testng-fs.xml
Expand Down Expand Up @@ -3811,7 +3801,7 @@ steps:
inputs:
- from: /resources.tar.gz
to: /io/resources.tar.gz
- from: /derived/debug/hail/out/hail/2.12/test/assembly.dest/out.jar
- from: /derived/debug/hail/out/hail/dataproc-2.3.x/test/assembly.dest/out.jar
to: /io/hail-test.jar
- from: /repo/hail/testng-services.xml
to: /io/testng-services.xml
Expand Down
7 changes: 4 additions & 3 deletions hail/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.bsp/
env/
mill-build/config
python/.eggs
python/README.md
python/dist
Expand Down Expand Up @@ -74,6 +77,4 @@ src/main/c/headers
src/main/c/lib
src/main/c/libsimdpp-2*
src/main/resources/include/catch.hpp
env/
www/docs
.bsp/
www/docs
1 change: 1 addition & 0 deletions hail/.scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ RemoveUnused {
}

ForbiddenSymbol.symbols = [
"org.sfl4j",
"scala.collection.compat.immutable.ArraySeq"
]
13 changes: 6 additions & 7 deletions hail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ HAIL_PATCH_VERSION := 137
HAIL_PIP_VERSION := $(HAIL_MAJOR_MINOR_VERSION).$(HAIL_PATCH_VERSION)
HAIL_VERSION := $(HAIL_PIP_VERSION)-$(SHORT_REVISION)

SCALA_VERSION ?= 2.12
SPARK_VERSION ?= 3.5.3
HAIL_DEPLOY_ENVIRONMENT ?= dataproc-2.3.x

include env_var.mk

Expand Down Expand Up @@ -64,7 +63,7 @@ CLOUD_HAIL_DOCTEST_DATA_DIR = $(CLOUD_HAIL_TEST_RESOURCES_PREFIX)/doctest/data/

# mill integration

MILL := SCALA_VERSION=$(SCALA_VERSION) bash mill
MILL := bash mill
MILLOPTS ?=

.PHONY: mill-clean
Expand All @@ -77,7 +76,7 @@ mill-clean:
# be recomputed.
FORCE:

SHADOW_JAR := out/hail/$(SCALA_VERSION)/assembly.dest/out.jar
SHADOW_JAR := out/hail/$(HAIL_DEPLOY_ENVIRONMENT)/assembly.dest/out.jar
ifdef HAIL_COMPILE_NATIVES
$(SHADOW_JAR): native-lib-prebuilt
endif
Expand All @@ -87,14 +86,14 @@ $(SHADOW_JAR): FORCE
.PHONY: shadowJar
shadowJar: $(SHADOW_JAR)

NON_SHADOW_JAR := out/hail/$(SCALA_VERSION)/jar.dest/out.jar
NON_SHADOW_JAR := out/hail/$(HAIL_DEPLOY_ENVIRONMENT)/jar.dest/out.jar
ifdef HAIL_COMPILE_NATIVES
$(NON_SHADOW_JAR): native-lib-prebuilt
endif
$(NON_SHADOW_JAR): FORCE
$(MILL) $(MILLOPTS) hail[].jar

SHADOW_TEST_JAR := out/hail/$(SCALA_VERSION)/test/assembly.dest/out.jar
SHADOW_TEST_JAR := out/hail/$(HAIL_DEPLOY_ENVIRONMENT)/test/assembly.dest/out.jar
ifdef HAIL_COMPILE_NATIVES
$(SHADOW_TEST_JAR): native-lib-prebuilt
endif
Expand All @@ -104,7 +103,7 @@ $(SHADOW_TEST_JAR): FORCE
.PHONY: shadowTestJar
shadowTestJar: $(SHADOW_TEST_JAR)

EXTRA_CLASSPATH := out/hail/$(SCALA_VERSION)/writeRunClasspath.dest/runClasspath
EXTRA_CLASSPATH := out/hail/$(HAIL_DEPLOY_ENVIRONMENT)/writeRunClasspath.dest/runClasspath
$(EXTRA_CLASSPATH): FORCE
$(MILL) $(MILLOPTS) hail[].writeRunClasspath

Expand Down
24 changes: 9 additions & 15 deletions hail/build.mill
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//| mill-version: 1.0.4
//| mill-jvm-version: 11
//| mill-version: 1.1.0-RC3
//| mill-jvm-version: 17
package build

import mill.*
Expand All @@ -17,14 +17,7 @@ import org.typelevel.scalacoptions.*
object Settings:
val hailMajorMinorVersion = "0.2"
val hailPatchVersion = "137"
val scalaMinorVersions = Map("2.12" -> "2.12.20", "2.12.13" -> "2.12.13", "2.13" -> "2.13.13")


object Env extends Module:
def sparkVersion: T[String] =
Task.Input {
Task.env.getOrElse("SPARK_VERSION", "3.5.3")
}
val scalaMinorVersions = Map("2.12" -> "2.12.20", "2.13" -> "2.13.18")


trait HailJavaModule extends JavaModule:
Expand All @@ -35,7 +28,7 @@ trait HailJavaModule extends JavaModule:
else Seq()

val `optim?` =
if buildMode == Release
if BuildMode == Release
then Seq("-O")
else Seq("-g")

Expand Down Expand Up @@ -85,10 +78,10 @@ trait HailScalaModule extends ScalaModule, HailJavaModule, ScalafmtModule, Scala
)

val fromBuildMode =
buildMode match {
BuildMode match {
case Dev =>
ScalacOptions.verboseOptions
// + ScalacOptions.checkInit // enable to help debug accessing uninitialized fields
// + ScalacOptions.checkInit // enable to help debug accessing uninitialized fields
case CI =>
Set(ScalacOptions.fatalWarnings)
case Release =>
Expand Down Expand Up @@ -163,5 +156,6 @@ trait HailScalaModule extends ScalaModule, HailJavaModule, ScalafmtModule, Scala
richOptions ++ rawOptions
}

trait HailScalaTests extends ScalaTests, HailScalaModule

trait HailScalaTests extends ScalaTests, HailScalaModule:
override def enableBsp: Boolean =
outer.enableBsp
Loading