bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

Implement - NAMEX API - Removing the COLIN-API dependency with end point in LEAR #19608

Open ozamani9gh opened 9 months ago

ozamani9gh commented 9 months ago

As we move to GCP we want to look at replacing the Oracle dependencies in NAMEX API.

eve-git commented 8 months ago

@ozamani9gh I am not clear what to do. Are there more details?

ozamani9gh commented 8 months ago

@eve-git this is a ticket to identify everytime NAMEX API makes a call to Oracle (services?) . when we move to Google Cloud Platform, we want to remove these dependencies. @pwei1018 can provide more detailed information.

for now make a list of places in the code where we integrate with oracle DB/services.

eve-git commented 8 months ago

NRO retrievals and updates are in Name Request processing, get new NR name, update states, consume, check in/out and fetch an NR to examine, etc. The functions location at api/namex/services/nro folder, including: https://github.com/bcgov/namex/blob/main/api/namex/services/nro/add_nr.py https://github.com/bcgov/namex/blob/main/api/namex/services/nro/change_nr.py https://github.com/bcgov/namex/blob/main/api/namex/services/nro/checkin_checkout_nr.py https://github.com/bcgov/namex/blob/main/api/namex/services/nro/consume_nr.py https://github.com/bcgov/namex/blob/main/api/namex/services/nro/oracle_services.py https://github.com/bcgov/namex/blob/main/api/namex/services/nro/request_utils.py

Also, there are oracle queries in jobs

  1. nro-update/nro folder https://github.com/bcgov/namex/blob/main/jobs/nro-update/nro/nro_datapump.py

  2. nro-extractor/extractor https://github.com/bcgov/namex/blob/main/jobs/nro-extractor/extractor/app.py

  3. nro-get-decision-data https://github.com/bcgov/namex/blob/main/jobs/nro-get-decision-data/nro_get_decision_data.py

stevenc987 commented 8 months ago

It looks like a few more: \api\namex\services\colin\oracle_services.py \jobs\consumed-datafix\consumed\app.py \jobs\corp-check\corps\app.py \jobs\missing-coprs\corps\app.py \jobs\nr-duplicates-report\daily\nr-duplicates.ipynb \jobs\nro-update\nro_update.py

ozamani9gh commented 6 months ago

Ok we need to groom this and work on it this P.I. we can work SRE to migrate this to GCP.

stevenc987 commented 3 months ago

I just loaded the codes from repo and got errors when I ran it in my local. Here is the error message. I don't have time to investigate this issue yet: image.png

eve-git commented 3 months ago

solr_feeder: calls lear colin-api, no changes necessary

namex_api: resources/colin.py stays due to name_request and name-examination still use it. (the original ticket: https://github.com/bcgov/entity/issues/17504) Update it to get corp info from lear colin-api instead

name_request: no changes required since it calls namex-api colin service (the original ticket: https://github.com/bcgov/entity/issues/17553)

name_examination: getCorporation(corpNum) calls to namex api. colin to get corporation info

eve-git commented 2 months ago

NameX deployment:

NOTE: Update COLIN_SVC_URL in 1password before CD

ozamani9gh commented 2 months ago

@Mihai-QuickSilverDev the big test here is on Change Name to input corp number is only in COLIN

eve-git commented 2 months ago

TEST: can also check for DevTools to make sure that COLIN-API service works:

The following screenshot means that the corp number cannot be find in BCROS

image.png

The following screenshot means that the corp number is in colin:

image.png
Mihai-QuickSilverDev commented 2 months ago