fix: remove core LogIndexService to fix CI snapshot resolution
LogIndexService in server-core imported LogEntry from cameleer3-common, but the SNAPSHOT on the registry may not have it yet when the server CI runs. Moved the dependency to server-app where both the controller and OpenSearch implementation live. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package com.cameleer3.server.app.controller;
|
||||
|
||||
import com.cameleer3.common.model.LogBatch;
|
||||
import com.cameleer3.server.app.search.OpenSearchLogIndex;
|
||||
import com.cameleer3.server.core.agent.AgentInfo;
|
||||
import com.cameleer3.server.core.agent.AgentRegistryService;
|
||||
import com.cameleer3.server.core.logging.LogIndexService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -24,12 +24,12 @@ public class LogIngestionController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LogIngestionController.class);
|
||||
|
||||
private final LogIndexService logIndexService;
|
||||
private final OpenSearchLogIndex logIndex;
|
||||
private final AgentRegistryService registryService;
|
||||
|
||||
public LogIngestionController(LogIndexService logIndexService,
|
||||
public LogIngestionController(OpenSearchLogIndex logIndex,
|
||||
AgentRegistryService registryService) {
|
||||
this.logIndexService = logIndexService;
|
||||
this.logIndex = logIndex;
|
||||
this.registryService = registryService;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class LogIngestionController {
|
||||
|
||||
if (batch.getEntries() != null && !batch.getEntries().isEmpty()) {
|
||||
log.debug("Received {} log entries from agent={}, app={}", batch.getEntries().size(), agentId, application);
|
||||
logIndexService.indexBatch(agentId, application, batch.getEntries());
|
||||
logIndex.indexBatch(agentId, application, batch.getEntries());
|
||||
}
|
||||
|
||||
return ResponseEntity.accepted().build();
|
||||
|
||||
Reference in New Issue
Block a user