Skip to content
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
2 changes: 1 addition & 1 deletion .github/actions/setup-environment-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ runs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ inputs.java-version == 'default' && '11' || inputs.java-version }}
java-version: ${{ inputs.java-version == 'default' && ((contains(github.job, 'Xlang') || contains(github.job, 'XVR') || contains(github.job, 'PreCommit_Java')) && '17' || '11') || inputs.java-version }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding specific job name patterns (like 'Xlang', 'XVR', and 'PreCommit_Java') inside a shared action reduces its modularity and maintainability. If new jobs require Java 17 or existing jobs are renamed, this action will need to be constantly updated. Instead of inspecting github.job inside the action, consider passing the appropriate java-version (e.g., '17') as an input parameter directly from the calling workflow files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a valid comment and it indeed caused a couple of tests now failing

We should keep Java artifacts compiled on Java11 by default as it matches release build

- name: Setup Gradle
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: default
java-version: '17'
python-version: ${{ matrix.python_version }}
- name: Set PY_VER_CLEAN
id: set_py_ver_clean
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/expansion-service/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
###############################################################################

FROM eclipse-temurin:11
FROM eclipse-temurin:17
LABEL Author "Apache Beam <dev@beam.apache.org>"
ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions sdks/java/io/expansion-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ applyJavaNature(
exportJavadoc: false,
validateShadowJar: false,
shadowClosure: {},
// iceberg requires Java11+
requireJavaVersion: JavaVersion.VERSION_11
// iceberg requires Java11+ and delta lake requires Java17+
requireJavaVersion: JavaVersion.VERSION_17
)

// We don't want to use the latest version for the entire beam sdk since beam Java users can override it themselves.
Expand Down
Loading