Skip to content

Commit 3e992db

Browse files
authored
Merge branch 'develop' into Add-collector-form-field-to-handlebars-context
2 parents 22b23a7 + f89e807 commit 3e992db

File tree

289 files changed

+9450
-3001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+9450
-3001
lines changed

.github/workflows/deploy-to-feature-environment.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ jobs:
7070
author: ${{ steps.get_author.outputs.AUTHOR }}
7171
slugified_branch: ${{ steps.slugify_bname.outputs.stack }}
7272
e2e_branch: ${{ steps.get_e2e_branch.outputs.branch }}
73-
runtime: ${{ steps.identify_runtime.outputs.runtime }}
7473
steps:
7574
- uses: actions/checkout@v5
7675

@@ -175,18 +174,6 @@ jobs:
175174
.replace(/^[^a-z0-9]+|[^a-z0-9]+$/g, '');
176175
}
177176
core.setOutput('stack', slugify('${{ env.BRANCH_NAME }}'));
178-
- name: Identify deployment runtime
179-
id: identify_runtime
180-
run: |
181-
if [[ ! -f .kube ]]; then
182-
echo "Repository is not compatible with kubernetes"
183-
runtime="docker"
184-
elif (( stack_id % 10 < 7 )); then
185-
runtime="k8s"
186-
else
187-
runtime="docker"
188-
fi
189-
echo "runtime=$runtime" >> $GITHUB_OUTPUT
190177
191178
trigger-build:
192179
if: ${{ (github.event_name == 'workflow_dispatch') || (!contains(github.actor, 'bot') && github.event.pull_request.head.repo.fork == false) }}
@@ -307,7 +294,7 @@ jobs:
307294
id: print-links
308295
run: |
309296
E2E_RUN_LINK="https://github.com/opencrvs/e2e/actions/runs/${{ steps.dispatch_e2e.outputs.run_id }}"
310-
DEPLOYMENT_LINK="https://${{ steps.generate_stack.outputs.stack }}.opencrvs.dev"
297+
DEPLOYMENT_LINK="https://${{ steps.generate_stack.outputs.stack }}.e2e-k8s.opencrvs.dev"
311298
312299
echo """
313300
# E2E Environment summary

.github/workflows/publish-toolkit-to-npm.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
push:
1818
branches:
1919
- '*'
20+
tags:
21+
- '*'
2022

2123
jobs:
2224
publish:
@@ -35,14 +37,19 @@ jobs:
3537
id: check-version
3638
run: |
3739
PACKAGE_VERSION=$(node -p "require('../../package.json').version")
38-
TOOLKIT_VERSION=$PACKAGE_VERSION-rc.$(git rev-parse --short=7 HEAD)
40+
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
41+
TOOLKIT_VERSION="$GITHUB_REF_NAME"
42+
else
43+
TOOLKIT_VERSION="$PACKAGE_VERSION-rc.$(git rev-parse --short=7 HEAD)"
44+
fi
3945
if npm view @opencrvs/toolkit@$TOOLKIT_VERSION > /dev/null 2>&1; then
4046
echo "Version $TOOLKIT_VERSION already exists on npm."
4147
echo "version-exists=true" >> $GITHUB_OUTPUT
4248
else
4349
echo "Version $TOOLKIT_VERSION does not exist on npm."
4450
echo "version-exists=false" >> $GITHUB_OUTPUT
4551
fi
52+
echo "toolkit-version=$TOOLKIT_VERSION" >> $GITHUB_OUTPUT
4653
working-directory: packages/toolkit
4754

4855
- name: Install dependencies
@@ -63,8 +70,7 @@ jobs:
6370
- name: Update package.json version
6471
if: steps.check-version.outputs.version-exists == 'false'
6572
run: |
66-
PACKAGE_VERSION=$(node -p "require('../../package.json').version")
67-
TOOLKIT_VERSION=$PACKAGE_VERSION-rc.$(git rev-parse --short=7 HEAD)
73+
TOOLKIT_VERSION="${{ steps.check-version.outputs.toolkit-version }}"
6874
jq --arg version "$TOOLKIT_VERSION" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
6975
working-directory: packages/toolkit
7076

.kube

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

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

3+
## 1.9.1
4+
5+
### Breaking changes
6+
7+
- **Removed support for following scopes**
8+
- `NATLSYSADMIN`
9+
- `DECLARE`
10+
- `VALIDATE`
11+
- `CERTIFY`
12+
- `PERFORMANCE`
13+
- `SYSADMIN`
14+
- `TEAMS`
15+
- `CONFIG`
16+
- `RECORD_EXPORT_RECORDS`
17+
- `RECORD_DECLARATION_PRINT`
18+
- `RECORD_PRINT_RECORDS_SUPPORTING_DOCUMENTS`
19+
- `RECORD_REGISTRATION_PRINT`
20+
- `RECORD_PRINT_CERTIFIED_COPIES`
21+
- `RECORD_REGISTRATION_VERIFY_CERTIFIED_COPIES`
22+
- `PROFILE_UPDATE`
23+
324
## 1.9.0 Release candidate
425

526
### New features
@@ -11,6 +32,7 @@
1132
- Add Import/Export system client and `record.export` scope to enable data migrations [#10415](https://github.com/opencrvs/opencrvs-core/issues/10415)
1233
- Add an Alpha version of configurable "Print" button that will be refactored in a later release - this button can be used to print certificates during declaration/correction flow. [#10039](https://github.com/opencrvs/opencrvs-core/issues/10039)
1334
- Add bulk import endpoint [#10590](https://github.com/opencrvs/opencrvs-core/pull/10590)
35+
- Add multi-field search with a single component [#10617](https://github.com/opencrvs/opencrvs-core/issues/10617)
1436

1537
### Improvements
1638

@@ -37,6 +59,8 @@
3759

3860
- Renamed `COUNTRY_CONFIG_URL``COUNTRY_CONFIG_URL_EXTERNAL` in the auth service to make its purpose clearer and more explicit.
3961

62+
- Tiltfile: Improved Kubernetes support for development environment [#10672](https://github.com/opencrvs/opencrvs-core/issues/10672)
63+
4064
### Bug fixes
4165

4266
- Fix informant details not populating in API [#10311](https://github.com/opencrvs/opencrvs-core/issues/10311)

Tiltfile

Lines changed: 16 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,19 @@
1-
############################################################
2-
# Please check readme at: https://github.com/opencrvs/infrastructure/tree/develop
3-
############################################################
4-
5-
############################################################
6-
# Variables declaration:
7-
############################################################
8-
# Core images tag: usually "develop" or one of release name:
9-
# - v1.7.0
10-
# - v1.7.1
11-
# NOTE: It could take any value from https://github.com/orgs/opencrvs/packages
12-
# If you are under opencrvs-core repository, please use "local" tag
13-
# Tilt will build new image every time when changes are made to repository
14-
core_images_tag="local"
1+
##########################################################################
2+
# Tiltfile: OpenCRVS Core developer
3+
# For more information about variables, please check:
4+
# https://github.com/opencrvs/infrastructure/blob/develop/Tiltfile
155

16-
# Countryconfig/Farajaland image repository and tag
17-
# Usually image repository value is to your repository on DockerHub
18-
# If for some reason you don't have DockerHub account yet, please create
19-
# you local registry
20-
# (see: https://medium.com/@ankitkumargupta/quick-start-local-docker-registry-35107038242e)
6+
core_images_tag = "local"
217
countryconfig_image_name="opencrvs/ocrvs-countryconfig"
22-
# If you are under opencrvs-countryconfig or your own repository, please use "local" tag,
23-
# Tilt will build new image every time when changes are made to repository
248
countryconfig_image_tag="develop"
259

26-
# Namespaces:
27-
opencrvs_namespace = 'opencrvs-dev'
28-
dependencies_namespace = 'opencrvs-deps-dev'
29-
30-
# Security enabled:
31-
# Configure security for dependencies and OpenCRVS services:
32-
# - Setup MinIO admin user and password
33-
# - Configure Redis users
34-
# - Sync passwords between dependencies and OpenCRVS services
35-
security_enabled = True
36-
37-
# Checkout infrastructure directory if not exists
10+
load('ext://git_resource', 'git_checkout')
3811
if not os.path.exists('../infrastructure'):
39-
local("git clone [email protected]:opencrvs/infrastructure.git ../infrastructure")
40-
41-
# Load extensions for namespace and helm operations
42-
load('ext://helm_resource', 'helm_resource', 'helm_repo')
43-
load('ext://namespace', 'namespace_create', 'namespace_inject')
44-
load("../infrastructure/tilt/lib.tilt", "copy_secrets", "reset_environment", "seed_data")
45-
46-
include('../infrastructure/tilt/common.tilt')
47-
48-
# If your machine is powerful feel free to change parallel updates from default 3
49-
update_settings(max_parallel_updates=1)
12+
# FIXME: Replace ocrvs-10672 to develop after testing
13+
git_checkout('[email protected]:opencrvs/infrastructure.git#ocrvs-10672', '../infrastructure')
14+
if not os.path.exists('../infrastructure/tilt/opencrvs.tilt'):
15+
fail('Something went wrong while cloning infrastructure repository!')
16+
load('../infrastructure/tilt/opencrvs.tilt', 'setup_opencrvs')
5017

5118
############################################################
5219
# Build images:
@@ -103,50 +70,12 @@ def build_services():
10370

10471
build_services()
10572

106-
############################################################
107-
# Deploy workloads:
108-
############################################################
109-
110-
# Create namespaces:
111-
# - opencrvs-deps-dev, dependencies namespace
112-
# - opencrvs-dev, main namespace
113-
namespace_create(dependencies_namespace)
114-
namespace_create(opencrvs_namespace)
11573

116-
######################################################
117-
# OpenCRVS Dependencies Deployment
118-
# NOTE: This helm chart can be deployed as helm release
119-
if security_enabled:
120-
deps_configuration_file = '../infrastructure/examples/localhost/dependencies/values-dev-secure.yaml'
121-
opencrvs_configuration_file = '../infrastructure/examples/localhost/opencrvs-services/values-dev-secure.yaml'
122-
else:
123-
deps_configuration_file = '../infrastructure/examples/localhost/dependencies/values-dev.yaml'
124-
opencrvs_configuration_file = '../infrastructure/examples/localhost/opencrvs-services/values-dev.yaml'
125-
k8s_yaml(helm('../infrastructure/charts/dependencies',
126-
namespace=dependencies_namespace,
127-
values=[deps_configuration_file]))
128-
129-
######################################################
130-
# OpenCRVS Deployment
131-
k8s_yaml(
132-
helm('../infrastructure/charts/opencrvs-services',
133-
namespace=opencrvs_namespace,
134-
values=[opencrvs_configuration_file],
135-
set=[
136-
"image.tag={}".format(core_images_tag),
137-
"countryconfig.image.name={}".format(countryconfig_image_name),
138-
"countryconfig.image.tag={}".format(countryconfig_image_tag)
139-
]
140-
)
74+
setup_opencrvs(
75+
infrastructure_path='../infrastructure',
76+
core_images_tag=core_images_tag,
77+
countryconfig_image_name=countryconfig_image_name,
78+
countryconfig_image_tag=countryconfig_image_tag,
14179
)
14280

143-
#######################################################
144-
# Add Data Tasks to Tilt Dashboard
145-
reset_environment(opencrvs_namespace, opencrvs_configuration_file)
146-
147-
seed_data(opencrvs_namespace, opencrvs_configuration_file)
148-
149-
if security_enabled:
150-
copy_secrets(dependencies_namespace, opencrvs_namespace)
151-
15281
print("✅ Tiltfile configuration loaded successfully.")

license-config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
"packages/components/.storybook/preview.jsx",
3939
"packages/components/.storybook/manager-head.html",
4040
"grafana",
41-
"packages/client/storybook-static",
41+
"packages/client/public/assets/qr-sample.webm",
4242
"packages/client/.storybook/preview-head.html",
43+
"packages/client/storybook-static",
4344
"packages/scheduler/start.sh",
4445
"packages/scheduler/crontab",
4546
"packages/scheduler/jobs/*",
@@ -52,6 +53,7 @@
5253
"packages/commons/src/events/EventUpdateFlow.mermaid",
5354
"packages/events/src/storage/postgres/events/schema/**/*.ts",
5455
"packages/events/.kanelrc.js",
56+
"packages/dashboards/data/metabase/*",
5557
"packages/events/src/tests/extract-dump.sh",
5658
".kube"
5759
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "OpenCRVS core workspace",
33
"license": "MPL-2.0",
4-
"version": "1.8.1",
4+
"version": "1.9.0",
55
"private": true,
66
"os": [
77
"darwin",

packages/auth/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/auth",
3-
"version": "1.8.1",
3+
"version": "1.9.0",
44
"description": "OpenCRVS authentication service",
55
"license": "MPL-2.0",
66
"private": true,
@@ -20,7 +20,7 @@
2020
"dependencies": {
2121
"@hapi/boom": "^9.1.1",
2222
"@hapi/hapi": "^20.0.1",
23-
"@opencrvs/commons": "^1.7.0",
23+
"@opencrvs/commons": "^1.9.0",
2424
"app-module-path": "^2.2.0",
2525
"dotenv": "^6.1.0",
2626
"envalid": "^8.0.0",

packages/auth/src/features/refresh/handler.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ describe('authenticate handler receives a request', () => {
9696
const [, payload] = token.split('.')
9797
const body = JSON.parse(Buffer.from(payload, 'base64').toString())
9898
expect(body.scope).toEqual([
99-
SCOPES.SYSADMIN,
100-
SCOPES.NATLSYSADMIN,
10199
SCOPES.USER_CREATE,
102100
SCOPES.USER_READ,
103101
SCOPES.USER_UPDATE,
@@ -119,7 +117,7 @@ describe('authenticate handler receives a request', () => {
119117
jest.spyOn(authService, 'authenticate').mockReturnValue({
120118
id: '1',
121119
role: 'NATIONAL_SYSTEM_ADMIN',
122-
scope: ['natlsysadmin'],
120+
scope: [],
123121
username: '+345345343'
124122
})
125123

packages/auth/src/features/verifyCode/handler.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ describe('authenticate handler receives a request', () => {
8888
const [, payload] = res.result!.token.split('.')
8989
const body = JSON.parse(Buffer.from(payload, 'base64').toString())
9090
expect(body.scope).toEqual([
91-
SCOPES.SYSADMIN,
92-
SCOPES.NATLSYSADMIN,
9391
SCOPES.USER_CREATE,
9492
SCOPES.USER_READ,
9593
SCOPES.USER_UPDATE,

0 commit comments

Comments
 (0)