Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new oppdrag-service application #3498

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft

Conversation

krharum
Copy link
Contributor

@krharum krharum commented May 28, 2024

Created a new application called oppdrag-service. This includes java-based application files, Dockerfile, Gradle build system files, and various supporting configuration files. Also added API interface descriptions in WSDL and XSD formats. A basic unit test file was added as well.

krharum and others added 30 commits May 28, 2024 09:50
Created a new application called oppdrag-service. This includes java-based application files, Dockerfile, Gradle build system files, and various supporting configuration files. Also added API interface descriptions in WSDL and XSD formats. A basic unit test file was added as well.
Added new OppdragClient class, related configuration, and corresponding consumer and controller. Adjusted build configurations and dependencies for SOAP-based web service compatibility. Replaced reactive-core with
A new data transfer object (DTO) class called 'OppdragRequest' is introduced. This class is suited for the Oppdrag service and is equipped with Lombok annotations for data encapsulation, builder pattern support, no-args and all-args constructors.
Remove unnecessary DevConfig and centralize logic under oppdragservice package. Also, streamline build configuration by using dolly-apps plugin and integrating vault library for improved consistency and security management.
Introduce OppdragService with a method to handle OppdragRequest and return SendInnOppdragResponse. Also, update OppdragController to integrate with the new service layer and manage incoming requests accordingly.
Changed the type of `kodeEndring` from String to a new KodeEndring enum to improve type safety and reduce potential errors. Introduced the new KodeEndring enum with values NY, ENDR, and UEND.
Implemented a MapperFacade configuration to handle custom mapping strategies and converters. Improved Swagger setup by refining security configurations and customizing views. Enhanced OppdragRequest DTO with additional schema information and data types for better validation and XML support. Additionally, added basic unit tests for mapping strategies and updated dependencies in the build configuration.
Removed unnecessary import, added detailed `@Schema` descriptions, and improved validation constraints for multiple fields within the `OppdragRequest` class. Introduced `ValuteType` enum to streamline currency handling.
Introduced new classes LocalDateCustomMapping and LocalDateTimeCustomMapping to handle custom conversion formats. Updated OppdragRequest and related mapping strategies to use these custom converters. Added unit tests to verify the new mapping logic.
Added TestConfig.java to provide Spring test configuration, including beans for OppdragService, OppdragConsumer, and MapperFacade. Created Oppdragsdata.java in utility package to facilitate the construction of OppdragRequest and SendInnOppdragResponse objects, enhancing the testing structure.
Removed TestConfig and updated related test cases to directly use mocks. Modified OppdragService to return and map OppdragResponse instead of SendInnOppdragResponse, enhancing the consistency and maintainability of the service.
Extended the Oppdragsdata class with `datoTekstTom`, `tekstKode`, and `feilreg` fields. Updated corresponding test cases in OppdragResponseMappingStrategyTest to ensure the new fields are properly validated.
#deploy-oppdrag-service

Created a new workflow configuration for the oppdrag-service in the GitHub Actions. Updated `config.yml` by removing unused application entries and redundant reply URLs.
Enhanced the builder pattern in Oppdragsdata by adjusting line breaks for improved readability. Updated Dockerfile to include necessary Java module permissions to avoid runtime issues.
#deploy-oppdrag-service

Changed the LOCAL_DATE and LOCAL_DATE_TIME initializations to use fixed values for consistency in tests. Reformatted DB2_DATE_TIME_FORMAT and adjusted its parsing mechanism accordingly.
#deploy-oppdrag-service

Correct enum naming from `ValuteType` to `ValutaType` in various classes, and add a new `KodeverkService` for retrieving code values. This also includes new mappings in `OppdragController` and `OppdragKodeverk` to handle these enums.
#deploy-oppdrag-service

Replaced ADD with COPY in Dockerfile and reordered JAVA_OPTS. Added @requiredargsconstructor to OppdragKodeverk enum and removed redundant constructor. Removed @VaultPropertySource from DevConfig for dev profile configuration.
#deploy-oppdrag-service

Corrected the main class path in the bootJar configuration of build.gradle. This change updates the path to align with the actual package structure, ensuring the application starts correctly.
#deploy-proxy-oppdrag

Add essential configuration files and setup for oppdrag-proxy, including Gradle build scripts, Dockerfile, application properties, and workflow definitions. The initial setup also includes basic logging, security, and routing configurations for the project.
#deploy-proxy-oppdrag

Included `spring-cloud-starter-bootstrap` for legacy bootstrap configuration. This will be temporarily used and should be removed once the new configuration is implemented.
#deploy-proxy-oppdrag

Deleted the `application-test.properties` file as it's no longer needed. Also removed the `data-transfer-objects` library from settings.gradle and build.gradle dependencies to clean up the codebase.
#deploy-proxy-oppdrag

Removed the vault configuration from the config.yml file. This change ensures that the vault is no longer enabled by default, simplifying resource allocation and management.
Replaced OppdragConsumer with OppdragWSConsumer and introduced WebClient for communication. Added new configuration classes for server properties and consumers. Updated application.yml to include new endpoint configurations and modified tests accordingly.
#deploy-oppdrag-service

Added the "cluster" parameter to the GitHub workflow configuration for the oppdrag-service application. This change specifies the deployment environment as "dev-fss", ensuring the service will be deployed correctly in the intended cluster.
#deploy-oppdrag-service

This commit removes the vault configuration section as it is no longer needed. The min and max replicas settings remain unchanged, maintaining the desired state for replicas.
This commit changes the name of the workflow from "oppsummeringsdokument-service" to "oppdrag-service". This update ensures that the workflow name accurately reflects the intended service.
…drag-service

Each application in the inbound rules now includes a cluster specification, set to 'dev-gcp'. This ensures all specified applications route correctly through the designated cluster in the development environment.
#deploy-oppdrag-service

Updated OppdragService to return OppdragResponse directly instead of using Reactor Mono. This simplifies the response handling and aligns the test cases with the new service method signature. Also, removed unused imports and corrected SoapActionCallback usage in the consumer.
#deploy-oppdrag-service

Add a try-catch block to specifically catch and log details of SendInnOppdragFeilUnderBehandling exceptions. This improves error logging by providing more context about the error cause and source, while still logging general exceptions.
#deploy-oppdrag-service

The SoapActionCallback argument was removed from the marshalSendAndReceive method call as it was deemed unnecessary. This cleanup enhances code readability and maintainability without altering the function's core behavior.
#deploy-oppdrag-service

Added a specific case to handle SoapFaultClientException in the exception block of OppdragWSConsumer. This logs detailed information about the SOAP fault, including faultCode and faultStringOrReason, improving error diagnosis and monitoring.
…drag-service

Removed handling of `SendInnOppdragFeilUnderBehandling` exception and enhanced logging details for `SoapFaultClientException`. This change ensures more comprehensive error information is captured when SOAP faults occur.
…drag-service

Removed handling of `SendInnOppdragFeilUnderBehandling` exception and enhanced logging details for `SoapFaultClientException`. This change ensures more comprehensive error information is captured when SOAP faults occur.
Switched from generic Object to DOMResult for SOAP fault details extraction. Enhanced logging by adding detailed node information such as systemId, nodeName, nodeValue, nodeType, and nextSibling. This will facilitate better debugging and troubleshooting of SOAP faults.
#deploy-oppdrag-service

Introduce a helper method to encapsulate node information extraction from SoapFaultDetailElement. This improves code readability and centralizes the logic for easier maintenance and potential future modifications.
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