Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor of the way Lambda job classes are identified #2431

Merged
merged 1 commit into from
Oct 31, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ on:
paths:
- '.github/workflows/graalvm.yml'
- 'reachability-metadata/src/**'
- 'test/native/native-image-filter/**'
- 'test/native/src/**'
- 'test/native/**'

jobs:
build:
Expand Down
31 changes: 29 additions & 2 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
## Release 3.1.0-SNAPSHOT

### API Changes

1. Kernel: Refactor of the way Lambda job classes are identified - [#2370](https://github.com/apache/shardingsphere-elasticjob/issues/2370)

### New Features

### Enhancements

1. Bootstrap: Provides built-in GraalVM Reachability Metadata and nativeTest on Elasticjob Bootstrap - [#2268](https://github.com/apache/shardingsphere-elasticjob/pull/2268)
1. Build: Support for building with OpenJDK 22 - [#2407](https://github.com/apache/shardingsphere-elasticjob/issues/2407)
1. Spring Boot Starter: Block `elasticjob-spring-boot-starter` from passing `spring-boot-starter` test scope dependencies - [#2418](https://github.com/apache/shardingsphere-elasticjob/issues/2418)
1. Lifecycle: Support dynamic configuration of jobs through the Operation API in GraalVM Native Image - [#2426](https://github.com/apache/shardingsphere-elasticjob/pull/2426)
1. Doc: Adds documentation for connecting to Zookeeper Server with SASL enabled - [#2442](https://github.com/apache/shardingsphere-elasticjob/pull/2442)
1. Build: Support building and using ElasticJob with JDK23 - [#2453](https://github.com/apache/shardingsphere-elasticjob/issues/2453)
1. Build: Support building and using ElasticJob with JDK23 - [#2453](https://github.com/apache/shardingsphere-elasticjob/issues/2453)

### Bug Fixes

1. Build: Removes non-existent `elasticjob-tracing-api` and `elasticjob-error-handler-spi` module - [#2412](https://github.com/apache/shardingsphere-elasticjob/pull/2412)
1. Spring Boot Starter: Fixes the issue that OneOffJobBootstrap cannot be used under ElasticJob Spring Boot Starter - [#2014](https://github.com/apache/shardingsphere-elasticjob/issues/2014)

### Change Logs

1. [MILESTONE](https://github.com/apache/shardingsphere-elasticjob/milestone/7)

## 3.0.4

## Dependencies Upgrade
### Dependencies Upgrade
1. Update dependencies to fix CVE

## Enhancements
### Enhancements
1. Support for building with OpenJDK 21
2. Accelerate the startup speed of ElasticJob
3. Migrate from Junit Vintage to Junit Jupiter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
public final class DefaultJobClassNameProvider implements JobClassNameProvider {

private static final String LAMBDA_CHARACTERISTICS = "$$Lambda$";
private static final String LAMBDA_CHARACTERISTICS = "$$Lambda";

@Override
public String getJobClassName(final ElasticJob elasticJob) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.apache.shardingsphere.elasticjob.kernel.fixture.job.DetailedFooJob;
import org.apache.shardingsphere.elasticjob.kernel.fixture.job.FooJob;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
Expand All @@ -35,14 +33,12 @@ void assertGetOrdinaryClassJobName() {
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.fixture.job.DetailedFooJob"));
}

// TODO OpenJDK 21 breaks this unit test.
@Test
@DisabledForJreRange(min = JRE.JAVA_21, max = JRE.OTHER)
void assertGetLambdaJobName() {
JobClassNameProvider jobClassNameProvider = new DefaultJobClassNameProvider();
FooJob lambdaFooJob = shardingContext -> {
};
String result = jobClassNameProvider.getJobClassName(lambdaFooJob);
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.internal.setup.DefaultJobClassNameProviderTest$$Lambda$"));
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.internal.setup.DefaultJobClassNameProviderTest$$Lambda"));
}
}
4 changes: 2 additions & 2 deletions test/native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<!--TODO Blocked by https://github.com/apache/shardingsphere-elasticjob/issues/2425 -->
<spring-boot-dependencies.version>3.3.4</spring-boot-dependencies.version>
<spring-boot-dependencies.version>3.3.5</spring-boot-dependencies.version>
<slf4j.version>2.0.16</slf4j.version>
<logback.version>1.5.8</logback.version>
<logback.version>1.5.11</logback.version>
</properties>

<dependencies>
Expand Down
Loading