Skip to content

Conversation

@Hailong-am
Copy link
Contributor

@Hailong-am Hailong-am commented Nov 25, 2025

Description

Fix NPE for constructing tool parameters

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Hailong-am Hailong-am changed the base branch from main to feature/3.4-release-prep November 25, 2025 03:40
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 03:42 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 03:42 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 03:42 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 03:42 — with GitHub Actions Waiting
Signed-off-by: Hailong Cui <[email protected]>
@Hailong-am Hailong-am force-pushed the feature/3.4-release-prep branch from c2e6b53 to 2392ea7 Compare November 25, 2025 03:43
@Hailong-am Hailong-am changed the title feature/3.4 release prep Fix tenant id null casue NPE Nov 25, 2025
@Hailong-am Hailong-am marked this pull request as ready for review November 25, 2025 03:44
@Hailong-am Hailong-am had a problem deploying to ml-commons-cicd-env-require-approval November 25, 2025 03:44 — with GitHub Actions Failure
@Hailong-am Hailong-am had a problem deploying to ml-commons-cicd-env-require-approval November 25, 2025 03:44 — with GitHub Actions Error
@Hailong-am Hailong-am had a problem deploying to ml-commons-cicd-env-require-approval November 25, 2025 03:44 — with GitHub Actions Error
@Hailong-am Hailong-am had a problem deploying to ml-commons-cicd-env-require-approval November 25, 2025 03:44 — with GitHub Actions Failure
@ylwu-amzn
Copy link
Collaborator

Can you check if ./gradlew test can pass locally?

@xinyual
Copy link
Collaborator

xinyual commented Nov 25, 2025

@ylwu-amzn The error should be caused by my change in remote sdk. Should be fixed after this pr: opensearch-project/opensearch-remote-metadata-sdk#297

@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 07:32 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 07:32 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 07:32 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 07:32 — with GitHub Actions Waiting
Signed-off-by: Hailong Cui <[email protected]>
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 10:14 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 10:14 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 10:14 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 25, 2025 10:14 — with GitHub Actions Waiting
@jiapingzeng jiapingzeng mentioned this pull request Nov 26, 2025
5 tasks
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 00:39 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 00:39 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 00:39 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 00:39 — with GitHub Actions Waiting
@Hailong-am
Copy link
Contributor Author

Can you check if ./gradlew test can pass locally?

All test are passed locally

➜  ml-commons git:(feature/3.4-release-prep) ./gradlew test
Starting a Gradle Daemon (subsequent builds will be faster)
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.14.3
  OS Info               : Linux 5.10.245-243.979.amzn2int.x86_64 (amd64)
  JDK Version           : 21 (Amazon Corretto JDK)
  JAVA_HOME             : /usr/lib/jvm/java-21-amazon-corretto
  Random Testing Seed   : 6C2C7B98A44BFCAC
  Crypto Standard       : any-supported
=======================================

> Task :opensearch-ml-common:compileJava
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/transport/mcpserver/requests/register/MLMcpToolsRegisterNodeRequest.java:32: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@Data
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/transport/mcpserver/requests/update/MLMcpToolsUpdateNodeRequest.java:25: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@Data
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/model/LocalRegexGuardrail.java:50: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/input/parameter/textembedding/AsymmetricTextEmbeddingParameters.java:39: warning: Not generating hashCode: One of equals or hashCode exists. You should either write both of these or none of these (in the latter case, lombok generates them).
@Data
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/connector/HttpConnector.java:54: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/model/ModelGuardrail.java:51: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/transport/mcpserver/requests/remove/MLMcpToolsRemoveNodeRequest.java:18: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@Data
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/connector/AwsConnector.java:28: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/utils/StringUtils.java:286: warning: [removal] AccessController in java.security has been deprecated and marked for removal
                AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
                ^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/model/LocalRegexGuardrail.java:228: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            queryBody = AccessController.doPrivileged((PrivilegedExceptionAction<String>) () -> gson.toJson(queryBodyMap));
                        ^
