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

Completely prevent GraalVM Tracing Agent from collecting unreasonable GRM for unit tests related to org.apache.shardingsphere.test.natived.proxy.features.** #33206

Open
Tracked by #29052
linghengqian opened this issue Oct 10, 2024 · 1 comment

Comments

@linghengqian
Copy link
Member

linghengqian commented Oct 10, 2024

Feature Request

For English only, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

Describe the feature you would like.

  • GraalVM Tracing Agent is collecting unreasonable GRMs for unit tests related to org.apache.shardingsphere.test.natived.proxy.features.**.
  • Taking org.apache.shardingsphere.test.natived.proxy.features.ShardingTest as an example, using ./mvnw -PgenerateMetadata -DskipNativeTests -T 1C -e clean test native:metadata-copy will write some error GraalVM Reachability Metadata similar to the following to infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json.
     {
    "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader"},
    "pattern":"\\QcustomPath/shardingsphere/test/native/src/test/resources/test-native/yaml/proxy/databases/postgresql//global.yaml\\E"
  }, {
    "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader"},
    "pattern":"\\QcustomPath/shardingsphere/test/native/src/test/resources/test-native/yaml/proxy/databases/postgresql/\\E"
  }, {
    "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader"},
    "pattern":"\\QcustomPath/shardingsphere/test/native/src/test/resources/test-native/yaml/proxy/features/sharding//global.yaml\\E"
  }, {
    "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader"},
    "pattern":"\\QcustomPath/shardingsphere/test/native/src/test/resources/test-native/yaml/proxy/features/sharding/\\E"
  }
  • This is apparently because the unit test is generating an absolute path for the server side of ShardingSphere Proxy.
  • But in fact, there is no way to control the JSON content generated by GraalVM Tracing Agent for resource-config.json. The current solution is to require contributors to manually clean up this JSON in the documentation. This is independent of whether Safe Composition of Metadata is enabled.
  • The current issue aims to track the situation reported in Native image agent configuration filtering not working well for resources configuration oracle/graal#8417 and find a way to control the generated content of resource-config.json.
@linghengqian
Copy link
Member Author

  • I am working on the current issue.

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

No branches or pull requests

1 participant