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

Made changes to scripts to release multi-arch Beam SDK containers #27836

Merged
merged 4 commits into from
Aug 8, 2023
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
* Hugging Face Model Handler for RunInference added to Python SDK. ([#26632](https://github.com/apache/beam/pull/26632))
* Hugging Face Pipelines support for RunInference added to Python SDK. ([#27399](https://github.com/apache/beam/pull/27399))
* Upgraded the Kryo extension for the Java SDK to Kryo 5.5.0. This brings in bug fixes, performance improvements, and serialization of Java 14 records. ([#27635](https://github.com/apache/beam/issues/27635))
* The Go, Python and Java SDK container images are now [multi-arch images](https://cloud.google.com/kubernetes-engine/docs/how-to/build-multi-arch-for-arm#what_is_a_multi-arch_image), supporting both x86 and ARM CPU architectures. ([#27674](https://github.com/apache/beam/issues/27674))

## Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class BeamModulePlugin implements Plugin<Project> {
project.ext.containerArchitectures = {
if (isRelease(project)) {
// Ensure we always publish the expected containers.
return ["amd64"];
return ["amd64", "arm64"];
} else if (project.rootProject.findProperty("container-architecture-list") != null) {
def containerArchitectures = project.rootProject.findProperty("container-architecture-list").split(',')
if (containerArchitectures.size() > 1 && !project.rootProject.hasProperty("push-containers")) {
Expand Down
2 changes: 1 addition & 1 deletion sdks/go/container/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ if (project.rootProject.hasProperty(["docker-pull-licenses"])) {
}

task pushAll {
dependsOn ":sdks:go:container:dockerPush"
dependsOn ":sdks:go:container:docker"
}
6 changes: 3 additions & 3 deletions sdks/java/container/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ artifacts {
}

task pushAll {
dependsOn ":sdks:java:container:java8:dockerPush"
dependsOn ":sdks:java:container:java11:dockerPush"
dependsOn ":sdks:java:container:java17:dockerPush"
dependsOn ":sdks:java:container:java8:docker"
dependsOn ":sdks:java:container:java11:docker"
dependsOn ":sdks:java:container:java17:docker"
}
27 changes: 1 addition & 26 deletions sdks/python/container/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,8 @@ tasks.register("buildAll") {
dependsOn ':sdks:python:container:py311:docker'
}

for(int i=8; i<=11; ++i) {
String cur = "3" + i
String prev = "3" + (i-1)
tasks.register("push" + cur) {
if (cur != "38") {
// Enforce ordering to allow the prune step to happen between runs.
// This will ensure we don't use up too much space (especially in CI environments)
mustRunAfter(":sdks:python:container:push" + prev)
}
dependsOn ':sdks:python:container:py' + cur + ':dockerPush'

doLast {
if (project.hasProperty("prune-images")) {
exec {
executable("docker")
args("system", "prune", "-a", "--force")
}
}
}
}
}

tasks.register("pushAll") {
dependsOn ':sdks:python:container:push38'
dependsOn ':sdks:python:container:push39'
dependsOn ':sdks:python:container:push310'
dependsOn ':sdks:python:container:push311'
dependsOn ':sdks:python:container:buildAll'
}

tasks.register("generatePythonRequirementsAll") {
Expand Down