Skip to content

Commit a2c034a

Browse files
Abacnparveensania
authored andcommitted
Update code-change-guide add back build SDK container (apache#35855)
1 parent 95dd61e commit a2c034a

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

contributor-docs/code-change-guide.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,16 +444,35 @@ If you're using Dataflow Runner v2 and `sdks/java/harness` or its dependencies (
444444
--experiments=use_runner_v2,use_staged_dataflow_worker_jar
445445
```
446446

447+
#### SDK container image change
448+
449+
If you have changed codes under `sdks/java/container`, you need to build a custom SDK container to make the change
450+
effective.
451+
452+
```shell
453+
./gradlew :sdks:java:container:java11:docker # or java17, java21, etc
454+
# change version number to the actual tag below
455+
docker tag apache/beam_java8_sdk:2.68.0.dev \
456+
"us-docker.pkg.dev/apache-beam-testing/beam-temp/beam_java11_sdk:2.68.0-custom" # change to your artifact registry
457+
docker push "us-docker.pkg.dev/apache-beam-testing/beam-temp/beam_java11_sdk:2.68.0-custom"
458+
```
459+
460+
Then run the pipeline with the following options:
461+
```
462+
--experiments=use_runner_v2 \
463+
--sdkContainerImage="us.gcr.io/apache-beam-testing/beam_java11_sdk:2.49.0-custom"
464+
```
465+
447466
#### Snapshot Version Containers
448467

449-
By default, a Snapshot version for an SDK under development will use the containers published to the [apache-beam-testing project's container registry](https://us.gcr.io/apache-beam-testing/github-actions). For example, the most recent snapshot container for Java 17 can be found [here](https://us.gcr.io/apache-beam-testing/github-actions/beam_java17_sdk).
468+
By default, a Snapshot version for an SDK under development will use the containers published to the apache-beam-testing project's container registry (`https://gcr.io/apache-beam-testing/beam-sdk/...`). For example, the most recent snapshot container for Java 21 can be found [here](https://gcr.io/apache-beam-testing/beam-sdk/beam_java21_sdk).
450469

451470
When a version is entering the [release candidate stage](https://github.com/apache/beam/blob/master/contributor-docs/release-guide.md), one final SNAPSHOT version will be published.
452471
This SNAPSHOT version will use the final containers published on [DockerHub](https://hub.docker.com/search?q=apache%2Fbeam).
453472

454473
**NOTE:** During the release process, there may be some downtime where a container is not available for use for a SNAPSHOT version. To avoid this, it is recommended to either switch to the latest SNAPSHOT version available or to use [custom containers](https://beam.apache.org/documentation/runtime/environments/#custom-containers). You should also only rely on snapshot versions for important workloads if absolutely necessary.
455474

456-
Certain runners may override this snapshot behavior; for example, the Dataflow runner overrides all SNAPSHOT containers into a [single registry](https://console.cloud.google.com/gcr/images/cloud-dataflow/GLOBAL/v1beta3). The same downtime will still be incurred, however, when switching to the final container
475+
Certain runners may override this snapshot behavior; for example, the Dataflow runner overrides all SNAPSHOT containers into a [single registry](gcr.io/cloud-dataflow/). The same downtime will still be incurred, however, when switching to the final container.
457476

458477
## Python development guide
459478

0 commit comments

Comments
 (0)