Skip to content

cleanup: lean core — remove dead code, prune deps, restructure dev-tools#602

Merged
yasithdev merged 24 commits intomasterfrom
worktree-cleanup+lean-core
Mar 30, 2026
Merged

cleanup: lean core — remove dead code, prune deps, restructure dev-tools#602
yasithdev merged 24 commits intomasterfrom
worktree-cleanup+lean-core

Conversation

@yasithdev
Copy link
Copy Markdown
Contributor

@yasithdev yasithdev commented Mar 30, 2026

Summary

Post-server-collapse cleanup to make the core lean, fix the cold-start flow, and align all docs/scripts with the unified server architecture.

Dead code & module removal

  • Dead dev-tools removed: PHP SDK, job-status-rest-server, amqpwstunnel, simstream
  • airavata-python-sdk promoted to top-level directory
  • Load-client consolidated: Java load-client + 2 standalone Python scripts → single Python CLI tool
  • airavata-fuse deleted (zero dependencies)
  • Examples cleaned: PHP samples, empty stubs, outdated Java samples removed; README added

@deprecated cleanup

  • 3 items fully deleted (MessagingConstants, CredentialOwnerType, getAbsoluteSetting)
  • 12 un-deprecated (Thrift interface methods — can't remove without IDL changes)

TODOs/FIXMEs

  • 18 stale comments removed, 67 remain as valid issues

Dependency & config pruning

  • ~10 unused Maven dependencies removed, JDBC drivers corrected to runtime scope
  • Stale IntelliJ run configs, logback logger refs, dead Docker build pipeline removed
  • Jandex version conflict fixed (exclude old 2.x from keycloak-admin-client)
  • Docker image tags pinned (zookeeper, kafka, adminer)

Unified server cold-start fixes

  • Fat JAR: Added spring-boot-maven-plugin repackage goal
  • Actuator: Added spring-boot-starter-actuator for /actuator/health
  • Bean collision: Explicit names for agent/research AiravataService
  • EMF ordering: BackgroundServicesConfig depends on EntityManagerFactoryRegistrar
  • Hibernate 6.6 compatibility: Manual EntityManagerFactory with PhysicalNamingStrategyStandardImpl + packagesToScan (avoids DuplicateMappingException on shared @Id/@joincolumn columns)
  • Config consolidation: Merged split profile YMLs into single application.yml
  • Missing property: Added grpc.server.host
  • Scripts fixed: start.sh uses java -jar, setup.sh builds full project

Docs & deployment scripts

  • README.md: Rewritten for unified server (architecture diagram, startup commands, port table, module paths)
  • Dockerfile: Rewritten for single fat JAR
  • INSTALL: Updated port listing
  • Deployment scripts: All updated for single tarball/single service (services_up/down, distribution_update/backup, docker-startup)
  • Ansible: Consolidated 5 deploy tasks → 1, deleted old templates, updated defaults
  • Properties audit: Removed 4 dead properties, added 4 missing ones, aligned Ansible template

Verified running state

  • Thrift on :8930 (9 multiplexed services)
  • REST on :18889 (Swagger UI, Actuator health)
  • gRPC on :19900
  • Monitoring on :9097 (8 background services all UP)
  • 179 tests pass (0 failures)

Known follow-up work (not in this PR)

  1. Monitoring server consolidation — 4 per-service MonitoringServer instances (ports 9093-9096) are redundant with the unified MonitoringServer on 9097. All run in one JVM now. Consolidate to single endpoint.
  2. JDBC config migrationairavata-server.properties has airavata.jdbc.* AND application.yml has spring.datasource.*. Both connect to the same DB. Migrate legacy code to use Spring-managed datasource.
  3. Kafka image swapwurstmeister/kafka is unmaintained (last updated 2021). Switch to apache/kafka or bitnami/kafka.
  4. Hibernate 6.6 entity mapping — 23 entities have @Id/@joincolumn sharing same column. Currently bypassed via PhysicalNamingStrategyStandardImpl + manual EMF. Proper fix: refactor entity mappings to be Hibernate 6 compliant, then switch back to Spring Boot auto-configured JPA.

Test plan

  • mvn test -T4 — 179 tests, 0 failures
  • go build ./... + go vet ./... in airavata-agent/
  • Cold start: java -jar airavata-server.jar → all 4 ports listening, all 8 services UP
  • /actuator/health{"status":"UP"}
  • /health/services → 8 services UP, 0 errors
  • Swagger UI accessible at :18889
  • No stale references to deleted modules

561 files changed, 908 insertions, 168,984 deletions

🤖 Generated with Claude Code

yasithdev and others added 24 commits March 30, 2026 07:17
…ts, delete old Java source

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the @deprecated CredentialOwnerType enum (GATEWAY/USER) and the
corresponding credentialOwnerType field from Credential. Updates CredentialsDAO
to omit CREDENTIAL_OWNER_TYPE from INSERT/UPDATE and stop reading it on SELECT.
Removes owner-type filter logic from the two @deprecated summary handler methods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… implementations

- Remove @deprecated annotations from getAllCredentialSummaryForGateway,
  getAllCredentialSummaryForUserInGateway, and getAllPWDCredentialsForGateway
- Fix getAllCredentialSummaryForUserInGateway: was scanning all credentials
  globally instead of per-gateway (correctness bug)
- Refactor all three methods to reuse existing isSSHCredential,
  isPasswordCredential, and convertToCredentialSummary helpers
- Return Collections.emptyList() instead of null for unsupported types
- Remove unused sshKeyMap local variables

No replacement API exists for the "get all without token filter" use case;
these methods remain as valid implementations of CredentialStoreService.Iface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…AppInterfaceComputeResources

Both methods are required by the Thrift-generated Airavata interface and
cannot be removed. Dropped @deprecated from AiravataServerHandler and
removed the stale FIXME comments from the Thrift IDL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hRole

All three methods are defined in the Thrift IDL (iam-admin-services-cpi.thrift)
and cannot be removed. Remove spurious @deprecated annotations from
IamAdminServicesHandler and TenantManagementInterface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cePreference, getAbsoluteSetting)

