Skip to content

Commit feb0190

Browse files
committed
Merge branch 'develop' of github.com:opencrvs/opencrvs-countryconfig into ocrvs-10559
2 parents 9a71a61 + 96c5462 commit feb0190

File tree

24 files changed

+3322
-1227
lines changed

24 files changed

+3322
-1227
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
### Bug fixes
2929

3030
- Allow non-interactive upgrades with apt [#10204](https://github.com/opencrvs/opencrvs-core/issues/10204)
31+
- Don't restart events service after data cleanup [#10704](https://github.com/opencrvs/opencrvs-core/issues/10704)
32+
3133

3234
## 1.8.1
3335

infrastructure/clear-all-data.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,14 @@ echo "🚀 Reinitializing Postgres with on-deploy.sh..."
156156

157157
docker service update --force opencrvs_postgres-on-update
158158

159+
<<<<<<< HEAD
159160
docker service scale opencrvs_dashboards=0
160161
docker service scale opencrvs_dashboards=1
161162

162163
# Restart events service
163164
#-----------------------------
164165
docker service scale opencrvs_events=0
165166
docker service scale opencrvs_events=1
167+
=======
168+
echo "✅ All data cleared."
169+
>>>>>>> 96c546252c71fd70097d052974294735919881e5

infrastructure/docker-compose.deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ services:
692692
- jwt-public-key.{{ts}}
693693
environment:
694694
- NODE_ENV=production
695+
- APN_SERVICE_URL=http://apm-server:8200
695696
- EVENTS_MONGO_URL=mongodb://events:${EVENTS_MONGODB_PASSWORD}@mongo1/events?replicaSet=rs0
696697
- USER_MGNT_MONGO_URL=mongodb://user-mgnt:${USER_MGNT_MONGODB_PASSWORD}@mongo1/user-mgnt?replicaSet=rs0
697698
- ES_URL=http://search-user:${ROTATING_SEARCH_ELASTIC_PASSWORD}@elasticsearch:9200

infrastructure/metabase/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,24 @@
1010

1111
# OpenCRVS Dashboards
1212

13+
### Requirements
14+
15+
```
16+
❯ java -version
17+
openjdk version "21.0.8" 2025-07-15
18+
```
19+
1320
### Run in development mode
1421

1522
By default, Metabase is not started as part of the OpenCRVS stack as running it requires quite a bit of resources. You can use the following commands to use metabase in development:
1623

1724
`yarn metabase` – Starts Metabase in port http://localhost:4444
1825
`yarn db:shell` - In the metabase directory – open a SQL shell for the database Metabase created
26+
<<<<<<< HEAD
1927
`yarn db:clear:all` - Clears all analytics databases
28+
=======
29+
`yarn db:clear:all` - Clear data from analytics dashboard
30+
>>>>>>> 96c546252c71fd70097d052974294735919881e5
2031
2132
### Default credentials
2233

infrastructure/metabase/metabase.init.db.sql

Lines changed: 3139 additions & 1133 deletions
Large diffs are not rendered by default.

infrastructure/server-setup/playbook.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@
8787
- docker
8888
tags:
8989
- docker
90-
91-
- include_tasks:
92-
file: tasks/override-docker-startup.yml
93-
apply:
94-
tags:
95-
- docker
96-
tags:
97-
- docker
9890

9991
- include_tasks:
10092
file: tasks/deployment-user.yml
@@ -170,6 +162,13 @@
170162
become: yes
171163
become_method: sudo
172164
tasks:
165+
- include_tasks:
166+
file: tasks/override-docker-startup.yml
167+
apply:
168+
tags:
169+
- docker
170+
tags:
171+
- docker
173172
- include_tasks:
174173
file: tasks/elasticsearch.yml
175174
apply:
@@ -186,4 +185,18 @@
186185
tags:
187186
- traefik
188187

188+
# Ensure incorrectly created override of docker daemon (1.9 beta) is removed on workers
189+
- hosts: docker-workers
190+
become: yes
191+
become_method: sudo
192+
tasks:
193+
- name: Remove docker service override directory
194+
file:
195+
path: /etc/systemd/system/docker.service.d
196+
state: absent
197+
198+
- name: Reload systemd daemon to apply changes
199+
systemd:
200+
daemon_reload: yes
201+
189202
- import_playbook: backups.yml

letsencrypt-stg-root-x1.pem

Lines changed: 0 additions & 32 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@hapi/boom": "^9.1.1",
7070
"@hapi/hapi": "^20.0.1",
7171
"@hapi/inert": "^6.0.3",
72-
"@opencrvs/toolkit": "1.8.1-rc.a5eecfe",
72+
"@opencrvs/toolkit": "1.8.1-rc.4958667",
7373
"@types/chalk": "^2.2.0",
7474
"@types/csv2json": "^1.4.0",
7575
"@types/fhir": "^0.0.30",

src/analytics/analytics.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,16 @@ function convertDotKeysToUnderscore(
136136
return newObj
137137
}
138138

139-
export async function upsertAnalyticsEventActions(
139+
async function upsertAnalyticsEventActions(
140140
event: EventDocument,
141141
eventConfig: EventConfig,
142142
trx: Kysely<any>
143143
) {
144+
await trx
145+
.deleteFrom('analytics.event_actions')
146+
.where('event_id', '=', event.id)
147+
.execute()
148+
144149
for (let i = 0; i < event.actions.length; i++) {
145150
const actionsFromStartToCurrentPoint = event.actions
146151
.sort((a, b) => {

src/api/certificates/handler.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
1010
*/
1111

12-
import { conditionals } from '@countryconfig/form/common/custom-validation-conditionals/custom-conditionals'
1312
import { Event } from '@countryconfig/form/types/types'
1413
import { Request, ResponseToolkit } from '@hapi/hapi'
15-
import { ActionType, event, field } from '@opencrvs/toolkit/events'
16-
import { x } from 'joi'
14+
import { ActionType, event, not } from '@opencrvs/toolkit/events'
1715

1816
type FontFamilyTypes = {
1917
normal: string
@@ -270,7 +268,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
270268
conditionals: [
271269
{
272270
type: 'SHOW',
273-
conditional: field('child.dob').isAfter().days(365).inPast()
271+
conditional: not(event.hasAction(ActionType.PRINT_CERTIFICATE))
274272
}
275273
]
276274
},

0 commit comments

Comments
 (0)