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

EIP1-11113: Import Register Checker API Codebase and Project Setup #113

Open
wants to merge 3 commits into
base: EIP1-11113-proxy-main
Choose a base branch
from

Conversation

SimPaySW
Copy link
Contributor

@SimPaySW SimPaySW commented Dec 4, 2024

Ref JIRA EIP1-11113

The feature commits on this branch cover import of the Register Checker API project setup, gradle, software versions (SB3 etc). as well as the commits under EIP1-11111 as the db migrations are a pre-requisite to this code working.

Most of the changes are files deleted in the branch under review as this is an interim step in the code migration.

This PR targets a proxy main branch to enable merging of 11113 and 11114 changes into one version of the code without changing the code deployed to the dev & test environments.

… API project that has merged db migrations already in it; resolve issues arising from address entity field differences between APIs
@SimPaySW SimPaySW force-pushed the EIP1-11113-review-1-import-reg-check-codebase branch from ec70132 to 72cfda2 Compare December 4, 2024 10:40
@SimPaySW SimPaySW changed the base branch from EIP1-11113-review-target-proxy-main to main December 4, 2024 10:42
@SimPaySW SimPaySW changed the base branch from main to EIP1-11113-review-target-proxy-main-wo-11198 December 4, 2024 10:56
@SimPaySW SimPaySW changed the title EIP1: Review 1 Import Register Checker API Codebase and Project Setup EIP1-11113: Review 1 Import Register Checker API Codebase and Project Setup Dec 4, 2024
@SimPaySW SimPaySW changed the title EIP1-11113: Review 1 Import Register Checker API Codebase and Project Setup EIP1-11113: Import Register Checker API Codebase and Project Setup Dec 5, 2024
@SimPaySW SimPaySW changed the base branch from EIP1-11113-review-target-proxy-main-wo-11198 to main December 5, 2024 09:56
@SimPaySW SimPaySW changed the base branch from main to EIP1-11113-proxy-main December 5, 2024 10:54
Copy link

@tomsdjohnson tomsdjohnson left a comment

Choose a reason for hiding this comment

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

Just a few preliminary questions

@@ -44,4 +44,14 @@ databaseChangeLog:
- include:
file: /db/changelog/create/0022_EROPSPT-350_add_index_on_status.xml
- include:
file: db/changelog/create/0023_EIP1-11198_add-is-from-applications-api-flag.xml

Choose a reason for hiding this comment

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

is there a reason for no longer including this Db migration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The aim of the isFromApplicationsApi flag is to give a marker on the portal that applications are from the service apis or applications api. It isn't needed by the EMS api.

Choose a reason for hiding this comment

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

Will we definately not need docker on this service anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Docker comes back in in review 3.

@@ -1,243 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
<suppress until="2024-05-03Z">

Choose a reason for hiding this comment

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

In the register checker api there are two suppersions "CVE-2024-12801" and "CVE-2024-12798" do we need to include them here?

Choose a reason for hiding this comment

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

It's either include them here or bump the springboot version to where these are no longer issues

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we are using SB 3.3.5 which brings in QOS 1.5.11 so is vulnerable. I will re-add these back, and look into upgrading SB to 3.3.8 or later.


fun main(args: Array<String>) {
runApplication<EmsIntegrationApiApplication>(*args)
runApplication<RegisterCheckerApiApplication>(*args)

Choose a reason for hiding this comment

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

Should this not stay as EmsIntegrationApiApplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made it like that in the final increment of this dev effort e.g. review 5.

@@ -1,56 +0,0 @@
package uk.gov.dluhc.emsintegrationapi.client

Choose a reason for hiding this comment

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

Why don't we need these api clients any more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We definitely do! It's the way I have put these PRs together. The main code is added back in as part of review 3.

Choose a reason for hiding this comment

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

the "database" subfolder that is present in the eip-ero-register-checker-api that has "ReplicaAwareTransactionManager" and "TransactonRoutingDataSource" files is missing from this config file. Is there a reason they were left out or are they needed here to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those files are in this branch. See here.


class EmsIntegrationHeaderAuthenticationFilter(
class RegisterCheckerHeaderAuthenticationFilter(

Choose a reason for hiding this comment

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

Should this not stay as EmsIntegrationHeaderAuthenticationFilter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change covered by review 3.

PersonalDetailMapper::class
]
)
abstract class RegisterCheckResultMapper {

Choose a reason for hiding this comment

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

I think we should only be using mapstruct.Mappings for Enums mappings done to from Api, Dto, and etity objects should be manual

Choose a reason for hiding this comment

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

if you see the Mappers section of docs/guidelines/general.md in the applications API, we should be using those guidelines, and updating prexisitng mappers where we can

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, it's a valid point, although this work was done before that guidance appeared. I could to raise a ticket to upgrade the merged service to the latest coding standards, and schedule it to be done after this work has been merged. I'm just keen to keep the review and merge process simple if possible

Choose a reason for hiding this comment

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

Yup if you could raise a new ticket for doing this as part of this that would be great

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

As per the ticket:

RegisterCheckerAPI.yaml should be copied across alongside the EMSIntegrationAPI.yaml and not renamed/altered

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