Repository: bcgov/lear
Pull request #3523: fix: entity services build conflicts with legal-api import.
Author: login: hfekete
Created: 2025-05-30T18:15:06Z | Merged: 2025-05-30T21:29:50Z

*Issue #:* /bcgov/entity###

*Description of changes:*
fix: entity services build conflicts with legal-api import.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).



Diff:
diff --git a/queue_services/entity-bn/requirements.txt b/queue_services/entity-bn/requirements.txt
index 8f8dbf43e8..37f99d00f1 100644
--- a/queue_services/entity-bn/requirements.txt
+++ b/queue_services/entity-bn/requirements.txt
@@ -12,7 +12,6 @@ click==8.1.3
 dpath==2.0.1
 itsdangerous==1.1.0
 nest_asyncio
-protobuf==3.15.8
 python-dotenv==0.17.1
 sentry-sdk==1.20.0
 six==1.15.0
@@ -21,3 +20,14 @@ git+https://github.com/bcgov/business-schemas.git@2.15.21#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
 git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
+googleapis-common-protos==1.56.2
+grpcio-status==1.48.0
+grpc-google-iam-v1==0.12.4
+google-auth==2.38.0
+google-cloud-pubsub==2.21.4
+google-api-core==2.24.2
+proto-plus==1.26.1
+git+https://github.com/bcgov/sbc-connect-common.git@main#subdirectory=python/gcp-queue
diff --git a/queue_services/entity-digital-credentials/requirements.txt b/queue_services/entity-digital-credentials/requirements.txt
index f35b9f0271..d66e78b698 100644
--- a/queue_services/entity-digital-credentials/requirements.txt
+++ b/queue_services/entity-digital-credentials/requirements.txt
@@ -12,7 +12,6 @@ itsdangerous==1.1.0
 jsonschema==4.19.0
 MarkupSafe==1.1.1
 nest_asyncio
-protobuf==3.15.8
 pyrsistent==0.17.3
 python-dotenv==0.17.1
 requests==2.25.1
@@ -24,3 +23,14 @@ git+https://github.com/bcgov/business-schemas.git@2.18.15#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
 git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
+googleapis-common-protos==1.56.2
+grpcio-status==1.48.0
+grpc-google-iam-v1==0.12.4
+google-auth==2.38.0
+google-cloud-pubsub==2.21.4
+google-api-core==2.24.2
+proto-plus==1.26.1
+git+https://github.com/bcgov/sbc-connect-common.git@main#subdirectory=python/gcp-queue
diff --git a/queue_services/entity-emailer/requirements.txt b/queue_services/entity-emailer/requirements.txt
index 32309820ce..d69510a926 100644
--- a/queue_services/entity-emailer/requirements.txt
+++ b/queue_services/entity-emailer/requirements.txt
@@ -46,7 +46,6 @@ multidict==6.0.4
 nest-asyncio==1.5.6
 Pillow==9.5.0
 pkgutil-resolve-name==1.3.10
-protobuf==3.15.8
 psycopg2-binary==2.8.6
 pyasn1==0.4.8
 pycountry==20.7.3
@@ -82,3 +81,14 @@ git+https://github.com/bcgov/business-schemas.git@2.18.39#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
 git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
+googleapis-common-protos==1.56.2
+grpcio-status==1.48.0
+grpc-google-iam-v1==0.12.4
+google-auth==2.38.0
+google-cloud-pubsub==2.21.4
+google-api-core==2.24.2
+proto-plus==1.26.1
+git+https://github.com/bcgov/sbc-connect-common.git@main#subdirectory=python/gcp-queue
diff --git a/queue_services/entity-filer/requirements.txt b/queue_services/entity-filer/requirements.txt
index 229c4e24d6..9542f9d02c 100755
--- a/queue_services/entity-filer/requirements.txt
+++ b/queue_services/entity-filer/requirements.txt
@@ -23,9 +23,20 @@ urllib3==1.26.11
 minio==7.0.2
 PyPDF2==1.26.0
 reportlab==3.6.12
-git+https://github.com/bcgov/sbc-connect-common.git#egg=gcp_queue&subdirectory=python/gcp-queue
+#git+https://github.com/bcgov/sbc-connect-common.git#egg=gcp_queue&subdirectory=python/gcp-queue
 git+https://github.com/bcgov/sbc-connect-common.git#egg=structured_logging&subdirectory=python/structured-logging
 git+https://github.com/bcgov/business-schemas.git@2.18.41#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
 git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