/local/home/ihailong/code/ml-commons/common/src/main/java/org/opensearch/ml/common/model/ModelGuardrail.java:111: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            String guardrailResponse = AccessController
                                       ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 warnings

> Task :opensearch-ml-memory:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /local/home/ihailong/code/ml-commons/memory/src/main/java/org/opensearch/ml/memory/action/conversation/CreateConversationRequest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-algorithms:compileJava
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/memory/ConversationIndexMessage.java:17: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@Data
^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/McpSseTool.java:37: warning: Not generating setName(): A method with that name already exists
    private String name = TYPE;
                   ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/McpSseTool.java:36: warning: Not generating getName(): A method with that name already exists
    @Getter
    ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/McpStreamableHttpTool.java:38: warning: Not generating setName(): A method with that name already exists
    private String name = TYPE;
                   ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/McpStreamableHttpTool.java:37: warning: Not generating getName(): A method with that name already exists
    @Getter
    ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/AgentTool.java:45: warning: Not generating setName(): A method with that name already exists
    private String name = TYPE;
                   ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/AgentTool.java:44: warning: Not generating getName(): A method with that name already exists
    @Getter
    ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/MLModelTool.java:48: warning: Not generating setName(): A method with that name already exists
    private String name = TYPE;
                   ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/MLModelTool.java:47: warning: Not generating getName(): A method with that name already exists
    @Getter
    ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/S3Utils.java:33: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            S3Client s3 = AccessController
                          ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/S3Utils.java:49: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
            ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/streaming/HttpStreamingHandler.java:72: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
            ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/streaming/HttpStreamingHandler.java:97: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
            ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/ingest/OpenAIDataIngestion.java:74: warning: [removal] AccessController in java.security has been deprecated and marked for removal
                InputStreamReader inputStreamReader = AccessController
                                                      ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/ingest/S3DataIngestion.java:85: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            ResponseInputStream<GetObjectResponse> s3is = AccessController
                                                          ^
/local/home/ihailong/code/ml-commons/ml-algorithms/src/main/java/org/opensearch/ml/engine/analysis/DJLUtils.java:37: warning: [removal] AccessController in java.security has been deprecated and marked for removal
        return AccessController.doPrivileged((PrivilegedExceptionAction<T>) () -> {
               ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
16 warnings

> Task :opensearch-ml-algorithms:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

> Task :opensearch-ml-client:compileTestJava
Note: /local/home/ihailong/code/ml-commons/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /local/home/ihailong/code/ml-commons/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

> Task :opensearch-ml-common:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-memory:compileTestJava
Note: /local/home/ihailong/code/ml-commons/memory/src/test/java/org/opensearch/ml/memory/action/conversation/CreateConversationRequestTests.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-search-processors:compileJava
Note: /local/home/ihailong/code/ml-commons/search-processors/src/main/java/org/opensearch/searchpipelines/questionanswering/generative/llm/MessageBlock.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-plugin:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-plugin:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :opensearch-ml-search-processors:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

[Incubating] Problems report is available at: file:///local/home/ihailong/code/ml-commons/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 10m 17s
49 actionable tasks: 43 executed, 6 up-to-date
➜  ml-commons git:(feature/3.4-release-prep) 

@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:40 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:40 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:40 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:40 — with GitHub Actions Waiting
This reverts commit 8b0194c.

Signed-off-by: Hailong Cui <[email protected]>
@Hailong-am Hailong-am force-pushed the feature/3.4-release-prep branch from b282156 to 0693f80 Compare November 26, 2025 02:41
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:43 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:43 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:43 — with GitHub Actions Waiting
@Hailong-am Hailong-am requested a deployment to ml-commons-cicd-env-require-approval November 26, 2025 02:43 — with GitHub Actions Waiting
@ylwu-amzn ylwu-amzn merged commit c2266a8 into opensearch-project:feature/3.4-release-prep Nov 26, 2025
5 of 9 checks passed
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

Successfully merging this pull request may close these issues.

4 participants