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 53 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
2 changes: 1 addition & 1 deletion .github/workflows/bcol-api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
- feature-queue-python-upgrade
paths:
- "bcol-api/**"

Expand Down
111 changes: 0 additions & 111 deletions .github/workflows/events-listener-ci.yml

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/ftp-poller-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
- feature-queue-python-upgrade
paths:
- "jobs/ftp-poller/**"

Expand Down Expand Up @@ -53,10 +53,6 @@ jobs:
needs: setup-job
env:
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/pay-test"
NATS_QUEUE: "account-worker"
NATS_CLUSTER_ID: "test-cluster"
NATS_CLIENT_NAME: "account.events.worker"
NATS_SUBJECT: "account.events"
USE_DOCKER_MOCK: "YES"
JWT_OIDC_ISSUER: "http://localhost:8081/auth/realms/demo"
SBC_AUTH_ADMIN_CLIENT_ID: "sbc-auth-admin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pay-admin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
- feature-queue-python-upgrade
paths:
- "pay-admin/**"
- "pay-api/src/pay_api/models/**"
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pay-api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
- queue_python_upgrade
- feature-queue-python-upgrade
paths:
- "pay-api/**"

Expand Down Expand Up @@ -55,7 +55,6 @@ jobs:
FLASK_ENV: "testing"
# Needs different database than POSTGRES otherwise dropping database doesn't work
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/pay-test"
TEST_NATS_DOCKER: "YES"
USE_TEST_KEYCLOAK_DOCKER: "YES"
USE_DOCKER_MOCK: "YES"

Expand All @@ -66,9 +65,6 @@ jobs:
JWT_OIDC_TEST_CLIENT_SECRET: "1111111111"
JWT_OIDC_TEST_JWKS_CACHE_TIMEOUT: "6000"

NATS_QUEUE: "test-worker"
NATS_SUBJECT: "entity.payment.test"

SBC_AUTH_ADMIN_CLIENT_ID: "sbc-auth-admin"
SBC_AUTH_ADMIN_CLIENT_SECRET: "2222222222"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Events Listener Queue CD
name: Pay Queue CD

on:
push:
branches:
- main
paths:
- "queue_services/events-listener/**"
- "pay-queue/**"
- "pay-api/src/pay_api/models/**"
- "pay-api/src/pay_api/services/cfs_service.py"
workflow_dispatch:
inputs:
environment:
Expand All @@ -17,14 +18,14 @@ on:
defaults:
run:
shell: bash
working-directory: ./queue_services/events-listener
working-directory: ./pay-queue

env:
APP_NAME: "events-listener"
APP_NAME: "pay-queue"
TAG_NAME: "dev"

jobs:
events-listener-cd-by-push:
pay-queue-cd-by-push:
runs-on: ubuntu-20.04

if: github.event_name == 'push' && github.repository == 'bcgov/sbc-pay'
Expand Down Expand Up @@ -61,13 +62,13 @@ jobs:
if: failure()
with:
type: ${{ job.status }}
job_name: "*Events Listener Queue Built and Deployed to ${{env.TAG_NAME}}*"
job_name: "*Pay Queue Built and Deployed to ${{env.TAG_NAME}}*"
channel: "#registries-bot"
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}

events-listener-cd-by-dispatch:
pay-queue-cd-by-dispatch:
runs-on: ubuntu-20.04

if: github.event_name == 'workflow_dispatch' && github.repository == 'bcgov/sbc-pay'
Expand Down Expand Up @@ -107,7 +108,7 @@ jobs:
if: failure()
with:
type: ${{ job.status }}
job_name: "*Events Listener Queue Built and Deployed to ${{env.TAG_NAME}}*"
job_name: "*Pay Queue Built and Deployed to ${{env.TAG_NAME}}*"
channel: "#registries-bot"
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
commit: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Payment Reconciliations Queue CI
name: Payment Queue CI

on:
pull_request:
branches:
- main
- feature-queue-python-upgrade
paths:
- "queue_services/payment-reconciliations/**"
- "pay-queue/**"
- "pay-api/src/pay_api/models/**"
- "pay-api/src/pay_api/services/cfs_service.py"

defaults:
run:
shell: bash
working-directory: ./queue_services/payment-reconciliations
working-directory: ./pay-queue

jobs:
setup-job:
Expand Down Expand Up @@ -53,10 +54,8 @@ jobs:
testing:
needs: setup-job
env:
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/postgres"
TEST_NATS_DOCKER: "YES"
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/pay-test"
USE_DOCKER_MOCK: "YES"
STAN_CLUSTER_NAME: "test-cluster"
MINIO_ENDPOINT: "localhost:9000"
MINIO_ACCESS_KEY: "minio"
MINIO_ACCESS_SECRET: "minio123"
Expand All @@ -80,7 +79,7 @@ jobs:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_DB: pay-test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
Expand All @@ -102,7 +101,7 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./queue_services/payment-reconciliations/coverage.xml
file: ./pay-queue/coverage.xml
flags: paymentreconciliationsqueue
name: codecov-payment-reconciliations
fail_ci_if_error: true
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/payment-jobs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- feature-queue-python-upgrade
paths:
- "jobs/payment-jobs/**"
- "pay-api/src/pay_api/models/**"
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
testing:
needs: setup-job
env:
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/postgres"
DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/pay-test"
USE_DOCKER_MOCK: "YES"
JWT_OIDC_ISSUER: "http://localhost:8081/auth/realms/demo"
SBC_AUTH_ADMIN_CLIENT_ID: "sbc-auth-admin"
Expand All @@ -71,7 +72,7 @@ jobs:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_DB: pay-test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
Expand Down
Loading
Loading