+googleapis-common-protos==1.56.2
+grpcio-status==1.48.0
+grpc-google-iam-v1==0.12.4
+google-auth==2.38.0
+google-cloud-pubsub==2.21.4
+google-api-core==2.24.2
+proto-plus==1.26.1
+git+https://github.com/bcgov/sbc-connect-common.git@main#subdirectory=python/gcp-queue
diff --git a/queue_services/entity-pay/requirements.txt b/queue_services/entity-pay/requirements.txt
index 5dbf675098..3acf87b36c 100644
--- a/queue_services/entity-pay/requirements.txt
+++ b/queue_services/entity-pay/requirements.txt
@@ -11,7 +11,7 @@ click==7.1.2
 importlib-metadata==1.6.1
 itsdangerous==1.1.0
 jsonschema==3.2.0
-protobuf==3.12.2
+#protobuf==3.12.2
 pycountry==19.8.18
 pyrsistent==0.16.0
 python-dotenv==0.13.0
@@ -22,3 +22,14 @@ zipp==3.1.0
 git+https://github.com/bcgov/business-schemas.git#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
+googleapis-common-protos==1.56.2
+grpcio-status==1.48.0
+grpc-google-iam-v1==0.12.4
+google-auth==2.38.0
+google-cloud-pubsub==2.21.4
+google-api-core==2.24.2
+proto-plus==1.26.1
+git+https://github.com/bcgov/sbc-connect-common.git@main#subdirectory=python/gcp-queue


Reviews:
user: login: vysakh-menon-aot
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-30T18:24:30Z
user: login: vysakh-menon-aot
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-30T18:24:35Z
user: login: loneil
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-30T23:55:38Z

Review comments:
path: queue_services/entity-pay/requirements.txt
user: login: vysakh-menon-aot
body: not in use
created_at: 2025-05-30T18:24:30Z
author_association: COLLABORATOR
diff_hunk: @@ -24,3 +23,14 @@ git+https://github.com/bcgov/business-schemas.git@2.18.15#egg=registry_schemas
 git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common
 git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning
 git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api
+
+# fix due to conflicting versions from legal-api import
+protobuf==3.19.5
path: queue_services/entity-digital-credentials/requirements.txt
user: login: loneil
body: Thanks! Was just running into this starting to look at the existing DBC queue service.
created_at: 2025-05-30T23:55:38Z
author_association: COLLABORATOR

PR comments:
user: login: hfekete
created_at: 2025-05-30T18:17:14Z
body: they are building and running in my local, but with NATS errors (cannot connect to queues)
![image](https://github.com/user-attachments/assets/09b045ef-df41-4082-ab15-602fb0727dff)

author_association: CONTRIBUTOR
user: login: codecov[bot]
created_at: 2025-05-30T18:24:56Z
body: ## [Codecov](https://app.codecov.io/gh/bcgov/lear/pull/3523?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 75.16%. Comparing base [(`57e1e19`)](https://app.codecov.io/gh/bcgov/lear/commit/57e1e19b46dd13ef24875dc6bcaf4181d9342778?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) to head [(`a6749b5`)](https://app.codecov.io/gh/bcgov/lear/commit/a6749b541a06ac295edf95ecdd180d1fb1b8b1c9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov).
> Report is 2 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #3523      +/-   ##
==========================================
- Coverage   76.09%   75.16%   -0.94%     
==========================================
  Files         204      309     +105     
  Lines       13665    18838    +5173     
  Branches     2332     3186     +854     
==========================================
+ Hits        10399    14159    +3760     
- Misses       2602     3700    +1098     
- Partials      664      979     +315     
```

| [Flag](https://app.codecov.io/gh/bcgov/lear/pull/3523/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) | Coverage Δ | |
|---|---|---|
| [entity-digital-credentials](https://app.codecov.io/gh/bcgov/lear/pull/3523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) | `87.50% <ø> (?)` | |
| [entitybn](https://app.codecov.io/gh/bcgov/lear/pull/3523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) | `61.16% <ø> (?)` | |
| [entityemailer](https://app.codecov.io/gh/bcgov/lear/pull/3523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) | `66.99% <ø> (?)` | |
| [entityfiler](https://app.codecov.io/gh/bcgov/lear/pull/3523/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov) | `79.39% <ø> (?)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov#carryforward-flags-in-the-pull-request-comment) to find out more.

[see 105 files with indirect coverage changes](https://app.codecov.io/gh/bcgov/lear/pull/3523/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcgov)

</details>
<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE