-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Feature] GraalVM Native Image support (Experimental). #11365
Conversation
@@ -48,7 +48,7 @@ public Iterator<SearchHit> iterator() { | |||
return getHits().iterator(); | |||
} | |||
|
|||
static final class TotalDeserializer extends JsonDeserializer<Integer> { | |||
public static final class TotalDeserializer extends JsonDeserializer<Integer> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an unexpected change? Why public
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
II want to simply reference this class in another class, but maybe I should use a different approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an inner class, it should be accessible outside. Where do you use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In SkyWalkingFeature, but I'm hesitating on whether to keep this class. I'll take a look after the CI for my repository finishes running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Let's continue the discussion after you have more conclusions.
graal/graal-server-starter/pom.xml
Outdated
<dependency> | ||
<groupId>org.graalvm.sdk</groupId> | ||
<artifactId>graal-sdk</artifactId> | ||
<version>23.0.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please manage the version from the bom.
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class SkywalkingFeature implements Feature { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments to explain what this is about.
public class SkywalkingFeature implements Feature { | |
public class SkyWalkingFeature implements Feature { |
skywalking
should always be SkyWalking
.
graal/graal-server-starter/src/main/resources/META-INF/native-image/main/jni-config.json
Show resolved
Hide resolved
|
||
## Current Limitations | ||
Native-image supports reflection and other dynamic features through some JSON-formatted configuration files. SkyWalking currently provides a set of configuration files for basic support. You can find them [here](https://github.com/apache/skywalking/tree/master/graal/graal-server-starter/src/main/resources/META-INF/native-image). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path you are using here should use the relative path. The website compiling could translate it to the correct path binding in the version(commit ID).
Notice, that the OSPP is reaching the deadline. SkyWalking community would not accept the PR until it is qualified. |
…alking into native-image-support
Mockito.when(telemetryProvider.getService(MetricsCreator.class)) | ||
.thenReturn(new MetricsCreatorNoop()); | ||
TelemetryModule telemetryModule = Mockito.spy(TelemetryModule.class); | ||
Whitebox.setInternalState(telemetryModule, "loadedProvider", telemetryProvider); | ||
Mockito.when(moduleManager.find(TelemetryModule.NAME)).thenReturn(telemetryModule); | ||
|
||
CoreModule coreModule = Mockito.spy(CoreModule.class); | ||
Mockito.when(coreModuleProvider.getService(SourceReceiver.class)).thenReturn(new SourceReceiverImpl()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a lot of mock codes are repeated in many UTs, right?
Could you move these mock codes into server-testing
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meanwhile, due to all these tests are for Graal mostly, as you would not put the verification codes in these UTs, right?
You should reference UT-IT, and separate these UTs to run in the Graal package(such as GRAAL-PACKAGE-IT) only.
For now, you seem to make every UT-IT developer suffer extra time for nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, otherwise look good to me
.github/workflows/skywalking.yaml
Outdated
@@ -22,7 +22,7 @@ on: | |||
- cron: "0 18 * * *" # TimeZone: UTC 0 | |||
|
|||
concurrency: | |||
group: skywalking-${{ github.event.pull_request.number || github.ref }} | |||
group: skywalking-graalvm-${{ github.event.pull_request.number || github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you changed the wrong place, this file is skywalking.yaml
, you should change the one in file .github/workflows/native-image.yaml
group: skywalking-graalvm-${{ github.event.pull_request.number || github.ref }} | |
group: skywalking-${{ github.event.pull_request.number || github.ref }} |
.github/workflows/native-image.yaml
Outdated
push: | ||
|
||
concurrency: | ||
group: skywalking-${{ github.event.pull_request.number || github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group: skywalking-${{ github.event.pull_request.number || github.ref }} | |
group: skywalking-graalvm-${{ github.event.pull_request.number || github.ref }} |
.github/workflows/native-image.yaml
Outdated
name: E2E test | ||
needs: [build] | ||
runs-on: ${{ 'ubuntu-latest' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runs-on: ${{ 'ubuntu-latest' }} | |
runs-on: ubuntu-latest |
|
||
FROM apache/skywalking-cli:$SKYWALKING_CLI_VERSION as cli | ||
|
||
FROM --platform=linux/amd64 ubuntu:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we only support amd64 architecture in our Docker images? We don't have to add arm
support in this PR, just wondering whether there is any blocker to support arm64 arch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARM architecture should can be supported, but for the sake of passing tests stably, I specified AMD (some Docker images do not support ARM architecture operating systems).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's open another PR to verify this.
Considering timing of OSPP, I could skip this.
If this is non-trivial feature, paste the links/URLs to the design doc.
Update the documentation to include this new feature.
Tests(including UT, IT, E2E) are added to verify the new feature.
If it's UI related, attach the screenshots below.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes [Feature] GraalVM Build for OAP server #11279 .
Update the
CHANGES
log.