Skip to content

Commit 8e98e08

Browse files
authored
Merge branch 'develop' into ocrvs-10939
2 parents 13c0516 + 27c4f75 commit 8e98e08

File tree

5 files changed

+74
-14
lines changed

5 files changed

+74
-14
lines changed

.husky/pre-push

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/sh
2-
31
branch=$(git rev-parse --abbrev-ref HEAD)
42
pattern='^[a-z][a-z0-9\/\-]{1,29}$'
53

4+
bash << EOF
5+
66
if [[ ! "$branch" =~ $pattern ]]; then
77
echo """
88
❌ Invalid branch name: '$branch'
@@ -16,4 +16,6 @@ if [[ ! "$branch" =~ $pattern ]]; then
1616
exit 1
1717
fi
1818

19+
EOF
20+
1921
exit 0

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 2.0.0
4+
5+
### Breaking changes
6+
7+
- Switch to docker.io/chumaky/postgres_mongo_fdw:17.6_fdw5.5.2 image to support `mongo_fdw`. This is required for the legacy user migrations to work. It will be switched back to the official postgres image in a future release.
8+
- A new service `legacy-user-migration` which runs the same migration image but with the `migrate-legacy-users` flag and with the following new environment variables:
9+
- EVENTS_SUPERUSER_POSTGRES_URL
10+
- MONGO_HOST
11+
- MONGO_PORT
12+
- MONGO_USERNAME
13+
- MONGO_PASSWORD
14+
- MONGO_REPLICA_SET
15+
16+
The default values for these variables have been added to the `docker-compose.deploy.yml` file. They should work out of the box for most deployments, but please ensure to set them correctly if you have a custom MongoDB setup.
17+
318
## 1.9.1
419

520
### Breaking changes

infrastructure/docker-compose.deploy.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ services:
913913
options:
914914
gelf-address: 'udp://127.0.0.1:12201'
915915
tag: 'config'
916+
916917
migration:
917918
environment:
918919
- USER_MGNT_MONGO_URL=mongodb://user-mgnt:${USER_MGNT_MONGODB_PASSWORD}@mongo1/user-mgnt?replicaSet=rs0
@@ -942,6 +943,49 @@ services:
942943
options:
943944
gelf-address: 'udp://127.0.0.1:12201'
944945
tag: 'migration'
946+
947+
legacy-user-migration:
948+
image: ghcr.io/opencrvs/ocrvs-migration:${VERSION}
949+
command: ["/bin/sh", "-c", "/app/wait && yarn start:prod --migrate-legacy-users"]
950+
environment:
951+
- USER_MGNT_MONGO_URL=mongodb://user-mgnt:${USER_MGNT_MONGODB_PASSWORD}@mongo1/user-mgnt?replicaSet=rs0
952+
- DASHBOARD_MONGO_URL=mongodb://performance:${PERFORMANCE_MONGODB_PASSWORD}@mongo1/performance?replicaSet=rs0
953+
- APPLICATION_CONFIG_MONGO_URL=mongodb://config:${CONFIG_MONGODB_PASSWORD}@mongo1/application-config?replicaSet=rs0
954+
- HEARTH_MONGO_URL=mongodb://hearth:${HEARTH_MONGODB_PASSWORD}@mongo1/hearth-dev?replicaSet=rs0
955+
- EVENTS_MONGO_URL=mongodb://events:${EVENTS_MONGODB_PASSWORD}@mongo1/events?replicaSet=rs0
956+
- OPENHIM_MONGO_URL=mongodb://openhim:${OPENHIM_MONGODB_PASSWORD}@mongo1/openhim-dev?replicaSet=rs0
957+
- EVENTS_POSTGRES_URL=postgres://events_migrator:${EVENTS_MIGRATOR_POSTGRES_PASSWORD}@postgres/events
958+
- EVENTS_SUPERUSER_POSTGRES_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/events
959+
- SEARCH_URL=http://search:9090/
960+
- ES_HOST=search-user:${ROTATING_SEARCH_ELASTIC_PASSWORD}@elasticsearch:9200
961+
- INFLUX_HOST=influxdb
962+
- INFLUX_PORT=8086
963+
- INFLUX_DB=ocrvs
964+
- WAIT_HOSTS=mongo1:27017,influxdb:8086,minio:9000,elasticsearch:9200
965+
- MINIO_ACCESS_KEY=${MINIO_ROOT_USER}
966+
- MINIO_SECRET_KEY=${MINIO_ROOT_PASSWORD}
967+
- MINIO_HOST=minio
968+
- MINIO_PORT=9000
969+
- MINIO_BUCKET=ocrvs
970+
- SUPER_USER_PASSWORD=${SUPER_USER_PASSWORD}
971+
- MONGO_HOST=mongo1
972+
- MONGO_PORT=27017
973+
- MONGO_USERNAME=${MONGODB_ADMIN_USER}
974+
- MONGO_PASSWORD=${MONGODB_ADMIN_PASSWORD}
975+
- MONGO_REPLICA_SET=rs0
976+
deploy:
977+
labels:
978+
- 'traefik.enable=false'
979+
replicas: 1
980+
restart_policy:
981+
condition: on-failure
982+
networks:
983+
- overlay_net
984+
logging:
985+
driver: gelf
986+
options:
987+
gelf-address: 'udp://127.0.0.1:12201'
988+
tag: 'legacy-user-migration'
945989
# Configure other dependencies with deployment specifc details
946990
hearth:
947991
environment:
@@ -967,7 +1011,7 @@ services:
9671011
tag: 'hearth'
9681012

9691013
postgres:
970-
image: postgres:17.6
1014+
image: docker.io/chumaky/postgres_mongo_fdw:17.6_fdw5.5.2
9711015
networks:
9721016
- overlay_net
9731017
restart: unless-stopped

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"port-forward": "bash infrastructure/port-forward.sh",
2727
"environment:init": "ts-node infrastructure/environments/setup-environment.ts",
2828
"environment:upgrade": "yarn environment:init",
29-
"sort-translations": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/sort-translations.ts"
29+
"sort-translations": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/sort-translations.ts",
30+
"prepare": "husky"
3031
},
3132
"devDependencies": {
3233
"@inquirer/editor": "^1.2.13",
@@ -123,8 +124,5 @@
123124
},
124125
"resolutions": {
125126
"acorn": "^6.4.1"
126-
},
127-
"husky": {
128-
"hooks": {}
129127
}
130128
}

src/translations/client.csv

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ id,description,en,fr
22
action.action,Label for action button,Action,Action
33
action.archive,Label for archive record button in dropdown menu,Archive declaration,Déclaration d'archive
44
action.assignee,Label for asignee,Assigned to {name } at {officeName},Attribué à {name} chez {officeName}
5-
action.noActionsAvailable,Message shown on action menu if no actions are available,No actions available,Aucune action disponible
65
action.correct,Label for correct record button in dropdown menu,Correct record,Enregistrement correct
76
action.issue,Label for reinstate issue button in dropdown menu,Issue certificate,Délivrer un certificat
7+
action.noActionsAvailable,Message shown on action menu if no actions are available,No actions available,Aucune action disponible
88
action.print,Label for reinstate print button in dropdown menu,Print certified copy,Imprimer une copie certifiée
99
action.reinstate,Label for reinstate record button in dropdown menu,Reisntate declaration,Déclaration de rétablissement
1010
action.review.correction,Label for review correction in dropdown menu,Review correction request,Vérifier la demande de correction
@@ -49,6 +49,7 @@ advancedSearch.form.timePeriodLabel,Label for input Time period,Time period,Pér
4949
advancedSearch.registeredAt,Label for date of registration field,Date of registration,Date d'enregistrement
5050
advancedSearch.registeredAtLocation,Label for place of registration field,Place of registration,Lieu d'enregistrement
5151
advancedSearch.registeredAtLocation.helperText,Helper text for place of registration field,"Search for a province, district or registration office","Rechercher une province, un district ou un bureau d'enregistrement"
52+
advancedSearch.registrationNumber,Label for registration number field,Registration number,Numéro d'enregistrement
5253
advancedSearch.status,Label for status field,Status of record,Statut de l'enregistrement
5354
advancedSearch.trackingId,Label for tracking ID field,Tracking ID,ID de suivi
5455
advancedSearch.updatedAt,Label for date of update field,Time period,Période
@@ -808,6 +809,7 @@ event.birth.action.certificate.form.section.collectPayment.service.label,Title f
808809
event.birth.action.certificate.form.section.collectPayment.service.label.afterLateRegistrationTarget,Birth registration after 365 days of date of birth,Birth registration after 365 days of date of birth,Enregistrement de naissance après 365 jours de la date de naissance
809810
event.birth.action.certificate.form.section.collectPayment.service.label.beforeRegistrationTarget,Birth registration before 30 days of date of birth,Birth registration before 30 days of date of birth,Enregistrement de naissance avant 30 jours de la date de naissance
810811
event.birth.action.certificate.form.section.collectPayment.service.label.inBetweenRegistrationTargets,Birth registration after 30 days but before 365 days of date of birth,Birth registration after 30 days but before 365 days of date of birth,Enregistrement de naissance après 30 jours mais avant 365 jours de la date de naissance
812+
event.birth.action.certificate.form.section.requester.printInAdvance.label,This is the label for the print-in-advance of issuance field,Print in advance of issuance,Imprimer avant la délivrance
811813
event.birth.action.certificate.form.section.verifyIdentity.data.label,Label for identity verification data block,Identity details,Détails de l'identité
812814
event.birth.action.collect-certificate.label,This is shown as the action name anywhere the user can trigger the action from,Print,Imprimer
813815
event.birth.action.correction.form.section.requester.identity.verify.title,This is the title of the section,Verify their identity,Vérifier l'identité
@@ -861,12 +863,15 @@ event.birth.action.declare.form.section.person.field.passport.label,This is the
861863
event.birth.action.declare.label,This is shown as the action name anywhere the user can trigger the action from,Declare,Declare
862864
event.birth.action.delete.label,Label for delete button in dropdown menu,Delete,Supprimer
863865
event.birth.action.form.section.collector.other.field.name.label,This is the label for the name field of OTHER collector,Collector's name,Nom du collecteur
866+
event.birth.action.issued.audit-history-label,The label to show in audit history for the issued action,Issued,Émis
864867
event.birth.action.mark-as-duplicate.label,Label for review potential duplicate button in dropdown menu,Review,Revoir
865868
event.birth.action.register.label,Label for review record button in dropdown menu,Register,Enregistrer
866869
event.birth.action.reject.label,This is the label for the reject action,Reject,Rejeter
867870
event.birth.action.request-correction.label,This is shown as the action name anywhere the user can trigger the action from,Correct record,Enregistrement correct
868871
event.birth.action.validate.label,This is shown as the action name anywhere the user can trigger the action from,Validate,Valider
872+
event.birth.custom.action.approve.field.collector.label,Label for collector field,Collector,le collectionneur
869873
event.birth.custom.action.approve.field.notes.label,This is the label for the field for a custom action,Comments,Commentaires
874+
event.birth.flag.pending-certified-copy-issuance,Flag label for pending certified copy issuance,Pending certified copy issuance,En attente de la délivrance d'une copie certifiée conforme
870875
event.birth.label,This is what this event is referred as in the system,Birth,Naissance
871876
event.birth.summary.child.dob.empty,Label for date of birth not available,No date of birth,Pas de date de naissance
872877
event.birth.summary.child.placeOfBirth.empty,Label for place of birth not available,No place of birth,Pas de lieu de naissance
@@ -1017,12 +1022,6 @@ event.death.action.form.section.brn.label,Field for entering Birth Registration
10171022
event.death.action.form.section.collector.other.field.name.label,This is the label for the name field of OTHER collector,Collector's name,Nom du collecteur
10181023
event.death.action.form.section.drivingLicenseDetails.label,Field for entering Driving License details,Drivers License,Permis de conduire
10191024
event.death.action.form.section.idNumberOther.label,Field for entering ID Number if Other is selected,ID Number,Numéro d'identité
1020-
workqueues.pendingCertification.title,Title of pending certification workqueue,Pending Certification,En attente de certification
1021-
workqueues.pendingCertification.emptyMessage,Empty message for pending certification workqueue,No pending certification records,Aucun dossier de certification en attente
1022-
event.birth.action.certificate.form.section.requester.printInAdvance.label,This is the label for the print-in-advance of issuance field,Print in advance of issuance,Imprimer avant la délivrance
1023-
event.birth.flag.pending-certified-copy-issuance,Flag label for pending certified copy issuance,Pending certified copy issuance,En attente de la délivrance d'une copie certifiée conforme
1024-
event.birth.custom.action.approve.field.collector.label,Label for collector field,Collector,le collectionneur
1025-
event.birth.action.issued.audit-history-label,The label to show in audit history for the issued action,Issued,Émis
10261025
event.death.action.form.section.idType.alienNumber.label,Option for selecting Alien Number as the ID type,Alien Number,Numéro d'étranger
10271026
event.death.action.form.section.idType.brn.label,Option for selecting Birth Registration Number as the ID type,Birth Registration Number,Numéro d'enregistrement de naissance
10281027
event.death.action.form.section.idType.drivingLicense.label,Option for selecting Driving License as the ID type,Drivers License,Permis de conduire
@@ -2299,6 +2298,8 @@ views.qrReader.tutorial.lightBalance,Light balance tutorial,Ensure the QR code i
22992298
workqueues.dateOfEvent,Label for workqueue column: dateOfEvent,Date of Event,Date de l'événement
23002299
workqueues.draft.title,Title of draft workqueue,My drafts,Mes brouillons
23012300
workqueues.outbox.title,Title of outbox workqueue,Outbox,Boîte d'envoi
2301+
workqueues.pendingCertification.emptyMessage,Empty message for pending certification workqueue,No pending certification records,Aucun dossier de certification en attente
2302+
workqueues.pendingCertification.title,Title of pending certification workqueue,Pending Certification,En attente de certification
23022303
workqueues.requiresApproval.title,Title of pending approval workqueue,Pending approval,En attente d'approbation
23032304
wq.noRecords.CREATED,No records messages for empty draft tab,No records in progress,Aucun enregistrement en cours
23042305
wq.noRecords.DECLARED,No records messages for ready for review tab,No records ready for review,Aucun document prêt à être examiné

0 commit comments

Comments
 (0)