Skip to content

Commit

Permalink
merge latest changes from ehrbase/ehrbase 20_01_2023 (#183)
Browse files Browse the repository at this point in the history
* chore(docs): github project documentation and guidelines

* chore(docs): PR template

* chore(docs): added mailing contacts and security disclosure policy

* Updated README about integration tests

* CDR-647 remove old participations on event_context update (ehrbase#1016)

* fix: removing non required trigger on audit details table (ehrbase#1020)

* empty validation on language

* Update CHANGELOG.md

* unwrap if match additional double quotes (ehrbase#1022)

* unwrap if match with additional double quotes

* Update CHANGELOG.md

* validate if party already exist for exr

* Revert "validate if party already exist for exr"

This reverts commit 8341496.

* validate if party already exist for exr

* Update CHANGELOG.md

* fix when subject is empty

* Deleted docker-example folder

* Remove duplicates from README

* Update maven version for circle ci

* refactoring

* refactoring

* refactoring

* add message details

* add management endpoints access control

* add management base path from the properties file

* add management endpoints access control

* add import

* change error description

* Feature/cdr 595 (ehrbase#1025)

* Added Security/Authorization Support

* Applied Spotless

* Fixed CDR-655

* apply spotless

Co-authored-by: MBA <michael.baumann@vitagroup.ag>
Co-authored-by: stefan.spiska <stefan.spiska@vitagroup.ag>

* update CHANGELOG.md

* update CHANGELOG.md

* update CHANGELOG.md

* update CHANGELOG.md

* add comments

* remove comments

* remove unused class

* try to fix

* Revert "try to fix"

This reverts commit d94944c.

* Impl. Tenant readyness for plugins

* Applied Spotless

* Applied change requests

* Merge conflict

* Removed duplicate code

* Added change log

* Applied spotless

* Fix PR template

* error name change

* Remove test-defect as robot tests are in a dedicated repository

* Feature/cdr 614 (ehrbase#1035)

* feat: change executor for SECURITY_TESTS Robot suite - add Mockserver

* feat: test cdr-614

* feat: test cdr-614

* fix: add machine to docker-mock-server executor

* fix: add docker-mock-server executor to SECURITY-test

* fix: configurations fix for circle-ci pipeline

* fix: add Docker image to docker-mock-server

* fix: test pipeline

* fix: test pipeline with new executor on SECURITY-test

* fix: test pipeline with new executor on SECURITY-test

* fix: add step to install docker-compose

* fix: add sudo to mv folder contents when using docker-compose

* fix: adjust to Debian commands

* fix: add setup_remote_docker

* fix: remove Build test image step

* fix: install and start mockserver from docker image

* fix: test pipeline for CDR-614

* fix: test pipeline for CDR-614 with port 1080 on mockserver

* fix: test pipeline execution for SECURITY-tests

* fix: test pipeline execution for SECURITY-tests with fixed positional args

* fix: test mockserver with port 1080

* fix: test mockserver with port 1080

* fix: test pipeline execution with abac.enabled=true

* fix: test pipeline execution with positional args fix

* fix np on checkAbacPre when missed ehr id (ehrbase#1031)

* fix np on checkAbacPre when missed ehr id

* Feature/cdr 661 valid template returns 400 (ehrbase#1029)

* fix XML as fallback for empty header
* not acceptable when json

* add semver validation (ehrbase#1032)

* Bugfix/cdr 654 storing queries detailed error version (ehrbase#1039)

* Sync/feature/cdr 525 stored query text plain request (ehrbase#1021)

* Added read the docs badge

Co-authored-by: Maxim Ni <maxim.ni@vitasystems.dev>
Co-authored-by: Alex Vidrean <alex.vidrean@gmail.com>
Co-authored-by: vmueller-vg <100680528+vmueller-vg@users.noreply.github.com>
Co-authored-by: Robert Hunter <50167182+robert-hunter-nes@users.noreply.github.com>
Co-authored-by: Dmitry Tulba <tulbad1@gmail.com>
Co-authored-by: Alex <alexandru.vidrean.ext@vitagroup.ag>
Co-authored-by: Michael Baumann <micha.bau@gmx.de>
Co-authored-by: MBA <michael.baumann@vitagroup.ag>
Co-authored-by: stefan.spiska <stefan.spiska@vitagroup.ag>
Co-authored-by: vladislavploaia <100927963+vladislavploaia@users.noreply.github.com>
  • Loading branch information
11 people committed Jan 20, 2023
1 parent 4c92131 commit 2369549
Show file tree
Hide file tree
Showing 40 changed files with 953 additions and 357 deletions.
51 changes: 43 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ jobs:


SECURITY-test:
executor: machine-ubuntu-2004
executor: machine-ubuntu-2004 #docker-mock-server #machine-ubuntu-2004
environment:
SUT: TEST
SECURITY_AUTHTYPE: OAUTH
Expand All @@ -1329,6 +1329,8 @@ jobs:
- install-java17
- git-clone-robot-integration-tests-repo
- move-integration-tests-content-to-local-tests-folder
#- download-and-install-docker-compose
- download-and-install-mockserver
- install-and-configure-keycloak
- run-robot-tests:
sut: "TEST -v AUTH_TYPE:OAUTH"
Expand Down Expand Up @@ -1755,8 +1757,9 @@ commands:
EHRbase_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version" -v . pom.xml )
echo ${EHRbase_VERSION}
cd ~/projects # NOTE: This is where the target folder w/ artifacts were persisted to in previous step.
echo "" > log
java -javaagent:/home/circleci/jacoco/lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1 \
-jar application/target/application-${EHRbase_VERSION}.jar --cache.enabled=true --plugin-manager.enable=true --plugin-manager.plugin-dir='tests/test_plugin' --plugin-manager.plugin-config-dir='tests/test_plugin_config_dir'> log &
-jar application/target/application-${EHRbase_VERSION}.jar --cache.enabled=true --plugin-manager.enable=true --plugin-manager.plugin-dir='tests/test_plugin' --plugin-manager.plugin-config-dir='tests/test_plugin_config_dir'>> log &
grep -m 1 "Started EhrBase in" <(tail -f log)
cd ~/projects/openEHR_SDK
jps
Expand Down Expand Up @@ -2064,24 +2067,55 @@ commands:
install-maven:
description: Install Maven 3.8.6 (if not already installed)
description: Install Maven 3.8.7 (if not already installed)
steps:
- run:
name: Install Maven tool
command: |
sudo killall -9 apt-get || true
if [ ! -d "/usr/lib/maven/apache-maven-3.8.6" ]; then
wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz -O /tmp/maven.tar.gz
if [ ! -d "/usr/lib/maven/apache-maven-3.8.7" ]; then
wget https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz -O /tmp/maven.tar.gz
sudo mkdir -p /usr/lib/maven
sudo tar xfvz /tmp/maven.tar.gz --directory /usr/lib/maven
rm -f /tmp/maven.tar.gz
export MAVEN_HOME=/usr/lib/maven/apache-maven-3.8.6
export MAVEN_HOME=/usr/lib/maven/apache-maven-3.8.7
export PATH=$MAVEN_HOME/bin:$PATH
sudo update-alternatives --install /usr/bin/mvn mvn /usr/lib/maven/apache-maven-3.8.6/bin/mvn 100
sudo update-alternatives --set mvn /usr/lib/maven/apache-maven-3.8.6/bin/mvn
sudo update-alternatives --install /usr/bin/mvn mvn /usr/lib/maven/apache-maven-3.8.7/bin/mvn 100
sudo update-alternatives --set mvn /usr/lib/maven/apache-maven-3.8.7/bin/mvn
fi
mvn --version
download-and-install-docker-compose:
description: Download and install docker compose image
steps:
- setup_remote_docker:
docker_layer_caching: true
version: 20.10.12
- run:
name: Download and Install Docker instance
command: |
sudo apt -y update && sudo apt upgrade && sudo apt install curl
curl -L "https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-linux-x86_64" -o ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose
- run:
name: Spin up database
command: |
docker-compose down -v
docker-compose up -d
download-and-install-mockserver:
description: Download and install latest version of Mockserver Docker image
steps:
- run:
name: Download mockserver
command: |
docker pull mockserver/mockserver
- run:
name:
command: |
docker run -d --rm -p 1080:1080 --env MOCKSERVER_SERVER_PORT=1080 mockserver/mockserver
install-and-configure-keycloak:
description: Setups a Keycloak Docker instance and restores a previously exportd configuration.
steps:
Expand Down Expand Up @@ -2545,6 +2579,7 @@ executors:
environment:
MOCKSERVER_SERVER_PORT: 1080
MOCKSERVER_LOG_LEVEL: DEBUG
- image: docker:17.05.0-ce-git

docker-py3-postgres-ci-timezone-berlin-postgres-timezone-berlin:
working_directory: ~/projects
Expand Down
41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/defect(robot).md

This file was deleted.

35 changes: 12 additions & 23 deletions .github/ISSUE_TEMPLATE/defect.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Bug
about: Something is not working as expected and must be fixed
about: Report a bug encountered when working with EHRbase
labels: bug
---

## Configuration information
# Environment information

<!-- To reproduce your problem is is mandatory to give the following information. You can get all of
them in one step by starting the EHRbase and requesting a GET on
`%ehrbaseBaseUri%/ehrbase/rest/status`. -->
> To help reproducing your problem it is mandatory to give some information on the environment. You can get an aggregate of this data by starting EHRbase and performing a GET request on
`%ehrbaseBaseUri%/ehrbase/rest/status`.

- EHRbase version:
- openEHR_SDK version:
Expand All @@ -17,28 +16,18 @@ them in one step by starting the EHRbase and requesting a GET on
- Java Runtime version:
- Operating System version:

## Steps to reproduce ##
# Steps to reproduce

<!-- Describe here what steps have to be executed with which data entered to reproduce the erroneous
behaviour. Also include Operational Templates as an attachment if used. -->
> Describe the steps that you have taken until the unexpected behavior occurred. Please try to add as many details as possible, and include data and templates as attachments.
## Actual result ##
# Actual result

<!-- Describe the wrong output / behaviour. Attached images are always helpful. -->
> Describe the wrong output / behavior.
## Expected result (Acceptance Criteria) ##
# Expected result

<!-- Describe the expected output / behaviour. -->
> Describe the expected output / behavior.
## Definition of Done ##
# Further information

<!-- These checklist entries are used by our developers to deliver a solution with a base quality
we want to acheive. If you want to add other points specific to this issue, put them into the section
"Expected result (Acceptance Criteria)" -->

- [ ] The defect is checked by an unit or an integration test (Robot)
- [ ] Merge Request approved
- [ ] Unit tests passed
- [ ] Build without errors
- [ ] Release notes prepared
- [ ] No additional runtime warnings
> Add additional information, if needed.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Enhancement
about: Enhancement proposal for a new / extended functionality of EHRbase
labels: enhancement
---

# Background

> Describe the context and intention for this enhancement, such as the benefits and impacts on the user.
# Enhancement

> Provide specific preconditions, steps, requirements or expectations on the proposed enhancement
# Further information

> Add additional information, if needed.
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/feature-story.md

This file was deleted.

17 changes: 7 additions & 10 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
---
name: Task
about: A general task that has to be done. Can be a research or other common work to be done.
about: A general task, e.g. research or other common work to be done
labels: task
---
## Background ##

<!-- Describe the task and the research goal that is expected after this issue has been moved to done -->
# Background

## Acceptance Criteria ##
> Describe the goal of this task, and the expectations or impacts on EHRbase after this task has been completed.
<!-- Add items here or describe what is expected as the result of the task, i.e. a wiki entry, a
conceptual document or a configured tool that executes recurring tasks. -->
# Task specification

- [ ] Item1
> Add specific steps or work descriptions with the expected results.
## Definition of Done ##
# Further information

- [ ] Output has been reviewed or presented and has been approved
- [ ] Documentation has been updated (Sphinx, Javadoc, Guidelines, etc.) if applicable
> Add additional information, if needed.
22 changes: 14 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
## Changes

<!-- Describe your changes in a short list -->
# Changes

- First change
> Describe your changes in a short and concise list.
## Related issue
# Related issue

<!-- Use one of the closing keywords like "Closes" or "Fixes" to link the corresponding issue (see https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword for help) -->
> Reference related issues, and use one of the [closing keywords, e.g. closes or fixes](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) to link the corresponding issue, if any.
# Additional information

## Additional information and checks
> Provide additional information for this change, if needed.
<!-- If there are more checks or data to be provided, put it here -->
# Pre-Merge checklist

- [ ] Pull request linked in changelog
- [ ] New code is tested
- [ ] Present and new tests pass
- [ ] Documentation is updated
- [ ] The build is working without errors
- [ ] No new Sonar issues introduced
- [ ] Changelog is updated
- [ ] Code has been reviewed
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,20 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased]
### Added
- add caches for ehr.concept, ehr.territory, ehr.language([#1007](https://github.com/ehrbase/ehrbase/pull/1007))
- add stored query text plain request support ([#1021](https://github.com/ehrbase/ehrbase/pull/1021))
- unwrap if match additional double quotes ([#1022](https://github.com/ehrbase/ehrbase/pull/1022))
- general support for tenants and authorization for plugins
- Expose management and swagger endpoints publicly([#1030](https://github.com/ehrbase/ehrbase/pull/1030))
### Changed
- use caffeine cache instead of ehcache as ehcache has unnecessary blocking([#1007](https://github.com/ehrbase/ehrbase/pull/1007))
- remove unnecessary DB queries([#1007](https://github.com/ehrbase/ehrbase/pull/1007))
### Fixed
- maintain a correct history of participations([#1016](https://github.com/ehrbase/ehrbase/pull/1016))
- Fixed NullPointerException when language is missing ([#1023](https://github.com/ehrbase/ehrbase/pull/1023))
- Endpoint for storing queries gives a detailed error regarding incorrect version([#1032](https://github.com/ehrbase/ehrbase/pull/1032))
- Fixes NullPointerException while sending ehr status request(GET/PUT) when abac is enabled ([#1031](https://github.com/ehrbase/ehrbase/pull/1031))
- Fixed status update if party already exist for ehr([#1024](https://github.com/ehrbase/ehrbase/pull/1024))
- Change response code from 400 to 406 Not Acceptable on querying POST template endpoint with unsupported `Accept` header application/json([#1029](https://github.com/ehrbase/ehrbase/pull/1029))

## [0.23.0]
### Added
Expand Down
Loading

0 comments on commit 2369549

Please sign in to comment.