Skip to content

Commit

Permalink
Merge branch 'hapifhir:master' into bug/fix-duplicate-bean-definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jkiddo authored Apr 29, 2024
2 parents 37cb055 + a91490f commit 6ab1c05
Show file tree
Hide file tree
Showing 106 changed files with 508 additions and 293 deletions.
2 changes: 1 addition & 1 deletion hapi-deployable-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
7 changes: 6 additions & 1 deletion hapi-fhir-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down Expand Up @@ -138,6 +138,11 @@
<artifactId>system-stubs-jupiter</artifactId>
<scope>test</scope>
</dependency>
<!-- OpenTelemetry -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.instrumentation.annotations.WithSpan;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.apache.commons.lang3.Validate;
Expand Down Expand Up @@ -547,7 +549,7 @@ Object invoke(HookParams theParams) {

// Invoke the method
try {
return myMethod.invoke(getInterceptor(), args);
return invokeMethod(args);
} catch (InvocationTargetException e) {
Throwable targetException = e.getTargetException();
if (myPointcut.isShouldLogAndSwallowException(targetException)) {
Expand All @@ -566,6 +568,19 @@ Object invoke(HookParams theParams) {
throw new InternalErrorException(Msg.code(1911) + e);
}
}

@WithSpan("hapifhir.interceptor")
private Object invokeMethod(Object[] args) throws InvocationTargetException, IllegalAccessException {
// Add attributes to the opentelemetry span
Span currentSpan = Span.current();
currentSpan.setAttribute("hapifhir.interceptor.pointcut_name", myPointcut.name());
currentSpan.setAttribute(
"hapifhir.interceptor.class_name",
myMethod.getDeclaringClass().getName());
currentSpan.setAttribute("hapifhir.interceptor.method_name", myMethod.getName());

return myMethod.invoke(getInterceptor(), args);
}
}

protected class HookDescriptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ public enum VersionEnum {
V7_0_2,

V7_1_0,
V7_2_0;
V7_2_0,

V7_3_0,
V7_4_0;

public static VersionEnum latestVersion() {
VersionEnum[] values = VersionEnum.values();
Expand Down
4 changes: 2 additions & 2 deletions hapi-fhir-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-bom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<packaging>pom</packaging>
<name>HAPI FHIR BOM</name>

<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-cli</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-client-okhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
type: fix
issue: 5725
jira: SMILE-8343
title: "The recommended constructor was not present on hibernate dialects
provided by HAPI FHIR, leading to warnings during startup, and failures
in some cases. This has been corrected. Thanks to GitHub user
@pano-smals for the contribution!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
type: add
issue: 5855
title: "If using an OpenTelemetry agent, a span is now generated for each interceptor method call. The span is named
as 'hapifhir.interceptor' and it has the following attributes about the interceptor:
'hapifhir.interceptor.pointcut_name','hapifhir.interceptor.class_name', 'hapifhir.interceptor.method_name'"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: fix
issue: 5856
title: "Previously, it was possible to execute the `$delete-expunge` operation on a resource even if the user did not
have delete permissions for the given resource type. This has been fixed."
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: fix
issue: 5874
jira: SMILE-8149
title: "Fixed a bug where 'List' would be incorrectly shown as 'ListResource' in the error response for a GET for an invalid resource."
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
type: fix
issue: 4556
title: "The CSS file used by the OpenApiInterceptor to serve up the Swagger UI
component inadvertently blocked the authorization button evem when it was
wanted. This has been fixed. Thanks Jesse Bonzo for the contribution!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: fix
issue: 5867
title: "Previously, when adding multiple resources and defining a golden resource using MDM, the golden resource's tags were removed. This has been fixed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: fix
issue: 5877
title: "Previously, updating a tokenParam with a value greater than 200 characters would raise a SQLException.
This issue has been fixed."
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
release-date: "2024-08-18"
codename: "Copernicus"
2 changes: 1 addition & 1 deletion hapi-fhir-jacoco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jaxrsserver-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>7.1.10-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package ca.uhn.fhir.jpa.model.dialect;

import org.hibernate.dialect.CockroachDialect;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;

/**
* Dialect for CockroachDB database.
Expand All @@ -29,7 +29,11 @@
public class HapiFhirCockroachDialect extends CockroachDialect {

public HapiFhirCockroachDialect() {
super(DatabaseVersion.make(21, 1));
super();
}

public HapiFhirCockroachDialect(DialectResolutionInfo info) {
super(info);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
*/
package ca.uhn.fhir.jpa.model.dialect;

import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.DerbyDialect;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;

/**
* Dialect for Derby database.
* Minimum version: 10.14.2
*/
public class HapiFhirDerbyDialect extends DerbyDialect {

public HapiFhirDerbyDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
public HapiFhirDerbyDialect() {
super();
}

public HapiFhirDerbyDialect() {
super(DatabaseVersion.make(10, 14, 2));
public HapiFhirDerbyDialect(DialectResolutionInfo info) {
super(info);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
*/
package ca.uhn.fhir.jpa.model.dialect;

import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;

/**
* Dialect for H2 database.
* Minimum version: 2.2.220
*/
public class HapiFhirH2Dialect extends H2Dialect {

public HapiFhirH2Dialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
public HapiFhirH2Dialect() {
super();
}

public HapiFhirH2Dialect() {
super(DatabaseVersion.make(2, 2, 220));
public HapiFhirH2Dialect(DialectResolutionInfo info) {
super(info);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
*/
package ca.uhn.fhir.jpa.model.dialect;

import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;

/**
* Dialect for MySQL database.
* Minimum version: 10.11.5
*/
public class HapiFhirMariaDBDialect extends MariaDBDialect {

public HapiFhirMariaDBDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
public HapiFhirMariaDBDialect() {
super();
}

public HapiFhirMariaDBDialect() {
super(DatabaseVersion.make(10, 11, 5));
public HapiFhirMariaDBDialect(DialectResolutionInfo info) {
super(info);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
*/
package ca.uhn.fhir.jpa.model.dialect;

import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;

/**
* Dialect for MySQL database.
* Minimum version: 5.7
*/
public class HapiFhirMySQLDialect extends MySQLDialect {

public HapiFhirMySQLDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
public HapiFhirMySQLDialect() {
super();
}

public HapiFhirMySQLDialect() {
super(DatabaseVersion.make(5, 7));
public HapiFhirMySQLDialect(DialectResolutionInfo info) {
super(info);
}

/**
Expand Down
Loading

0 comments on commit 6ab1c05

Please sign in to comment.