diff --git a/alfa-client/apps/alfa-e2e/docker-compose.yml b/alfa-client/apps/alfa-e2e/docker-compose.yml index 5bfa1deb80297c4a9e4c905b5818c64e65777e85..5dc3600cd2be974c373528861fef63636e9a605d 100644 --- a/alfa-client/apps/alfa-e2e/docker-compose.yml +++ b/alfa-client/apps/alfa-e2e/docker-compose.yml @@ -61,7 +61,6 @@ services: image: docker.ozg-sh.de/alfa:${ALFA_DOCKER_IMAGE:-snapshot-latest} platform: linux/amd64 environment: - - GRPC_CLIENT_PLUTO_ADDRESS=static://vorgang-manager:9090 # TODO: Entfernen sobald GRPC_CLIENT_VORGANG-MANAGER_ADDRESS existiert - GRPC_CLIENT_USER-MANAGER_ADDRESS=static://user-manager:9000 - GRPC_CLIENT_USER-MANAGER_NEGOTIATION_TYPE=PLAINTEXT - GRPC_CLIENT_VORGANG-MANAGER_ADDRESS=static://vorgang-manager:9090 diff --git a/alfa-server/src/main/resources/application-oc.yml b/alfa-server/src/main/resources/application-oc.yml index 889b8c56da460a4351eb7dda8201282ca4760f27..ed155e15aaf8a583d74cb6a4fde849536f34caa2 100644 --- a/alfa-server/src/main/resources/application-oc.yml +++ b/alfa-server/src/main/resources/application-oc.yml @@ -7,7 +7,7 @@ spring: grpc: client: - pluto: + vorgang-manager: address: static://172.30.125.177:9090 logging: diff --git a/alfa-server/src/main/resources/application.yml b/alfa-server/src/main/resources/application.yml index 3439f8e572f4394b839aad7bb2991652529fb567..5d23bb377e0e87d553a1d1b52f08e9ed97b32136 100644 --- a/alfa-server/src/main/resources/application.yml +++ b/alfa-server/src/main/resources/application.yml @@ -55,7 +55,7 @@ management: grpc: client: - pluto: + vorgang-manager: address: static://127.0.0.1:9090 negotiationType: PLAINTEXT user-manager: diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/GrpcUtil.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/GrpcUtil.java index 46689411c040cd99a6caaddac42cd65b7d221862..d11d5297b8373ad3d84900333a7f996c7e2db650 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/common/GrpcUtil.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/GrpcUtil.java @@ -36,7 +36,7 @@ import lombok.NoArgsConstructor; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class GrpcUtil { - public static final String VORGANG_MANAGER_GRPC_CLIENT = "pluto"; + public static final String VORGANG_MANAGER_GRPC_CLIENT = "vorgang-manager"; public static final String SERVICE_KEY = "GRPC_SERVICE"; diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/binaryfile/BinaryFileRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/binaryfile/BinaryFileRemoteService.java index ed69dbdc03704b9ee9b1201f997050f1c48a74ef..cfce2e02b3de4a19f6d0a62bea16bfa996d27fba 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/common/binaryfile/BinaryFileRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/binaryfile/BinaryFileRemoteService.java @@ -37,6 +37,7 @@ import org.springframework.stereotype.Service; import com.google.protobuf.ByteString; import de.itvsh.kop.common.errorhandling.TechnicalException; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.alfa.common.callcontext.ContextService; import de.ozgcloud.alfa.common.file.OzgFile; import de.ozgcloud.alfa.common.file.OzgFileMapper; @@ -53,9 +54,9 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class BinaryFileRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private BinaryFileServiceBlockingStub serviceStub; - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private BinaryFileServiceStub asyncServiceStub; @Autowired private OzgFileMapper mapper; diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/command/CommandRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/command/CommandRemoteService.java index 32407d5266ea7c2aead94a021c6af1d10bdecee7..cdba01718e1ed65052f6db187e8cf3d7c8153a1c 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/common/command/CommandRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/command/CommandRemoteService.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.alfa.common.callcontext.ContextService; import de.ozgcloud.alfa.vorgang.forwarding.RedirectRequest; import de.ozgcloud.vorgang.common.grpc.GrpcObjectMapper; @@ -48,7 +49,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service public class CommandRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private CommandServiceBlockingStub commandServiceStub; @Autowired private CommandMapper mapper; diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/file/OzgFileRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/file/OzgFileRemoteService.java index e19127ec39472a948faaf5e84aeb9fa2537b97ba..6b1577082e0c2bdc7d53344547265a77ad5e452e 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/common/file/OzgFileRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/file/OzgFileRemoteService.java @@ -28,6 +28,7 @@ import java.util.stream.Stream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.alfa.common.callcontext.ContextService; import de.ozgcloud.vorgang.grpc.file.FileServiceGrpc.FileServiceBlockingStub; import de.ozgcloud.vorgang.grpc.file.GrpcGetAttachmentsRequest; @@ -37,7 +38,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service public class OzgFileRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private FileServiceBlockingStub fileServiceStub; @Autowired private ContextService contextService; diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachMailRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachMailRemoteService.java index d39bb9819fce3aabd7e6b81c9ec5bb957f03507c..dc0314670de3ec3f6490d16f5ca9fcb3562d76c2 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachMailRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachMailRemoteService.java @@ -29,6 +29,7 @@ import java.util.stream.Stream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.alfa.common.callcontext.ContextService; import de.ozgcloud.nachrichten.postfach.GrpcFindPostfachMailRequest; import de.ozgcloud.nachrichten.postfach.GrpcFindPostfachMailsRequest; @@ -40,7 +41,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class PostfachMailRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private PostfachServiceBlockingStub serviceStub; @Autowired private ContextService contextService; diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapper.java b/alfa-service/src/main/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapper.java index 143cdfe3ab199982acde5bf06fcfa442b2372847..4b96a4e5bbd94acb6f0c921afdc66daf7f592fde 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapper.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapper.java @@ -30,5 +30,5 @@ import de.ozgcloud.vorgang.system.GrpcGetSystemStatusResponse; @Mapper interface RemoteSystemStatusMapper { - PlutoSystemStatus fromGrpc(GrpcGetSystemStatusResponse systemStatusResponse); + VorgangManagerSystemStatus fromGrpc(GrpcGetSystemStatusResponse systemStatusResponse); } diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/system/SystemStatusRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/system/SystemStatusRemoteService.java index 6f0001a6fee7ac28c95b69cecd8b8ed7cfd099d7..c35d5fa202ca740842921c4b090e886b66a2b99f 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/system/SystemStatusRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/system/SystemStatusRemoteService.java @@ -26,6 +26,7 @@ package de.ozgcloud.alfa.system; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.vorgang.system.GrpcGetSystemStatusRequest; import de.ozgcloud.vorgang.system.SystemStatusServiceGrpc.SystemStatusServiceBlockingStub; import net.devh.boot.grpc.client.inject.GrpcClient; @@ -33,12 +34,12 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service class SystemStatusRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private SystemStatusServiceBlockingStub systemStatusBlockingStub; @Autowired private RemoteSystemStatusMapper remoteSystemStatusMapper; - public PlutoSystemStatus getSystemStatus() { + public VorgangManagerSystemStatus getSystemStatus() { var systemStatusResponse = systemStatusBlockingStub.getSystemStatus(GrpcGetSystemStatusRequest.newBuilder().build()); return remoteSystemStatusMapper.fromGrpc(systemStatusResponse); } diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/system/PlutoSystemStatus.java b/alfa-service/src/main/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatus.java similarity index 89% rename from alfa-service/src/main/java/de/ozgcloud/alfa/system/PlutoSystemStatus.java rename to alfa-service/src/main/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatus.java index c5f3a013edb9d6ae264f2167b11fdecd6bc89f64..942442f8f2b0e88741da03878f6975a74ed7f261 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/system/PlutoSystemStatus.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatus.java @@ -26,5 +26,5 @@ package de.ozgcloud.alfa.system; import lombok.Builder; @Builder -public record PlutoSystemStatus(boolean isSearchServerAvailable, String javaVersion, String buildVersion) { +public record VorgangManagerSystemStatus(boolean isSearchServerAvailable, String javaVersion, String buildVersion) { } diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/vorgang/forwarding/ForwardingRemoteService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/vorgang/forwarding/ForwardingRemoteService.java index 758d33543feba04b3c77049fa4c9e0f39afe5c69..bc9da9a41579b564b6c384a60325fe3b6dfcb1af 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/vorgang/forwarding/ForwardingRemoteService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/vorgang/forwarding/ForwardingRemoteService.java @@ -28,6 +28,7 @@ import java.util.stream.Stream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import de.ozgcloud.alfa.common.GrpcUtil; import de.ozgcloud.alfa.common.callcontext.ContextService; import de.ozgcloud.vorgang.forwarding.ForwardingServiceGrpc.ForwardingServiceBlockingStub; import de.ozgcloud.vorgang.forwarding.GrpcFindForwardingsRequest; @@ -36,7 +37,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient; @Service public class ForwardingRemoteService { - @GrpcClient("pluto") + @GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) private ForwardingServiceBlockingStub serviceStub; @Autowired diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/system/GrpcGetSystemStatusResponseTestFactory.java b/alfa-service/src/test/java/de/ozgcloud/alfa/system/GrpcGetSystemStatusResponseTestFactory.java index 577949f83e3596eaf511832f85f72eb2efd3b318..b7f0492b7377e5c1dea84b4f6430ca79cd9be2fa 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/system/GrpcGetSystemStatusResponseTestFactory.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/system/GrpcGetSystemStatusResponseTestFactory.java @@ -34,7 +34,7 @@ public class GrpcGetSystemStatusResponseTestFactory { public static GrpcGetSystemStatusResponse.Builder createBuilder() { return GrpcGetSystemStatusResponse.newBuilder() .setIsSearchServerAvailable(true) - .setJavaVersion(PlutoSystemStatusTestFactory.JAVA_VERSION) - .setBuildVersion(PlutoSystemStatusTestFactory.BUILD_VERSION); + .setJavaVersion(VorgangManagerSystemStatusTestFactory.JAVA_VERSION) + .setBuildVersion(VorgangManagerSystemStatusTestFactory.BUILD_VERSION); } } diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapperTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapperTest.java index 08ac44c26886a27134e81ad7d6616d2c86153143..edcb8720ef1a9ae032b0769232c0ca3eee9c0959 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapperTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/system/RemoteSystemStatusMapperTest.java @@ -34,10 +34,10 @@ class RemoteSystemStatusMapperTest { private RemoteSystemStatusMapper mapper = Mappers.getMapper(RemoteSystemStatusMapper.class); @Test - @DisplayName("should map gRPC response to PlutoSystemStatus") + @DisplayName("should map gRPC response to VorgangManagerSystemStatus") void shouldMapGrpcResponse() { - var plutoSystemStatus = mapper.fromGrpc(GrpcGetSystemStatusResponseTestFactory.create()); + var vorgangManagerSystemStatus = mapper.fromGrpc(GrpcGetSystemStatusResponseTestFactory.create()); - assertThat(plutoSystemStatus).isEqualTo(PlutoSystemStatusTestFactory.create()); + assertThat(vorgangManagerSystemStatus).isEqualTo(VorgangManagerSystemStatusTestFactory.create()); } } \ No newline at end of file diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusRemoteServiceTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusRemoteServiceTest.java index 790b0d5b03a6d556025029a2e2d925798a7d6a28..f4ecb30bd872a2a21909e3b625bf301fea87a323 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusRemoteServiceTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusRemoteServiceTest.java @@ -50,11 +50,11 @@ class SystemStatusRemoteServiceTest { class TestGetSystemStatus { private static final GrpcGetSystemStatusRequest SYSTEM_STATUS_REQUEST = GrpcGetSystemStatusRequest.newBuilder().build(); - private static final PlutoSystemStatus PLUTO_SYSTEM_STATUS = PlutoSystemStatusTestFactory.create(); + private static final VorgangManagerSystemStatus VORGANG_MANAGER_SYSTEM_STATUS = VorgangManagerSystemStatusTestFactory.create(); @BeforeEach void init() { - when(mapper.fromGrpc(any())).thenReturn(PLUTO_SYSTEM_STATUS); + when(mapper.fromGrpc(any())).thenReturn(VORGANG_MANAGER_SYSTEM_STATUS); } @Test @@ -68,9 +68,9 @@ class SystemStatusRemoteServiceTest { void shouldGetSearchServerStatus() { when(serviceStub.getSystemStatus(any())).thenReturn(GrpcGetSystemStatusResponseTestFactory.create()); - var plutoSystemStatus = service.getSystemStatus(); + var vorgangManagerSystemStatus = service.getSystemStatus(); - assertThat(plutoSystemStatus).isEqualTo(PLUTO_SYSTEM_STATUS); + assertThat(vorgangManagerSystemStatus).isEqualTo(VORGANG_MANAGER_SYSTEM_STATUS); } } } \ No newline at end of file diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusServiceTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusServiceTest.java index 10579dbbeb29659700140e3b2200bf919f727816..2a6cca23580f038cfce6d3d04c155038daab007b 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusServiceTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/system/SystemStatusServiceTest.java @@ -22,7 +22,7 @@ class SystemStatusServiceTest { @BeforeEach void mockService() { - when(remoteService.getSystemStatus()).thenReturn(PlutoSystemStatusTestFactory.create()); + when(remoteService.getSystemStatus()).thenReturn(VorgangManagerSystemStatusTestFactory.create()); } @Test @@ -36,7 +36,7 @@ class SystemStatusServiceTest { void shouldRemotAvailablity() { var result = service.isSearchServerAvailable(); - assertThat(result).isEqualTo(PlutoSystemStatusTestFactory.SEARCH_AVAILABLE); + assertThat(result).isEqualTo(VorgangManagerSystemStatusTestFactory.SEARCH_AVAILABLE); } @Test diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/system/PlutoSystemStatusTestFactory.java b/alfa-service/src/test/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatusTestFactory.java similarity index 80% rename from alfa-service/src/test/java/de/ozgcloud/alfa/system/PlutoSystemStatusTestFactory.java rename to alfa-service/src/test/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatusTestFactory.java index ca303aecc2e8097eb2dd7c24bdf00432c9099cd5..41b922bc793d656147178b6dca1f8f162cb80739 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/system/PlutoSystemStatusTestFactory.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/system/VorgangManagerSystemStatusTestFactory.java @@ -23,21 +23,21 @@ */ package de.ozgcloud.alfa.system; -import de.ozgcloud.alfa.system.PlutoSystemStatus.PlutoSystemStatusBuilder; +import de.ozgcloud.alfa.system.VorgangManagerSystemStatus.VorgangManagerSystemStatusBuilder; -public class PlutoSystemStatusTestFactory { +public class VorgangManagerSystemStatusTestFactory { public static final String JAVA_VERSION = "17"; public static final String BUILD_VERSION = "b1"; public static final boolean SEARCH_AVAILABLE = true; - public static PlutoSystemStatus create() { + public static VorgangManagerSystemStatus create() { return createBuilder().build(); } - private static PlutoSystemStatusBuilder createBuilder() { - return PlutoSystemStatus.builder() + private static VorgangManagerSystemStatusBuilder createBuilder() { + return VorgangManagerSystemStatus.builder() .isSearchServerAvailable(SEARCH_AVAILABLE) .javaVersion(JAVA_VERSION) .buildVersion(BUILD_VERSION); diff --git a/alfa-service/src/test/resources/application.yml b/alfa-service/src/test/resources/application.yml index 65c942011bb932da35071c80d984159fac487f22..d2f9d0715b8ff905923e8bb5387f518ff77213af 100644 --- a/alfa-service/src/test/resources/application.yml +++ b/alfa-service/src/test/resources/application.yml @@ -80,7 +80,7 @@ management: grpc: client: - pluto: + vorgang-manager: address: static://127.0.0.1:9090 negotiationType: PLAINTEXT user-manager: diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index 6d2ee1247d7174d5780dd01cd05010f214d478fc..ba7f70df7981f1f7687c06dfa3321e6cb82058a9 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -67,7 +67,7 @@ spec: - env: - name: SERVICE_BINDING_ROOT value: "/bindings" - - name: grpc_client_pluto_address + - name: grpc_client_vorgang-manager_address value: {{ include "app.grpc_client_vorgang_manager_address" . }} - name: grpc_client_user-manager_address value: {{ include "app.grpc_client_user-manager_address" . }} diff --git a/src/test/helm/deployment_defaults_env_test.yaml b/src/test/helm/deployment_defaults_env_test.yaml index 9d695aaf286b08f7e3b54ee4f0f57a2a2cbf9202..382b573901011ded11ae57b204bd63722ff74b5b 100644 --- a/src/test/helm/deployment_defaults_env_test.yaml +++ b/src/test/helm/deployment_defaults_env_test.yaml @@ -38,7 +38,7 @@ tests: - contains: path: spec.template.spec.containers[0].env content: - name: grpc_client_pluto_address + name: grpc_client_vorgang-manager_address value: vorgang-manager.sh-helm-test:9090 - contains: path: spec.template.spec.containers[0].env diff --git a/src/test/helm/deployment_pluto_address_test.yaml b/src/test/helm/deployment_pluto_address_test.yaml index 36dc726c76681f2e1251bac72e52cf01fee9d779..38eb0f989f532be1f782571c1d22f3b42f5735ac 100644 --- a/src/test/helm/deployment_pluto_address_test.yaml +++ b/src/test/helm/deployment_pluto_address_test.yaml @@ -36,5 +36,5 @@ tests: - contains: path: spec.template.spec.containers[0].env content: - name: grpc_client_pluto_address + name: grpc_client_vorgang-manager_address value: my-test-vorgang-manager-name.sh-helm-test:9090