Skip to content

Commit

Permalink
Update PR based on code review comments
Browse files Browse the repository at this point in the history
* Added log message in case a JobParameter Type is invalid
* cleaned up workflow.adoc
  • Loading branch information
cppwfs committed Aug 19, 2024
1 parent 3cf939b commit 1119e55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/workflow.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
= Workflow Reference Readme
= Workflow Reference

This README serves as a guide to the GitHub Action workflows included in this repository. It outlines the purpose and functionality of each workflow, detailing their role in the CI and release processes. Additionally, this document provides an overview of the scripts and actions utilized in these workflows, offering insights into how they work together in SCDF's CI/CD pipeline.
This README serves as a guide to the GitHub Action workflows included in this repository.
It outlines the purpose and functionality of each workflow, detailing their role in the CI and release processes.
Additionally, this document provides an overview of the scripts and actions utilized in these workflows, offering insights into how they work together in SCDF's CI/CD pipeline.

This document is a work in progress, and as various workflows are updated, the documentation will be revised to reflect both existing and new behaviors.

Expand Down Expand Up @@ -41,10 +43,13 @@ This document is a work in progress, and as various workflows are updated, the d
Part of the release and CI process involves creating and pushing images to a registry (such as DockerHub) for the Dataflow server, Skipper server, CTR app, and other components.
This process is managed by the `build-images` (build-images.yml) workflow. While the `build-images` workflow is typically not run independently, it is invoked by other workflows that handle CI builds and releases.
The `build-images` workflow determines which images to create based on the `images.json` file.
This file contains metadata on the primary SCDF components that need to have an associated image. Each entry specifies the location (directory) where the jar can be found, jar name, and image name for each artifact that will be used to construct the image.
This file contains metadata on the primary SCDF components that need to have an associated image.
Each entry specifies the location (directory) where the jar can be found, jar name, and image name for each artifact that will be used to construct the image.
For each entry in the `images.json` file, the workflow calls the `build-image.sh` script, which retrieves the jar, builds the image, and then pushes it to the registry.

SCDF also provides images for external applications that support some of the optional features that are offered by dataflow. These include Grafana and Prometheus local. These images are created and pushed using the docker/build-push-action@v2 action.
SCDF also provides images for external applications that support some of the optional features that are offered by dataflow.
These include Grafana and Prometheus local.
These images are created and pushed using the docker/build-push-action@v2 action.

=== Scripts used to build images
As mentioned above, the `build-image.sh` script is responsible for building the specified image based on the parameters provided and then pushing the image to Dockerhub.
Expand All @@ -60,7 +65,7 @@ bash
```

There is an optional `DEFAULT_JDK` environment variable that allows you to set the JDK version for the default image created.
If not the script will set it to its current setting (which as of the writing of this document is `17`)
If not the script will set it to its current setting (which as of the writing of this document is `17`).

NOTE: When new releases of Java are available and are compliant with the SCDF release, they need to be added to the `build-image.sh` script.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public JobParameter deserialize(JsonParser jsonParser, DeserializationContext de
try {
jobParameter = new JobParameter(value, Class.forName(type), identifying);
} catch (ClassNotFoundException e) {
logger.warn("JobParameter type %s is not supported by DataFlow. Verify type is valid or in classpath.".formatted(type) );
throw new IllegalArgumentException("JobParameter type %s is not supported by DataFlow".formatted(type), e);
}
}
Expand Down

0 comments on commit 1119e55

Please sign in to comment.