Skip to content

FINERACT-2293: Migrate client address module to new command pipeline#5657

Open
avivijay19 wants to merge 1 commit intoapache:developfrom
avivijay19:FINERACT-2293
Open

FINERACT-2293: Migrate client address module to new command pipeline#5657
avivijay19 wants to merge 1 commit intoapache:developfrom
avivijay19:FINERACT-2293

Conversation

@avivijay19
Copy link
Contributor

Description

Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

private final ClientRepositoryWrapper clientRepositoryWrapper;
private final AddressRepository addressRepository;
private final ClientAddressRepositoryWrapper clientAddressRepositoryWrapper;
private final AddressCommandFromApiJsonDeserializer fromApiJsonDeserializer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non of these manual JSON parsing allowed. That's why we do this in the first place... to get rid of this and have proper types.

return address;
}

private Address createAddress(JsonObject jsonObject) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, see previous comment... non of this "JsonObject" stuff can happen here (or anywhere).

@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientAddressRequest.class)))
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientAddressApiResourcesSwagger.PostClientClientIdAddressesResponse.class)))
public CommandProcessingResult addClientAddress(@QueryParam("type") @Parameter(description = "type") final long addressTypeId,
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientAddressCreateResponse.class)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working with the authors of the compatibility checks to solve this. This annotation needs to go.

resilience4j.retry.instances.commandInterestRateChartSlabsDelete.exponential-backoff-multiplier=${FINERACT_COMMAND_INTEREST_RATE_CHART_SLABS_DELETE_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER:2}
resilience4j.retry.instances.commandInterestRateChartSlabsDelete.retryExceptions=${FINERACT_COMMAND_INTEREST_RATE_CHART_SLABS_DELETE_RETRY_EXCEPTIONS:org.springframework.dao.ConcurrencyFailureException,org.eclipse.persistence.exceptions.OptimisticLockException,jakarta.persistence.OptimisticLockException,org.springframework.orm.jpa.JpaOptimisticLockingFailureException}

resilience4j.retry.instances.commandClientAddressCreate.max-attempts=${FINERACT_COMMAND_CLIENT_ADDRESS_CREATE_RETRY_MAX_ATTEMPTS:3}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this a bit higher... where the other blocks of the other packages are... this last section is for the "fineract-command" module itself. So let's keep the things together.

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.

2 participants