- Delete getAbsoluteSetting() from ApplicationSettings — no external callers, only self-recursive; also removes dead private helpers getAllMatches, getVariableNameOnly, REGULAR_EXPRESSION constant, and unused Matcher import
- Un-deprecate getGatewayStorageResourcePreference() in TaskContext — still needed as the default fallback for getStorageResourceId/LoginUserName/FileSystemRootLocation; replacement variants (input/output specific) delegate back to it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sues for rest

Removed 18 stale/redundant TODO/FIXME comments (85 → 67):
- JSONUtil.isEqual: method was already implemented, remove errant TODO
- AppDeploymentUtil: remove commented-out setModuleLoadCmd + TODO
- CredentialReaderImpl/CommunityUserDAO: remove bare TODOs from empty methods
- CommunityUserDAO: remove 3x "fix typo" TODOs (column name was already correct)
- PBSEmailParser: remove old XSEDE/RabbitMQ infra reference
- AbstractTask.publishErrors: remove kafka TODO above bare e.printStackTrace()
- SshAgentAdaptor: remove "FIXME: Redundant" on live error-check code
- SharingServiceDBEventHandler: remove "FIXME: Remove if not required" from empty READ case
- OrchestratorServerHandler: remove 3x "TODO deprecate gfac" (gfac is gone)
- OrchestratorServerHandler: remove FIXME + entirely commented-out workflow enactment body
- GroovyMapBuilder: remove 2x "TODO fix this" wrapping dead LSF commented-out code
- LocalJobSubmissionTask: remove "TODO fix this" + entire dead gfac submission block

Remaining 67 are tracked as ISSUE (genuine missing features, security concerns,
performance notes, and arch decisions out of scope for this cleanup sweep).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- airavata-api: remove httpclient5/httpcore5 (code uses httpclient4),
  jakarta.transaction/servlet/jms APIs, hibernate-validator,
  simpleclient_hotspot/httpserver/pushgateway, contiperf, aws:retries;
  add explicit simpleclient_common (was used undeclared via httpserver);
  scope mariadb-java-client as runtime
