This is an automated email from the ASF dual-hosted git repository.

yasith pushed a commit to branch feat/grpc-armeria-migration
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 04409d3cd79d50a93205527c91592c5007dd9365
Author: yasithdev <[email protected]>
AuthorDate: Wed Apr 1 03:04:10 2026 -0400

    fix: add Spring bean annotations and fix dependency wiring for server 
startup
    
    - Create MessagingConfig to provide EventPublisher as a @Bean via 
MessagingFactory
    - Add @Autowired to ResourceSharingService primary constructor to resolve 
ambiguity
    - Remove @Service from ProcessDataManager (not a singleton bean, requires 
runtime args)
    - Add default value for grpc.server.host property in AgentManagementHandler
    - Downgrade protobuf from 4.30.1 to 3.25.8 for Armeria 1.31.3 compatibility
    - Add protobuf-java-util to dependency management to align versions
    - Broaden component scan to org.apache.airavata for full bean discovery
---
 Tiltfile                                           | 19 +++-----
 airavata-api/agent-service/pom.xml                 |  2 +-
 .../service/handlers/AgentManagementHandler.java   |  2 +-
 airavata-api/pom.xml                               |  2 +-
 airavata-api/research-service/pom.xml              |  2 +-
 .../airavata/messaging/config/MessagingConfig.java | 52 ++++++++++++++++++++++
 .../sharing/service/ResourceSharingService.java    |  2 +
 .../storage/service/ProcessDataManager.java        |  3 --
 .../apache/airavata/server/AiravataServerMain.java |  2 +-
 pom.xml                                            |  7 ++-
 10 files changed, 72 insertions(+), 21 deletions(-)

diff --git a/Tiltfile b/Tiltfile
index 2bc0b1dad8..c7e5c93539 100644
--- a/Tiltfile
+++ b/Tiltfile
@@ -7,40 +7,35 @@ docker_compose('./compose.yml')
 # --- Build ---
 local_resource(
     'build',
-    cmd='mvn install -DskipTests -T4 -q',
+    cmd='mvn install -DskipTests -Dmaven.test.skip=true -T4 -q',
     deps=[
         'airavata-api/src',
         'airavata-api/pom.xml',
-        'airavata-api/file-server/src',
-        'airavata-api/file-server/pom.xml',
         'airavata-api/agent-service/src',
         'airavata-api/agent-service/pom.xml',
         'airavata-api/research-service/src',
         'airavata-api/research-service/pom.xml',
-        'airavata-server/rest/src',
-        'airavata-server/rest/pom.xml',
-        'airavata-server/grpc/src',
-        'airavata-server/grpc/pom.xml',
         'airavata-server/src',
         'airavata-server/pom.xml',
     ],
+    ignore=['**/target/**'],
     labels=['build'],
 )
 
-# --- Airavata Server (unified: gRPC + REST via Armeria) ---
+# --- Airavata Server (unified: gRPC + REST via Armeria on port 9090) ---
 local_resource(
     'airavata-server',
     serve_cmd='java -jar 
airavata-server/target/airavata-server-0.21-SNAPSHOT.jar',
     readiness_probe=probe(
-        http_get=http_get_action(port=9090, path='/actuator/health'),
-        initial_delay_secs=20,
+        http_get=http_get_action(port=9090, path='/internal/actuator/health'),
+        initial_delay_secs=30,
         period_secs=5,
         timeout_secs=5,
     ),
     resource_deps=['build', 'db', 'rabbitmq', 'zookeeper', 'kafka', 
'keycloak'],
     links=[
-        link('http://localhost:9090/docs', 'API Docs'),
-        link('http://localhost:9090/actuator/health', 'Health'),
+        link('http://localhost:9090/docs', 'API Docs (Armeria DocService)'),
+        link('http://localhost:9090/internal/actuator/health', 'Health'),
     ],
     labels=['airavata'],
 )
diff --git a/airavata-api/agent-service/pom.xml 
b/airavata-api/agent-service/pom.xml
index 3a4c4e0898..98cbcb4bbb 100644
--- a/airavata-api/agent-service/pom.xml
+++ b/airavata-api/agent-service/pom.xml
@@ -146,7 +146,7 @@ under the License.
         <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <configuration>
-          <protocVersion>4.30.1</protocVersion>
+          <protocVersion>3.25.8</protocVersion>
           <sourceDirectories>
             
<sourceDirectory>${project.basedir}/src/main/proto</sourceDirectory>
           </sourceDirectories>
diff --git 
a/airavata-api/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java
 
