This is an automated email from the ASF dual-hosted git repository. yasith pushed a commit to branch cybershuttle-staging in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 71bac95f5a87e6da51fb601cd3c86bee87e1bea4 Author: yasith <[email protected]> AuthorDate: Sat Apr 5 20:56:32 2025 -0400 update AgentManagementHandler to send libraries, pip, and mounts in the Agent launch request. --- .../service/handlers/AgentManagementHandler.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/agent-framework/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java b/modules/agent-framework/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java index b8d6645c27..fb3b6900a5 100644 --- a/modules/agent-framework/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java +++ b/modules/agent-framework/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java @@ -164,13 +164,15 @@ public class AgentManagementHandler { List<InputDataObjectType> applicationInputs = airavataClient.getApplicationInputs(authzToken, appInterfaceId); List<InputDataObjectType> experimentInputs = applicationInputs.stream() .peek(input -> { - switch (input.getName()) { - case "agent_id" -> input.setValue(agentId); - case "server_url" -> input.setValue(airavataService.getServerUrl()); - case "libraries" -> input.setValue(String.join(",", req.getLibraries())); - case "pip" -> input.setValue(String.join(",", req.getPip())); - case "mounts" -> input.setValue(String.join(",", req.getMounts())); - default -> {} + if (input != null && input.getName() != null) { + switch (input.getName()) { + case "agent_id" -> input.setValue(agentId); + case "server_url" -> input.setValue(airavataService.getServerUrl()); + case "libraries" -> input.setValue(req.getLibraries() != null ? String.join(",", req.getLibraries()) : ""); + case "pip" -> input.setValue(req.getPip() != null ? String.join(",", req.getPip()) : ""); + case "mounts" -> input.setValue(req.getMounts() != null ? String.join(",", req.getMounts()) : ""); + default -> {} + } } }) .collect(Collectors.toList());