- agent-service: scope mariadb-java-client as runtime
- research-service: scope mariadb-java-client as runtime; remove
  javax.validation:validation-api (superseded by jakarta.validation)
- airavata-server-grpc: remove redundant spring-boot-starter-data-jpa,
  spring-boot-starter-actuator, mariadb-java-client (all transitive)
- airavata-server-rest: same removals as grpc
- root pom: remove corresponding dependencyManagement entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…config consolidation

- Add spring-boot-maven-plugin repackage goal to produce executable fat JAR
- Add spring-boot-starter-actuator for /actuator/health endpoint
- Fix bean name collision: explicit names for agent/research AiravataService
- Fix EMF ordering: BackgroundServicesConfig depends on EntityManagerFactoryRegistrar
- Configure manual EntityManagerFactory with PhysicalNamingStrategyStandardImpl
  to avoid Hibernate 6.6 DuplicateMappingException on shared @Id/@joincolumn columns
- Exclude HibernateJpaAutoConfiguration (manual EMF with packagesToScan instead)
- Consolidate split profile YMLs (thrift/rest/grpc) into single application.yml
  (they were never activated as Spring profiles)
- Add grpc.server.host property (was missing, caused startup failure)
- Fix Jandex version conflict: exclude old jandex 2.x from keycloak-admin-client
- Fix scripts/start.sh: use java -jar (fat JAR) instead of broken classpath approach
- Fix scripts/setup.sh: build full project, not just airavata-api

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…itecture

- README: Replace separate microservices architecture with unified server
  description. Fix entry point, manual start commands, module paths,
  config file location, port table. Remove references to REST Proxy.
- INSTALL: List all four server ports (Thrift, REST, gRPC, Monitoring)
- Dockerfile: Rewrite for single fat JAR instead of separate service
  tarballs. Fix health check to use monitoring endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete .run/ IDE configs referencing non-existent *ServiceApplication classes
  (services are now embedded in unified server, no standalone entry points)
- Delete distribution/ dirs from file-server, agent-service, research-service
  (standalone distribution tarballs replaced by unified server fat JAR)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… Tiltfile

- README: fix background services count (12, not 8)
- Tiltfile: remove redundant -am flag from root build and test commands
- compose.yml: pin zookeeper (3.9), kafka (2.13-2.8.1), adminer (4) — no more :latest
- load_client.py: add comment clarifying dev environment defaults

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 5-service deployment model with single airavata-server-0.21-SNAPSHOT
unified server across all shell scripts, Ansible tasks, and defaults.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…architecture

- Delete deploy_api_server.yml (replaced by deploy_airavata_server.yml)
- Delete config templates for agent-service, file-server, research-service,
  restproxy (all now embedded in unified server's application.yml)
- Remove unused ansible variables for separate service configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ipts, stale config

- Delete airavata-api/src/main/resources/distribution/ (old standalone launcher scripts)
- Delete airavata-api/src/main/docker/ (old separate api-server Docker image)
- Remove dead Docker build plugins (maven-resources-plugin, docker-maven-plugin)
  and properties from airavata-api/pom.xml
- Remove dead apiserver.class property from airavata-server.properties
- Remove stale modules/research-framework/compose from .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mplate

Dead (removed):
- api.server.monitoring.enabled/host/port — never read by code
- db_event_manager.class — never read by code

Missing (added with defaults):
- data.parser.broker.publisher.id=ParsingPublisher
- max.archive.size=21474836480 (20GB, matches ArchiveTask constant)
- parser.workflow.manager.monitoring.host=localhost
- parser.workflow.manager.monitoring.port=9095

Also:
- Remove dead airavata.user-profile.server from application.yml
- Align ansible template with same changes
- Remove dead ansible vars (api_server_monitoring_host, db_event_manager_class)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant