Skip to content

Commit

Permalink
Add JDK21 Support (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-sheng authored Nov 10, 2023
1 parent 2bd500b commit c82287e
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
matrix:
os: [ ubuntu, macos, windows ]
java-version: [ 17 ]
include:
- os: ubuntu
java-version: 21
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugins-jdk17-test.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

test:
needs: [ build ]
name: ${{ matrix.case }}
name: ${{ matrix.case }}-jdk17
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugins-jdk17-test.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

test:
needs: [ build ]
name: ${{ matrix.case }}
name: ${{ matrix.case }}-jdk17
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/plugins-jdk21-test.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Test

on:
pull_request:
paths:
- '.github/workflows/plugins-*.yaml'
- 'apm-application-toolkit/**'
- 'apm-commons/**'
- 'apm-protocol/**'
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- '!**.md'

concurrency:
group: plugins-jdk21-1-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build
uses: ./.github/actions/build
with:
base_image_java: eclipse-temurin:21-jdk
base_image_tomcat: tomcat:10.1-jdk21-temurin

test:
needs: [ build ]
name: ${{ matrix.case }}-jdk21
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
matrix:
case:
- spring-6.x-scenario
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '21'
- name: Run Test
uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ Release Notes.
* Fix Impala Jdbc URL (including schema without properties) parsing exception.
* Optimize byte-buddy type description performance.
* Add `eclipse-temurin:21-jre` as another base image.
* Bump byte-buddy to 1.14.9 for JDK21 support.
* Add JDK21 plugin tests for Spring 6.
* Bump Lombok to 1.18.30 to adopt JDK21 compiling.

#### Documentation
* Fix JDK requirement in the compiling docs.
* Add JDK21 support in the compiling docs.

All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/194?closed=1)

Expand Down
7 changes: 0 additions & 7 deletions apm-sniffer/bytebuddy-patch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
<artifactId>byte-buddy</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion dist-material/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Apache 2.0 licenses
The following components are provided under the Apache License. See project link for details.
The text of each license is the standard Apache 2.0 license.

raphw (byte-buddy) 1.12.19: http://bytebuddy.net/ , Apache 2.0
raphw (byte-buddy) 1.14.9: http://bytebuddy.net/ , Apache 2.0
Google: grpc-java 1.50.0: https://github.com/grpc/grpc-java, Apache 2.0
Google: gson 2.8.9: https://github.com/google/gson , Apache 2.0
Google: proto-google-common-protos 2.0.1: https://github.com/googleapis/googleapis , Apache 2.0
Expand Down
2 changes: 1 addition & 1 deletion docs/en/contribution/compiling.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Compiling project
This document will help you compile and build a project in your maven and set your IDE.

Prepare JDK 8+.
Prepare JDK 17 or 21.

* If you clone codes from https://github.com/apache/skywalking-java
```shell
Expand Down
1 change: 1 addition & 0 deletions docs/en/setup/service-agent/java-agent/Plugin-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ mostly you'll just need to decide which file (`plugins-test.<n>.yaml`) to add yo
You can run `python3 tools/select-group.py` to see which file contains the least cases and add your cases into it, in order to balance the running time of each group.

If a test case required to run in JDK 17 environment, please add you test case into file `plugins-jdk17-test.<n>.yaml`.
If a test case required to run in JDK 21 environment, please add you test case into file `plugins-jdk21-test.<n>.yaml`.

```yaml
jobs:
Expand Down
2 changes: 1 addition & 1 deletion docs/en/setup/service-agent/java-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Setup java agent

1. Agent is available for JDK 8 - 17.
1. Agent is available for JDK 8 - 21.
1. Find `agent` folder in SkyWalking release package
1. Set `agent.service_name` in `config/agent.config`. Could be any String in English.
1. Set `collector.backend_service` in `config/agent.config`. Default point to `127.0.0.1:11800`, only works for local
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
<junit.version>4.12</junit.version>
<mockito-core.version>5.0.0</mockito-core.version>
<system-stubs-junit4.version>2.0.2</system-stubs-junit4.version>
<lombok.version>1.18.20</lombok.version>
<lombok.version>1.18.30</lombok.version>

<!-- core lib dependency -->
<bytebuddy.version>1.14.4</bytebuddy.version>
<bytebuddy.version>1.14.9</bytebuddy.version>
<grpc.version>1.50.0</grpc.version>
<netty.version>4.1.100.Final</netty.version>
<gson.version>2.8.9</gson.version>
Expand Down

0 comments on commit c82287e

Please sign in to comment.