yasithdev opened a new pull request, #594:
URL: https://github.com/apache/airavata/pull/594
## Summary
Extracts all business logic from `AiravataServerHandler` into a
transport-agnostic service layer (`org.apache.airavata.service.*`), enabling
future REST/gRPC transports without duplicating logic.
- **14 service classes** covering all domains (experiments, projects,
gateways, credentials, app catalog, resources, sharing, profiles, parsers, SSH
accounts, data products, notifications)
- **`ThriftAdapter`** utility eliminates boilerplate try/catch and
`RequestContext` construction — handler methods are one-liner delegates
- **`SharingHelper`** consolidates duplicated sharing utilities across
services
- **`RequestContext`** provides transport-agnostic identity (userId,
gatewayId, claims)
- **`EventPublisher`** wraps RabbitMQ messaging with typed methods
- **136 unit tests** across 15 test files (Mockito-based, all passing)
- **Integration test infrastructure**: `AbstractIntegrationTest` base with
Testcontainers MariaDB, surefire tag filtering (`@Tag("integration")`)
- **Handler reduced 55%**: 6,853 → 3,114 lines; 190 methods delegate through
`ThriftAdapter`
- Constructor side effects (`initSharingRegistry`, `postInitDefaultGateway`)
extracted to `initialize()` method
- Dockerfile updated: removed obsolete per-service ports (all Thrift
multiplexed on 8930)
- Spotless formatting applied
## Architecture
```
Thrift Handler (thin adapter)
└─ ThriftAdapter.execute(authzToken, gatewayId, ctx -> service.method(ctx,
args))
└─ RequestContext (transport-agnostic identity)
└─ Service Layer (business logic, sharing checks, event
publishing)
└─ RegistryServerHandler / SharingRegistryServerHandler
(persistence)
```
## Test plan
- [x] All 136 service-layer unit tests pass (`mvn test
-DexcludedGroups=integration`)
- [x] `mvn compile` succeeds for full project
- [x] Server boots from clean state with `docker compose up -d` + `mvn
exec:java` (verified: DB init, RabbitMQ, ZooKeeper all connect)
- [x] Thrift interface unchanged — existing clients see no difference
- [ ] Integration tests with `mvn test -Dgroups=integration
-DexcludedGroups=""` (requires Docker)
🤖 Generated with [Claude Code](https://claude.ai/code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]