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

18263 - New queues use PUB/SUB #1438

Merged
merged 74 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
aac6c3c
Update requirements.txt
seeker25 Mar 5, 2024
37cb170
Fix CI
seeker25 Mar 5, 2024
e9e5cff
Merge branch 'queue_python_upgrade' of https://github.com/bcgov/sbc-p…
seeker25 Mar 5, 2024
a27b5fb
Changes to convert project to new queues
seeker25 Mar 6, 2024
47c87d7
Remove nats from workflows
seeker25 Mar 7, 2024
eef19f0
remove nats from docker compose
seeker25 Mar 7, 2024
cc94437
remove q_cli
seeker25 Mar 7, 2024
f6c2faa
Remove more NATS
seeker25 Mar 7, 2024
c8529cd
Remove more nats
seeker25 Mar 7, 2024
c1eac7f
Gun events-listener, combining the queues for less tech debt
seeker25 Mar 7, 2024
fb38a86
More nats removal
seeker25 Mar 7, 2024
08293e6
Merge branch 'queue_python_upgrade' of https://github.com/bcgov/sbc-p…
seeker25 Mar 7, 2024
116b3ac
Move payment-reconciliations into pay-queue
seeker25 Mar 7, 2024
cc7cd7b
Change project structure of queues
seeker25 Mar 7, 2024
6e1f562
Add in tests from events listener
seeker25 Mar 7, 2024
b48bddf
Getting rid of some infrastructure and tech debt we don't need
seeker25 Mar 7, 2024
d858585
Enhance gcp_queue_publisher
seeker25 Mar 8, 2024
d65bb01
Wire up ftp poller to new queues
seeker25 Mar 8, 2024
f1c3425
Add in enum, change util func
seeker25 Mar 8, 2024
f49d459
Small tweaks for gcp_queue_publisher
seeker25 Mar 8, 2024
605a2b7
Put in adhoc test for publishing to queue
seeker25 Mar 8, 2024
684a82f
Add in PaymentToken dataclass shared across apps
seeker25 Mar 8, 2024
d116c41
shorten enums
seeker25 Mar 8, 2024
893ab75
Replace queue messages in mailer in payment-jobs
seeker25 Mar 8, 2024
ad28ba4
Add more MessageTypes to enum
seeker25 Mar 8, 2024
c738956
More enum
seeker25 Mar 8, 2024
f7ffe55
Convert to PUB
seeker25 Mar 8, 2024
181d54d
missing comma
seeker25 Mar 8, 2024
15ca6a7
Add in pub
seeker25 Mar 8, 2024
aa2aecc
Rework entire PUB
seeker25 Mar 8, 2024
c04da96
Clean up clean up everybody clean up!
seeker25 Mar 8, 2024
3208e01
Small fix for ftp-poller
seeker25 Mar 8, 2024
911136e
Fix ref
seeker25 Mar 8, 2024
90b13ce
Holy moly third try it must be friday
seeker25 Mar 8, 2024
067a6bd
fix lint
seeker25 Mar 8, 2024
45964a1
Merge branch 'queue_python_upgrade' of https://github.com/bcgov/sbc-p…
seeker25 Mar 8, 2024
1eb4b3a
remove unused receipt method
seeker25 Mar 8, 2024
56e2dff
payment jobs updates, makefile for pay-queue
seeker25 Mar 8, 2024
ba327a1
linting fixes, requirements fixes
seeker25 Mar 8, 2024
c5e3e7e
Dependencies are being funny with this one - will need to relook at i…
seeker25 Mar 8, 2024
7560b28
Update old references
seeker25 Mar 8, 2024
f594c95
Add in pay jobs CI
seeker25 Mar 8, 2024
5adcde4
directory change
seeker25 Mar 8, 2024
d7ef21b
Use pip 24.0.0
seeker25 Mar 8, 2024
5bf7ab8
Flask-Migrate upgrade + disable compare_type
seeker25 Mar 11, 2024
046d7be
Small tweaks for jobs, still some failing tests
seeker25 Mar 11, 2024
677d9be
Use scalars to fix where conditions when there are tuples, as those c…
seeker25 Mar 11, 2024
5539e47
Fix CI
seeker25 Mar 11, 2024
234aaa6
Fix unit test for pay-api
seeker25 Mar 11, 2024
13c7a22
Lint fixes and others
seeker25 Mar 12, 2024
fb0e97d
Update CI
seeker25 Mar 12, 2024
6a978ab
fix deps
seeker25 Mar 12, 2024
4846331
update reqs
seeker25 Mar 12, 2024
6fa4702
Take out tracing for BCOL-API
seeker25 Mar 12, 2024
cae0352
more tracing removal
seeker25 Mar 12, 2024
62fb014
1 more spot for tracing
seeker25 Mar 12, 2024
8d9b7b7
Fix linting, move pubsub to local, had issues referencing it as a lib…
seeker25 Mar 12, 2024
e659fba
Update requirements
seeker25 Mar 12, 2024
0b35116
More test / lint fixes
seeker25 Mar 12, 2024
46c2e50
Cleanup conftest
seeker25 Mar 12, 2024
7b41044
more cleanup
seeker25 Mar 12, 2024
7b7fc44
Some unit tests working, more to go
seeker25 Mar 12, 2024
f8d4ae3
More cleanup
seeker25 Mar 12, 2024
4cae1ff
4 unit tests to go
seeker25 Mar 12, 2024
89f8b90
Fix eft reconciliation tests
seeker25 Mar 12, 2024
ac8066e
Lint fixes more unit test fixes
seeker25 Mar 12, 2024
42e3628
Unit tests should be all passing
seeker25 Mar 12, 2024
9473336
Remove redundant comment
seeker25 Mar 12, 2024
0d290df
Cleanup
seeker25 Mar 13, 2024
458aa10
Lint fix
seeker25 Mar 13, 2024
5b2c301
Add in code coverage for pay-queue
seeker25 Mar 13, 2024
6ddcbfc
Put in event listener topic
seeker25 Mar 13, 2024
ca0a69d
Some cleanup
seeker25 Mar 13, 2024
fe42bf8
Update requirements
seeker25 Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/events-listener-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
paths:
- "queue_services/events-listener/**"
- "pay-api/src/pay_api/models/**"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/payment-reconciliations-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
paths:
- "queue_services/payment-reconciliations/**"
- "pay-api/src/pay_api/models/**"
Expand Down
51 changes: 2 additions & 49 deletions queue_services/payment-reconciliations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,16 @@


