TipzCM ae67e7b55e
Batch2 workchunk states hapi (#5851)
* step 1

* updated batch 2 framework with READY state

* spotless

* remove entity manager

* spotless

* fixing up more tests for batch2

* updating documentation

* cleanup

* removing checkstyle violation

* code review points

* review points continued

* review poitns finished

* updating tests

* updates

* spotless

* updated

* step 1

* updated

* sketch out test cases

* basic state transition shell work

* typos

* spotless

* adding spy override

* fixing tests

* spotless

* changing comment to complete build

* fixing some tests and adding a view

* adding different paging mechanism

* spotless

* waiting step 1

* commit changes

* remove text

* review fixes

* spotless

* some tweaks

* updating documentation and adding change log

* spotless

* added documentation

* review comments 1

* more review fixes

* spotless

* fixing bug

* fixing path

* spotless

* update state diagram

* review points round 1

* revert

* updating diag

* review fixes round 2

* spotless

* - Implemented GATE_WAITING state for the batch2 state machine.
- This will be the initial status for all workchunks of a gated job.
- made compatible with the equivalent "fake QUEUED" state in the Old batch2 implementation.
- Updated corresponding docs.
- added corresponding tests and changelog

* Revert "- Implemented GATE_WAITING state for the batch2 state machine."

This reverts commit 32a00f4b8169a11849611798adfd48138908e49c.

* - Implemented GATE_WAITING state for the batch2 state machine.
- This will be the initial status for all workchunks of a gated job.
- made compatible with the equivalent "fake QUEUED" state in the Old batch2 implementation.
- Updated corresponding docs.
- added corresponding tests and changelog

* fixing a bug

* spotless

* fixing

* - fix merges conflicts
- set first chunk to be always created in READY

* - have only one path through the equeueReady method
- fixed tests

* - hid the over-powered transition function behind a proper state action

* spotless

* resolved review comments

* fixing tests

* resolved review comments

* resolved review comments

* resolved review comments

* resolved review comments

* resolved review comments

* updating migration script number

* fixed bugs

* spotless

* fix test high concurrency

* fixing a test

* code fix

* fixing tests in bulkexportit

* fixing tests

* fixing tests

* cleanup

* completed instance will not be sent to the reduction step service

* Revert "completed instance will not be sent to the reduction step service"

This reverts commit aa149b669181f25f9262cb871627d7ec59369e5f.

* Revert "Revert "completed instance will not be sent to the reduction step service""

This reverts commit e18f5796a165029d693bc5b6e0d882e429072d4e.

* removing dead code

* changed db query for step advance to take statuses as parameter instead

* test fixes

* spotless

* test fix

* spotless

* fixing tests

* migration fix

* fixing test

* testing pipeline with `testGroupBulkExportNotInGroup_DoesNotShowUp` disabled

* fixing some tests

* Add new race test for simultaneous queue/dequeue

* re-enabling `testGroupBulkExportNotInGroup_DoesNotShowUp`

* cascade tag deletes

* test fixes

* some logging

* a test case

* adding job id

* more test code

* marking purge checks

* test fix

* testing

* pausing schedulers on cleanup

* adding a wait

* max thread count guarantee

* fixing the tests again

* removing dead code

* spotless

* checking

* msg codes:

* Fixing a test

* review points

* spotless

* required pom values

* step 1 of reduction ready

* update

* reductoin ready

* annother test

* spotless

* cleanup

* cleanup

* simplifying check in reduction step

* review fixes

* updating version

* using 7.3.1

* adding check

* test finessing

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>
Co-authored-by: tyner <tyner.guo@smilecdr.com>
2024-05-07 18:23:03 -04:00

621 lines
18 KiB
XML

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.3.1-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR JPA Server</name>
<dependencies>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
</dependency>
<dependency>
<groupId>co.elastic.apm</groupId>
<artifactId>apm-agent-api</artifactId>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-server-mdm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-subscription</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-searchparam</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-sql-migrate</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4b</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r5</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4b</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r5</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-storage-batch2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-storage-batch2-jobs</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.ttddyy</groupId>
<artifactId>datasource-proxy</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
<!-- GraphQL -->
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java</artifactId>
</dependency>
<!-- SQL Builder -->
<dependency>
<groupId>com.healthmarketscience.sqlbuilder</groupId>
<artifactId>sqlbuilder</artifactId>
</dependency>
<!-- Jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring6</artifactId>
</dependency>
<!-- For UCUM: TODO we should replace this with org.fhir UCUM -->
<dependency>
<groupId>org.jscience</groupId>
<artifactId>jscience</artifactId>
<exclusions>
<exclusion>
<groupId>org.javolution</groupId>
<artifactId>javolution</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Patch Dependencies -->
<dependency>
<groupId>io.dogote</groupId>
<artifactId>json-patch</artifactId>
</dependency>
<dependency>
<groupId>com.github.dnault</groupId>
<artifactId>xml-patch</artifactId>
</dependency>
<!--
Dependencies that need to be added since JDK9
-->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-aop</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
</dependency>
<!-- Note that we need this dependency to send log4j logging requests to slf4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</dependency>
<!-- Hibernate Search -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-backend-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-backend-lucene</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-backend-elasticsearch-aws</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-envers</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-envers</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analysis-phonetic</artifactId>
</dependency>
<!-- Misc -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-server-openapi</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-caching-caffeine</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-caching-testing</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-test-utilities</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
</dependency>
<dependency>
<groupId>org.exparity</groupId>
<artifactId>hamcrest-date</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Generate the Spring ContextCfg classes for loading JPA DAOs and RPs -->
<plugin>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-tinder-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>build_dstu2</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>dstu2</version>
<configPackageBase>ca.uhn.fhir.jpa.config</configPackageBase>
<packageBase>ca.uhn.fhir.jpa.rp.dstu2</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-dstu2.xml
</targetResourceSpringBeansFile>
<baseResourceNames/>
<excludeResourceNames>
<!-- <excludeResourceName>OperationDefinition</excludeResourceName> <excludeResourceName>OperationOutcome</excludeResourceName> -->
</excludeResourceNames>
</configuration>
</execution>
<execution>
<id>build_dstu3</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>dstu3</version>
<configPackageBase>ca.uhn.fhir.jpa.config</configPackageBase>
<packageBase>ca.uhn.fhir.jpa.rp.dstu3</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-dstu3.xml
</targetResourceSpringBeansFile>
<baseResourceNames></baseResourceNames>
<excludeResourceNames>
</excludeResourceNames>
</configuration>
</execution>
<execution>
<id>build_r4</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>r4</version>
<configPackageBase>ca.uhn.fhir.jpa.config</configPackageBase>
<packageBase>ca.uhn.fhir.jpa.rp.r4</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-r4.xml
</targetResourceSpringBeansFile>
<baseResourceNames></baseResourceNames>
<excludeResourceNames>
</excludeResourceNames>
</configuration>
</execution>
<execution>
<id>build_r4b</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>r4b</version>
<configPackageBase>ca.uhn.fhir.jpa.config</configPackageBase>
<packageBase>ca.uhn.fhir.jpa.rp.r4b</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-r4b.xml
</targetResourceSpringBeansFile>
<baseResourceNames></baseResourceNames>
<excludeResourceNames>
</excludeResourceNames>
</configuration>
</execution>
<execution>
<id>build_r5</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>r5</version>
<configPackageBase>ca.uhn.fhir.jpa.config</configPackageBase>
<packageBase>ca.uhn.fhir.jpa.rp.r5</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-r5.xml
</targetResourceSpringBeansFile>
<baseResourceNames></baseResourceNames>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Generate the DDL schema files -->
<plugin>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-tinder-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<goals>
<goal>generate-ddl</goal>
</goals>
</execution>
</executions>
<configuration>
<packageNames>
<packageName>ca.uhn.fhir.jpa.entity</packageName>
<packageName>ca.uhn.fhir.jpa.model.entity</packageName>
</packageNames>
<dialects>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirDerbyDialect</className>
<targetFileName>derby.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirMySQLDialect</className>
<targetFileName>mysql.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirMariaDBDialect</className>
<targetFileName>mariadb.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirOracleDialect</className>
<targetFileName>oracle.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirSQLServerDialect</className>
<targetFileName>sqlserver.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirCockroachDialect</className>
<targetFileName>cockroachdb.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect</className>
<targetFileName>h2.sql</targetFileName>
</dialect>
<dialect>
<className>ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect</className>
<targetFileName>postgres.sql</targetFileName>
<appendFile>classpath:ca/uhn/fhir/jpa/docs/database/hapifhirpostgres94-init01.sql</appendFile>
</dialect>
</dialects>
<outputDirectory>${project.build.directory}/classes/ca/uhn/hapi/fhir/jpa/docs/database</outputDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-model</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/generated-sources/tinder</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.basedir}/target/generated-resources/tinder</directory>
</resource>
</resources>
</build>
</project>