Skip to content

Commit c82287e

Browse files
authored
Add JDK21 Support (#647)
1 parent 2bd500b commit c82287e

File tree

11 files changed

+86
-14
lines changed

11 files changed

+86
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
matrix:
5050
os: [ ubuntu, macos, windows ]
5151
java-version: [ 17 ]
52+
include:
53+
- os: ubuntu
54+
java-version: 21
5255
steps:
5356
- uses: actions/checkout@v2
5457
with:

.github/workflows/plugins-jdk17-test.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
test:
5151
needs: [ build ]
52-
name: ${{ matrix.case }}
52+
name: ${{ matrix.case }}-jdk17
5353
runs-on: ubuntu-latest
5454
timeout-minutes: 90
5555
strategy:

.github/workflows/plugins-jdk17-test.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
test:
5151
needs: [ build ]
52-
name: ${{ matrix.case }}
52+
name: ${{ matrix.case }}-jdk17
5353
runs-on: ubuntu-latest
5454
timeout-minutes: 90
5555
strategy:
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
name: Test
18+
19+
on:
20+
pull_request:
21+
paths:
22+
- '.github/workflows/plugins-*.yaml'
23+
- 'apm-application-toolkit/**'
24+
- 'apm-commons/**'
25+
- 'apm-protocol/**'
26+
- 'apm-sniffer/**'
27+
- 'test/plugin/**'
28+
- '**/pom.xml'
29+
- '!**.md'
30+
31+
concurrency:
32+
group: plugins-jdk21-1-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
build:
37+
name: Build
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 30
40+
steps:
41+
- uses: actions/checkout@v2
42+
with:
43+
submodules: true
44+
- name: Build
45+
uses: ./.github/actions/build
46+
with:
47+
base_image_java: eclipse-temurin:21-jdk
48+
base_image_tomcat: tomcat:10.1-jdk21-temurin
49+
50+
test:
51+
needs: [ build ]
52+
name: ${{ matrix.case }}-jdk21
53+
runs-on: ubuntu-latest
54+
timeout-minutes: 90
55+
strategy:
56+
matrix:
57+
case:
58+
- spring-6.x-scenario
59+
steps:
60+
- uses: actions/checkout@v2
61+
with:
62+
submodules: true
63+
- uses: actions/setup-java@v2
64+
with:
65+
distribution: 'temurin'
66+
java-version: '21'
67+
- name: Run Test
68+
uses: ./.github/actions/run
69+
with:
70+
test_case: ${{ matrix.case }}

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ Release Notes.
2121
* Fix Impala Jdbc URL (including schema without properties) parsing exception.
2222
* Optimize byte-buddy type description performance.
2323
* Add `eclipse-temurin:21-jre` as another base image.
24+
* Bump byte-buddy to 1.14.9 for JDK21 support.
25+
* Add JDK21 plugin tests for Spring 6.
26+
* Bump Lombok to 1.18.30 to adopt JDK21 compiling.
2427

2528
#### Documentation
29+
* Fix JDK requirement in the compiling docs.
30+
* Add JDK21 support in the compiling docs.
2631

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

apm-sniffer/bytebuddy-patch/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
<artifactId>byte-buddy</artifactId>
3939
</dependency>
4040

41-
<dependency>
42-
<groupId>org.projectlombok</groupId>
43-
<artifactId>lombok</artifactId>
44-
<version>1.18.20</version>
45-
<scope>provided</scope>
46-
</dependency>
47-
4841
<dependency>
4942
<groupId>junit</groupId>
5043
<artifactId>junit</artifactId>

dist-material/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Apache 2.0 licenses
215215
The following components are provided under the Apache License. See project link for details.
216216
The text of each license is the standard Apache 2.0 license.
217217

218-
raphw (byte-buddy) 1.12.19: http://bytebuddy.net/ , Apache 2.0
218+
raphw (byte-buddy) 1.14.9: http://bytebuddy.net/ , Apache 2.0
219219
Google: grpc-java 1.50.0: https://github.com/grpc/grpc-java, Apache 2.0
220220
Google: gson 2.8.9: https://github.com/google/gson , Apache 2.0
221221
Google: proto-google-common-protos 2.0.1: https://github.com/googleapis/googleapis , Apache 2.0

docs/en/contribution/compiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compiling project
22
This document will help you compile and build a project in your maven and set your IDE.
33

4-
Prepare JDK 8+.
4+
Prepare JDK 17 or 21.
55

66
* If you clone codes from https://github.com/apache/skywalking-java
77
```shell

docs/en/setup/service-agent/java-agent/Plugin-test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ mostly you'll just need to decide which file (`plugins-test.<n>.yaml`) to add yo
681681
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.
682682

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

685686
```yaml
686687
jobs:

docs/en/setup/service-agent/java-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Setup java agent
22

3-
1. Agent is available for JDK 8 - 17.
3+
1. Agent is available for JDK 8 - 21.
44
1. Find `agent` folder in SkyWalking release package
55
1. Set `agent.service_name` in `config/agent.config`. Could be any String in English.
66
1. Set `collector.backend_service` in `config/agent.config`. Default point to `127.0.0.1:11800`, only works for local

0 commit comments

Comments
 (0)