Skip to content

feat: upgrade artifact upload to use bazel #314

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

Merged
merged 3 commits into from
Feb 3, 2025
Merged
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: 2 additions & 2 deletions api/py/ai/chronon/repo/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@

# GCP DATAPROC SPECIFIC CONSTANTS
DATAPROC_ENTRY = "ai.chronon.integrations.cloud_gcp.DataprocSubmitter"
ZIPLINE_ONLINE_JAR_DEFAULT = "cloud_gcp-assembly-0.1.0-SNAPSHOT.jar"
ZIPLINE_ONLINE_JAR_DEFAULT = "cloud_gcp_lib_deploy.jar"
ZIPLINE_ONLINE_CLASS_DEFAULT = "ai.chronon.integrations.cloud_gcp.GcpApiImpl"
ZIPLINE_FLINK_JAR_DEFAULT = "flink-assembly-0.1.0-SNAPSHOT.jar"
ZIPLINE_DATAPROC_SUBMITTER_JAR = "cloud_gcp_submitter-assembly-0.1.0-SNAPSHOT.jar"
ZIPLINE_DATAPROC_SUBMITTER_JAR = "cloud_gcp_submitter_deploy.jar"


class DataprocJobType(Enum):
Expand Down
17 changes: 12 additions & 5 deletions cloud_gcp/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scala_library(
name = "lib",
name = "cloud_gcp_lib",
srcs = glob(["src/main/**/*.scala"]),
visibility = ["//visibility:public"],
deps = [
Expand Down Expand Up @@ -36,8 +36,14 @@ scala_library(
],
)

jvm_binary(
name = "cloud_gcp_submitter",
main_class = "ai.chronon.integrations.cloud_gcp.DataprocSubmitter",
runtime_deps = [":cloud_gcp_lib"],
)

test_deps = [
":lib",
":cloud_gcp_lib",
"//api:thrift",
"//api:lib",
"//online:lib",
Expand Down Expand Up @@ -76,17 +82,18 @@ test_deps = [
]

scala_library(
name = "test-lib",
name = "cloud_gcp_test_lib",
srcs = glob(["src/test/**/*.scala"]),
visibility = ["//visibility:public"],
deps = test_deps,
)


scala_test_suite(
name = "test",
name = "cloud_gcp_test",
srcs = glob(["src/test/**/*.scala"]),
# defined in prelude_bazel file
jvm_flags = _JVM_FLAGS_FOR_ACCESSING_BASE_JAVA_CLASSES,
visibility = ["//visibility:public"],
deps = test_deps + [":test-lib"],
deps = test_deps + [":cloud_gcp_test_lib"],
)
9 changes: 5 additions & 4 deletions distribution/build_and_upload_gcp_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ fi

echo "Building jars"
sbt clean
sbt cloud_gcp/assembly
sbt cloud_gcp_submitter/assembly
sbt flink/assembly
sbt service/assembly

CLOUD_GCP_JAR="$CHRONON_ROOT_DIR/cloud_gcp/target/scala-2.12/cloud_gcp-assembly-0.1.0-SNAPSHOT.jar"
CLOUD_GCP_SUBMITTER_JAR="$CHRONON_ROOT_DIR/cloud_gcp_submitter/target/scala-2.12/cloud_gcp_submitter-assembly-0.1.0-SNAPSHOT.jar"
bazel build //cloud_gcp:lib_deploy.jar
bazel build //cloud_gcp:submitter_deploy.jar

CLOUD_GCP_JAR="$CHRONON_ROOT_DIR/bazel-bin/cloud_gcp/lib_deploy.jar"
CLOUD_GCP_SUBMITTER_JAR="$CHRONON_ROOT_DIR/bazel-bin/cloud_gcp/submitter_deploy.jar"
FLINK_JAR="$CHRONON_ROOT_DIR/flink/target/scala-2.12/flink-assembly-0.1.0-SNAPSHOT.jar"
SERVICE_JAR="$CHRONON_ROOT_DIR/service/target/scala-2.12/service-0.1.0-SNAPSHOT.jar"

Expand Down
1 change: 1 addition & 0 deletions online/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ scala_library(
maven_artifact("com.github.ben-manes.caffeine:caffeine"),
maven_artifact("com.fasterxml.jackson.core:jackson-core"),
maven_artifact("com.fasterxml.jackson.core:jackson-databind"),
scala_artifact("com.fasterxml.jackson.module:jackson-module-scala"),
scala_artifact("com.softwaremill.sttp.client3:core"),
scala_artifact("com.softwaremill.sttp.model:core"),
scala_artifact("com.softwaremill.sttp.shared:core"),
Expand Down