bcgov / entity

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

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

Open ozamani9gh opened 10 months ago

ozamani9gh commented 10 months ago

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

eve-git commented 9 months ago

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

ozamani9gh commented 9 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 9 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 7 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 3 months ago

NameX deployment:

NOTE: Update COLIN_SVC_URL in 1password before CD

ozamani9gh commented 3 months ago

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

eve-git commented 3 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 3 months ago
gunanagar commented 21 hours ago

Tested, it looks good.

Screen Shot 2024-11-25 at 1.03.28 PM.png Screen Shot 2024-11-25 at 1.02.00 PM.png