# Application Name

BC Registries Payments system API
BC Registries Payment Reconciliation Queue

## Technology Stack Used
* Python, Flask
* Postgres - SQLAlchemy, psycopg2-binary & alembic

## Third-Party Products/Libraries used and the the License they are covert by

## Project Status
As of 2018-02-22 in **ALPHA**

## Documnentation

GitHub Pages (https://guides.github.com/features/pages/) are a neat way to document you application/project.

## Security

Future - BCGov Keycloak

Current - JWT hack

## Files in this repository

```
docs/ - Project Documentation
└── images
└── icons

openshift/ - OpenShift-specific files
├── scripts - helper scripts
└── templates - application templates
```

## Deployment (Local Development)

* Developer Workstation Requirements/Setup
* Application Specific Setup

## Deployment (OpenShift)

See (openshift/Readme.md)

## Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an [issue](../../issues).

## How to Contribute

If you would like to contribute, please see our [CONTRIBUTING](./CONTRIBUTING.md) guidelines.

Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.

## License

Copyright 2018 Province of British Columbia
Copyright 2024 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
19 changes: 5 additions & 14 deletions queue_services/payment-reconciliations/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""s2i based launch script to run the service."""
import asyncio
"""Provides the WSGI entry point for running the application."""
import os

from reconciliations.worker import APP_CONFIG, cb_subscription_handler, qsm
from reconciliations import create_app

app = create_app()

if __name__ == '__main__':

# my_config = config.get_named_config(os.getenv('DEPLOYMENT_ENV', 'production'))

event_loop = asyncio.get_event_loop()
event_loop.run_until_complete(qsm.run(loop=event_loop,
config=APP_CONFIG,
callback=cb_subscription_handler))
try:
event_loop.run_forever()
finally:
event_loop.close()
server_port = os.environ.get('PORT', '8080')
app.run(debug=False, port=server_port, host='0.0.0.0')
132 changes: 0 additions & 132 deletions queue_services/payment-reconciliations/q_cli.py

This file was deleted.

129 changes: 60 additions & 69 deletions queue_services/payment-reconciliations/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,93 +1,84 @@
-e git+https://github.com/bcgov/lear.git@30dba30463c99aaedfdcfd463213e71ba0d35b51#egg=entity_queue_common&subdirectory=queue_services/common
-e git+https://github.com/bcgov/sbc-common-components.git@b93585ea3ac273b9e51c4dd5ddbc8190fd95da6a#egg=sbc_common_components&subdirectory=python
-e git+https://github.com/bcgov/sbc-pay.git@6d4a94c8d78f11322487f93eb65ec6e9d5238b35#egg=pay_api&subdirectory=pay-api
Flask-Caching==2.0.2
-e git+https://github.com/bcgov/sbc-common-components.git@5807c201b057875f9061f60b408ab765ebaa4235#egg=sbc_common_components&subdirectory=python
-e git+https://github.com/bcgov/sbc-pay.git@b33d8e36435060a30f3cdd14c3d05a3a949d3b5a#egg=pay_api&subdirectory=pay-api
-e git+https://github.com/bolyachevets/namex.git@d856f2be4dded0fd3c33b3bfb6da280e4c54a848#egg=gcp_queue&subdirectory=services/pubsub
-e git+https://github.com/thorwolpert/flask-jwt-oidc.git@40cc811ccf70e838c5f7522fe8d83b7e58853539#egg=flask_jwt_oidc
Flask-Caching==2.1.0
Flask-Cors==4.0.0
Flask-Migrate==2.7.0
Flask-Moment==1.0.5
Flask-OpenTracing==1.1.0
Flask-SQLAlchemy==2.5.1
Flask-OpenTracing==2.0.0
Flask-SQLAlchemy==3.1.1
Flask-Script==2.0.6
Flask==1.1.2
Jinja2==3.0.3
Mako==1.2.4
MarkupSafe==2.1.3
PyMeeus==0.5.12
SQLAlchemy-Continuum==1.3.15
Flask==2.3.3
Jinja2==3.1.3
Mako==1.3.2
MarkupSafe==2.1.5
SQLAlchemy-Utils==0.41.1
SQLAlchemy==1.3.24
Werkzeug==1.0.1
aiohttp==3.9.2
aiosignal==1.3.1
alembic==1.11.1
aniso8601==9.0.1
async-timeout==4.0.2
SQLAlchemy==2.0.28
Werkzeug==3.0.1
alembic==1.13.1
argon2-cffi-bindings==21.2.0
argon2-cffi==23.1.0
asyncio-nats-client==0.11.5
asyncio-nats-streaming==0.4.0
seeker25 marked this conversation as resolved.
Show resolved Hide resolved
attrs==23.1.0
blinker==1.6.2
attrs==23.2.0
blinker==1.7.0
cachelib==0.9.0
cachetools==5.3.1
cattrs==23.1.2
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
convertdate==2.4.0
croniter==1.4.1
cryptography==42.0.2
cachetools==5.3.3
cattrs==23.2.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
croniter==2.0.2
cryptography==42.0.5
dpath==2.1.6
ecdsa==0.18.0
exceptiongroup==1.1.1
expiringdict==1.2.2
flask-jwt-oidc==0.3.0
flask-marshmallow==0.11.0
flask-restx==1.1.0
frozenlist==1.3.3
google-api-core==2.11.1
google-auth==2.18.1
google-cloud-pubsub==2.17.0
googleapis-common-protos==1.59.1
grpc-google-iam-v1==0.12.6
grpcio-status==1.48.2
grpcio==1.54.3
gunicorn==20.1.0
hijri-converter==2.3.1
flask-marshmallow==1.2.0
google-api-core==2.17.1
google-auth==2.28.1
google-cloud-pubsub==2.20.0
googleapis-common-protos==1.62.0
greenlet==3.0.3
grpc-google-iam-v1==0.13.0
grpcio-status==1.62.0
grpcio==1.62.0
gunicorn==21.2.0
holidays==0.37
idna==3.4
itsdangerous==2.0.1
idna==3.6
itsdangerous==2.1.2
jaeger-client==4.8.0
jsonschema==4.17.3
korean-lunar-calendar==0.3.1
launchdarkly-server-sdk==8.1.4
marshmallow-sqlalchemy==0.25.0
marshmallow==3.19.0
minio==7.1.15
multidict==6.0.4
launchdarkly-eventsource==1.1.1
launchdarkly-server-sdk==9.2.1
marshmallow-sqlalchemy==1.0.0
marshmallow==3.21.1
minio==7.2.5
opentracing==2.4.0
packaging==23.1
proto-plus==1.22.2
protobuf==3.19.6
psycopg2-binary==2.9.6
packaging==23.2
proto-plus==1.23.0
protobuf==4.25.3
psycopg2-binary==2.9.9
pyRFC3339==1.1
pyasn1-modules==0.3.0
pyasn1==0.5.0
pycountry==22.3.5
pyasn1==0.5.1
pycountry==23.12.11
pycparser==2.21
pyrsistent==0.19.3
python-dateutil==2.8.2
python-dotenv==1.0.0
pycryptodome==3.20.0
pyrsistent==0.20.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-jose==3.3.0
pytz==2023.3
pytz==2024.1
requests==2.31.0
rsa==4.9
semver==2.13.0
sentry-sdk==1.26.0
simple-cloudevent @ git+https://github.com/daxiom/simple-cloudevent.py.git@447cabb988202206ac69e71177d7cd11b6c0b002
semver==3.0.2
sentry-sdk==1.40.6
six==1.16.0
strict-rfc3339==0.7
threadloop==1.0.2
thrift==0.16.0
tornado==6.3.3
typing_extensions==4.6.3
urllib3==1.26.17
yarl==1.9.2
tornado==6.4
typing_extensions==4.10.0
urllib3==2.2.1
Loading
Loading