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

Provide built-in GraalVM Reachability Metadata on Seata Client 2.1.0+ #6686

Open
linghengqian opened this issue Jul 19, 2024 · 3 comments
Open

Comments

@linghengqian
Copy link
Member

linghengqian commented Jul 19, 2024

Why you need it?

Is your feature request related to a problem? Please describe in details

  • Provide built-in GraalVM Reachability Metadata on Seata Client 2.1.0+. The GraalVM Reachability Metadata required by Seata Client was in place on Seata Client 1.8.1 but was removed from Seata Client 2.0.0. I created https://github.com/linghengqian/seata-client-graalvm-native-test to test the Seata Client org.apache.seata:seata-all:2.1.0-SNAPSHOT on the master branch. To run the unit tests involved in this git under the GraalVM Native Image, just execute the following command. Verified under Ubuntu 22.04.4 LTS with Docker Engine and SDKMAN!.
sdk install java 22.0.1-graalce
sdk use java 22.0.1-graalce
sudo apt-get install build-essential zlib1g-dev -y

git clone git@github.com:apache/incubator-seata.git
cd ./incubator-seata/
git reset --hard 1c0a442842801413e4dc8e663c452ed18fc1dc1b
./mvnw -Prelease-seata -Dmaven.test.skip=true clean install -T1C
cd ../

git clone git@github.com:linghengqian/seata-client-graalvm-native-test.git
cd ./seata-client-graalvm-native-test/
./mvnw -PnativeTestInJunit -T1C -e clean test

How it could be?

A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

  • This may mean the addition of 2 Maven Profiles and 2 Maven modules, one module is responsible for defining nativeTest by bypassing mockito, and the other module is responsible for storing the automatically generated or manually modified GRM JSON. But to be honest, considering that a single Maven module can only have a single globally unique instance of Seata Client at the same time, I am not sure how to write unit tests on the Seata side. See Seata Multi-Client Optimization #6614 .

Other related information

Add any other context or screenshots about the feature request here.

@wangliang181230
Copy link
Contributor

See #5234

Due to my recent busy work schedule, I don't have time to resolve a large number of conflicts. If someone could continue to maintain this PR, or create a new PR, that would be a great thing.

@linghengqian
Copy link
Member Author

See #5234

Due to my recent busy work schedule, I don't have time to resolve a large number of conflicts. If someone could continue to maintain this PR, or create a new PR, that would be a great thing.

  • Thanks for the clarification. I actually never used Spring Framework's own annotations to register GRM, because using Java API instead of JSON to define GRM part violates the portability promise made by OracleLabs on the GraalVM CE side, and I'm afraid I can't help much in the refactoring of the relevant PR.

@funky-eyes
Copy link
Contributor

See #5234
Due to my recent busy work schedule, I don't have time to resolve a large number of conflicts. If someone could continue to maintain this PR, or create a new PR, that would be a great thing.

  • Thanks for the clarification. I actually never used Spring Framework's own annotations to register GRM, because using Java API instead of JSON to define GRM part violates the portability promise made by OracleLabs on the GraalVM CE side, and I'm afraid I can't help much in the refactoring of the relevant PR.

I suggest that you can use tracing agent to achieve your goal. Currently we don't have manpower to invest in this feature. If any other community member is interested in this feature and could provide related PRs, I would appreciate it a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants