Upgrade deps (#2695)

* Upgrade deps

* Fix build error

* Branch tweak

* Build fix

* Build fix

* Undo bump

* Test fixes
This commit is contained in:
James Agnew 2021-06-01 12:03:29 -04:00 committed by GitHub
parent f5c75e80de
commit fe763dd2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 16 deletions

View File

@ -50,7 +50,6 @@ public class ResourceReferenceInfo {
myResource = theElement;
if (thePathToElement != null && !thePathToElement.isEmpty()) {
StringBuilder sb = new StringBuilder();
thePathToElement.iterator();
for (Iterator<String> iterator = thePathToElement.iterator(); iterator.hasNext();) {
sb.append(iterator.next());
if (iterator.hasNext())

View File

@ -0,0 +1,5 @@
---
type: change
issue: 2695
title: "Bulk import batch jobs are now activated in a local scheduled task, making bulk import
jobs better able to take advantage of large clusters."

View File

@ -5,6 +5,7 @@
(dependent HAPI modules listed in brackets):
<ul>
<li>Spring (JPA): 5.3.6 -> 5.3.7</li>
<li>Spring Boot (JPA Starter): 2.4.4 -> 2.5.0</li>
</ul>
"

View File

@ -88,10 +88,11 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc {
public void start() {
myTxTemplate = new TransactionTemplate(myTxManager);
// This job should be local so that each node in the cluster can pick up jobs
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(ActivationJob.class.getName());
jobDetail.setJobClass(ActivationJob.class);
mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
}
@Override

View File

@ -505,8 +505,12 @@ public class TermConceptMappingSvcImpl implements ITermConceptMappingSvc {
while (scrollableResultsIterator.hasNext()) {
TermConceptMapGroupElement nextElement = scrollableResultsIterator.next();
// TODO: The invocation of the size() below does not seem to be necessary but for some reason, removing it causes tests in TerminologySvcImplR4Test to fail.
nextElement.getConceptMapGroupElementTargets().size();
/* TODO: The invocation of the size() below does not seem to be necessary but for some reason,
* but removing it causes tests in TerminologySvcImplR4Test to fail. We use the outcome
* in a trace log to avoid ErrorProne flagging an unused return value.
*/
int size = nextElement.getConceptMapGroupElementTargets().size();
ourLog.trace("Have {} targets", size);
myEntityManager.detach(nextElement);

View File

@ -186,8 +186,8 @@ public class FhirResourceDaoDstu3ValueSetMultiVersionTest extends BaseJpaDstu3Te
if (optionalTermValueSet.isPresent()) {
fail();
}
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1"));
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2"));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1")));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2")));
myValueSetDao.delete(myValueSets.get(ValueSetVersions.V1).getResource().getIdElement());
assertEquals(1, myTermValueSetDao.findTermValueSetByUrl(PageRequest.of(0, 10), URL_MY_VALUE_SET).size());

View File

@ -187,8 +187,8 @@ public class FhirResourceDaoR4ValueSetMultiVersionTest extends BaseJpaR4Test {
if (optionalTermValueSet.isPresent()) {
fail();
}
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1"));
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2"));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1")));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2")));
myValueSetDao.delete(myValueSets.get(ValueSetVersions.V1).getResource().getIdElement());
assertEquals(1, myTermValueSetDao.findTermValueSetByUrl(PageRequest.of(0, 10), URL_MY_VALUE_SET).size());
@ -200,7 +200,7 @@ public class FhirResourceDaoR4ValueSetMultiVersionTest extends BaseJpaR4Test {
if (optionalTermValueSet.isPresent()) {
fail();
}
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2"));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2")));
myValueSetDao.delete(myValueSets.get(ValueSetVersions.V2).getResource().getIdElement());
assertEquals(0, myTermValueSetDao.findTermValueSetByUrl(PageRequest.of(0, 10), URL_MY_VALUE_SET).size());

View File

@ -186,8 +186,8 @@ public class FhirResourceDaoR5ValueSetMultiVersionTest extends BaseJpaR5Test {
if (optionalTermValueSet.isPresent()) {
fail();
}
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1"));
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2"));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v1").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v1")));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2")));
myValueSetDao.delete(myValueSets.get(ValueSetVersions.V1).getResource().getIdElement());
assertEquals(1, myTermValueSetDao.findTermValueSetByUrl(PageRequest.of(0, 10), URL_MY_VALUE_SET).size());
@ -199,7 +199,7 @@ public class FhirResourceDaoR5ValueSetMultiVersionTest extends BaseJpaR5Test {
if (optionalTermValueSet.isPresent()) {
fail();
}
myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2"));
assertNotNull(myTermValueSetDao.findTermValueSetByUrlAndVersion(URL_MY_VALUE_SET, "v2").orElseThrow(() -> new IllegalArgumentException("No TerValueSet found for " + URL_MY_VALUE_SET + " version v2")));
myValueSetDao.delete(myValueSets.get(ValueSetVersions.V2).getResource().getIdElement());
assertEquals(0, myTermValueSetDao.findTermValueSetByUrl(PageRequest.of(0, 10), URL_MY_VALUE_SET).size());

View File

@ -816,10 +816,9 @@
<slf4j_version>1.7.30</slf4j_version>
<log4j_to_slf4j_version>2.11.1</log4j_to_slf4j_version>
<spring_version>5.3.7</spring_version>
<!-- FYI: Spring Data JPA 2.1.9 causes test failures due to unexpected cascading deletes -->
<spring_data_version>2.5.0</spring_data_version>
<spring_batch_version>4.3.3</spring_batch_version>
<spring_boot_version>2.4.4</spring_boot_version>
<spring_boot_version>2.5.0</spring_boot_version>
<spring_retry_version>1.2.2.RELEASE</spring_retry_version>
<stax2_api_version>3.1.4</stax2_api_version>
@ -1032,7 +1031,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>20.1.0</version>
<version>21.0.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@ -1363,7 +1362,7 @@
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.0.3</version>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>