b/airavata-api/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java
index b5b8cb8d69..c71f09212a 100644
--- 
a/airavata-api/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java
+++ 
b/airavata-api/agent-service/src/main/java/org/apache/airavata/agent/connection/service/handlers/AgentManagementHandler.java
@@ -58,7 +58,7 @@ public class AgentManagementHandler {
     private final ClusterApplicationConfig clusterApplicationConfig;
     private final AgentProperties agentProperties;
 
-    @Value("${grpc.server.host}")
+    @Value("${grpc.server.host:localhost}")
     private String grpcHost;
 
     public AgentManagementHandler(
diff --git a/airavata-api/pom.xml b/airavata-api/pom.xml
index 28ed28841e..bc6ccf1116 100644
--- a/airavata-api/pom.xml
+++ b/airavata-api/pom.xml
@@ -357,7 +357,7 @@ under the License.
               <goal>generate</goal>
             </goals>
             <configuration>
-              <protocVersion>4.30.1</protocVersion>
+              <protocVersion>3.25.8</protocVersion>
               <sourceDirectories>
                 
<sourceDirectory>${project.basedir}/src/main/proto</sourceDirectory>
               </sourceDirectories>
diff --git a/airavata-api/research-service/pom.xml 
b/airavata-api/research-service/pom.xml
index 973bc0ac01..e22b961894 100644
--- a/airavata-api/research-service/pom.xml
+++ b/airavata-api/research-service/pom.xml
@@ -150,7 +150,7 @@ under the License.
         <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <configuration>
-          <protocVersion>4.30.1</protocVersion>
+          <protocVersion>3.25.8</protocVersion>
           <sourceDirectories>
             
<sourceDirectory>${project.basedir}/src/main/proto</sourceDirectory>
           </sourceDirectories>
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/messaging/config/MessagingConfig.java
 
b/airavata-api/src/main/java/org/apache/airavata/messaging/config/MessagingConfig.java
new file mode 100644
index 0000000000..f992fbe9db
--- /dev/null
+++ 
b/airavata-api/src/main/java/org/apache/airavata/messaging/config/MessagingConfig.java
@@ -0,0 +1,52 @@
+/**
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.airavata.messaging.config;
+
+import org.apache.airavata.messaging.service.EventPublisher;
+import org.apache.airavata.messaging.service.MessagingFactory;
+import org.apache.airavata.messaging.service.Publisher;
+import org.apache.airavata.messaging.service.Type;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MessagingConfig {
+
+    private static final Logger logger = 
LoggerFactory.getLogger(MessagingConfig.class);
+
+    @Bean
+    public EventPublisher eventPublisher() {
+        Publisher statusPublisher = null;
+        Publisher experimentPublisher = null;
+        try {
+            statusPublisher = MessagingFactory.getPublisher(Type.STATUS);
+        } catch (Exception e) {
+            logger.warn("Failed to create status publisher — status events 
will be dropped: {}", e.getMessage());
+        }
+        try {
+            experimentPublisher = 
MessagingFactory.getPublisher(Type.EXPERIMENT_LAUNCH);
+        } catch (Exception e) {
+            logger.warn("Failed to create experiment publisher — experiment 
events will be dropped: {}", e.getMessage());
+        }
+        return new EventPublisher(statusPublisher, experimentPublisher);
+    }
+}
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/sharing/service/ResourceSharingService.java
 
b/airavata-api/src/main/java/org/apache/airavata/sharing/service/ResourceSharingService.java
index c6ef3f2de4..4ad8613e43 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/sharing/service/ResourceSharingService.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/sharing/service/ResourceSharingService.java
@@ -38,6 +38,7 @@ import org.apache.airavata.sharing.model.UserEntity;
 import org.apache.airavata.sharing.model.UserGroupEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
@@ -48,6 +49,7 @@ public class ResourceSharingService {
     private final SharingRegistryServerHandler sharingHandler;
     private final RegistryServerHandler registryHandler;
 
+    @Autowired
     public ResourceSharingService(SharingRegistryServerHandler sharingHandler, 
RegistryServerHandler registryHandler) {
         this.sharingHandler = sharingHandler;
         this.registryHandler = registryHandler;
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
 
b/airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
index c6a6d6a0bd..69980fd756 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
@@ -33,9 +33,6 @@ import 
org.apache.airavata.execution.handler.RegistryServerHandler;
 import org.apache.airavata.storage.task.OutputDataStagingTask;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-@Service
 public class ProcessDataManager extends OutputDataStagingTask {
 
     private static final Logger logger = 
LoggerFactory.getLogger(ProcessDataManager.class);
diff --git 
a/airavata-server/src/main/java/org/apache/airavata/server/AiravataServerMain.java
 
b/airavata-server/src/main/java/org/apache/airavata/server/AiravataServerMain.java
index bc6638342e..0bd6752e64 100644
--- 
a/airavata-server/src/main/java/org/apache/airavata/server/AiravataServerMain.java
+++ 
b/airavata-server/src/main/java/org/apache/airavata/server/AiravataServerMain.java
@@ -27,7 +27,7 @@ import 
org.springframework.boot.autoconfigure.domain.EntityScan;
 import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Import;
 
-@SpringBootApplication(scanBasePackages = {"org.apache.airavata.server", 
"org.apache.airavata.common.db"})
+@SpringBootApplication(scanBasePackages = {"org.apache.airavata"})
 @EntityScan("org.apache.airavata")
 @EnableConfigurationProperties(AiravataServerProperties.class)
 @Import(AiravataArmeriaConfig.class)
diff --git a/pom.xml b/pom.xml
index 1ba7b88d05..1463666e3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -284,7 +284,12 @@ under the License.
             <dependency>
                 <groupId>com.google.protobuf</groupId>
                 <artifactId>protobuf-java</artifactId>
-                <version>4.30.1</version>
+                <version>3.25.8</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java-util</artifactId>
+                <version>3.25.8</version>
             </dependency>
 
             <!-- Jackson -->

Reply via email to