Skip to content

Commit

Permalink
Merge branch 'main' into version-update
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrichton authored Mar 8, 2024
2 parents 4c74973 + 963ad8c commit eacf984
Show file tree
Hide file tree
Showing 82 changed files with 1,829 additions and 1,875 deletions.
3 changes: 2 additions & 1 deletion .env.cluster
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ GF_SERVER_DOMAIN=grafana.domain

# Client Registry - JeMPI
JEMPI_WEB_INSTANCES=3
REACT_APP_JEMPI_BASE_URL=https://jempi-api.domain/JeMPI
REACT_APP_JEMPI_BASE_API_HOST=https://jempi-api.domain
REACT_APP_JEMPI_BASE_API_PORT=50000
JEMPI_SESSION_SECURE=true
JEMPI_REPMGR_PARTNER_NODES=jempi-postgresql-01,jempi-postgresql-02,jempi-postgresql-03
JEMPI_ASYNC_RECEIVER_INSTANCES=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run-e2e-tests:
runs-on: ubuntu-20.04
needs: configure-e2e-server
timeout-minutes: 80
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
# replaces latest with the version of the release in the config.yaml file
- name: Set version
run: |
sed -i "s/latest/${{ github.event.release.tag_name }}/g" config.yaml
- name: Build Releases
run: ./get-cli.sh

- name: Test binaries
run: ./instant-linux help

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./instant-linux
./instant-macos
./instant.exe
./config.yml
./banner.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./config.yml
./banner.txt
./cdr-dw.env
./cdr.env
./mpi.env
11 changes: 6 additions & 5 deletions .github/workflows/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ CHANGED_FILES=($@)

cd ../../test/cucumber/ || exit

# This ensures that the openhim and its mediators' tests are run only once when the openhim and its mediators have all been modified
openhimRan="false"

declare -A changed_packages
for package in "${CHANGED_FILES[@]}"; do
if [[ $package == *"features/cluster-mode"* ]]; then
Expand All @@ -28,12 +31,10 @@ elif [[ "${!changed_packages[*]}" == *"features/single-mode"* ]] && [[ $NODE_MOD
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:single
elif [[ "${!changed_packages[*]}" == *"features/cluster-mode"* ]] && [[ $NODE_MODE == "cluster" ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:cluster
elif [[ "${!changed_packages[*]}" == *"infrastructure"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE"
elif [[ "${!changed_packages[*]}" == *"infrastructure"* ]] && [[ $openhimRan == "false" ]]; then
openhimRan="true"
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":openhim
else
# This ensures that the openhim and its mediators' tests are run only once when the openhim and its mediators have all been modified
openhimRan="false"

for folder_name in "${!changed_packages[@]}"; do
echo "$folder_name was changed"

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"json.schemas": [
{
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openhie/package-base:2.1.3
FROM openhie/package-base:2.2.0

# Install yq
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.23.1/yq_linux_amd64 -o /usr/bin/yq
Expand Down
60 changes: 45 additions & 15 deletions analytics-datastore-clickhouse/importer/config/clickhouseTables.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,52 @@
const CLUSTERED_MODE = process.env.CLUSTERED_MODE || 'true';
const CLUSTERED_MODE = process.env.CLUSTERED_MODE || "false";

const queries =
Boolean(CLUSTERED_MODE) === true
CLUSTERED_MODE === "true"
? [
`CREATE TABLE default_table(
createdAt Date,
updatedAt Date
)
ENGINE=MergeTree
ORDER BY tuple();`,
`CREATE TABLE patient_example ON CLUSTER '{cluster}' (
id String,
version String NULL,
inserted_at DateTime DEFAULT now(),
last_updated Date NULL,
goldenId String,
patientGivenName String,
patientFamilyName String,
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/{table}', '{replica}')
ORDER BY tuple();`,
`CREATE TABLE observation_example ON CLUSTER '{cluster}' (
id String,
version String NULL,
inserted_at DateTime DEFAULT now(),
last_updated Date NULL,
observationValue Double,
patientId String,
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/{table}', '{replica}')
ORDER BY tuple();`,
]
: [
`CREATE TABLE default.default_table ON CLUSTER '{cluster}' (
createdAt Date,
updatedAt Date
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/{table}', '{replica}')
ORDER BY tuple();`,
: [
`CREATE TABLE patient_example(
id String,
version String NULL,
inserted_at DateTime DEFAULT now(),
last_updated Date NULL,
goldenId String,
patientGivenName String,
patientFamilyName String,
)
ENGINE=MergeTree
ORDER BY tuple();`,
`CREATE TABLE observation_example(
id String,
version String NULL,
inserted_at DateTime DEFAULT now(),
last_updated Date NULL,
observationValue Double,
patientId String,
)
ENGINE=MergeTree
ORDER BY tuple();`,
];

module.exports = queries;
20 changes: 20 additions & 0 deletions cdr-dw.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# General
CLUSTERED_MODE=false

# Log
DEBUG=0
BASHLOG_FILE=0
BASHLOG_FILE_PATH=platform.log

# Message Bus - Kafka
# !NOTE: Topics should comma seperated, optional include partion and repliction values
# e.g. <topic>:<partions>:<replicationFactor> -> test:3:2 (defaults to <topics>:3:1)
KAFKA_TOPICS=2xx,2xx-async,errors,reprocess,3xx,patient,observation,JeMPI-audit-trail

# SSO
KC_OPENHIM_SSO_ENABLED=true
OPENHIM_CONSOLE_SHOW_LOGIN=false
KC_JEMPI_SSO_ENABLED=true
REACT_APP_JEMPI_BASE_API_PORT=50001
KC_SUPERSET_SSO_ENABLED=true
KC_GRAFANA_SSO_ENABLED=true
19 changes: 19 additions & 0 deletions cdr.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# General
CLUSTERED_MODE=false

# Log
DEBUG=0
BASHLOG_FILE=0
BASHLOG_FILE_PATH=platform.log

# Message Bus - Kafka
# !NOTE: Topics should comma seperated, optional include partion and repliction values
# e.g. <topic>:<partions>:<replicationFactor> -> test:3:2 (defaults to <topics>:3:1)
KAFKA_TOPICS=2xx,2xx-async,errors,reprocess,3xx,patient,observation,JeMPI-audit-trail

# SSO
KC_OPENHIM_SSO_ENABLED=true
OPENHIM_CONSOLE_SHOW_LOGIN=false
KC_JEMPI_SSO_ENABLED=true
REACT_APP_JEMPI_BASE_API_PORT=50001
KC_GRAFANA_SSO_ENABLED=true
Loading

0 comments on commit eacf984

Please sign in to comment.