Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitch/update rc to master #62

Closed
wants to merge 11 commits into from
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
description: Dry-Run
required: false
type: boolean
push:
branches:
- coreV2

name: publish

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.0.0"
".": "5.0.0"
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## [5.0.0](https://github.com/mxenabled/path-facilities/compare/v4.0.0...5.0.0) (2023-06-07)


### ⚠ BREAKING CHANGES

* upgrade to core:3.0.0

### Bug Fixes

* semantic release ([f5a986f](https://github.com/mxenabled/path-facilities/commit/f5a986ff1814df147a1f07eebadbd6b36c02a28f))


### Build System

* upgrade to core:3.0.0 ([79dbbf5](https://github.com/mxenabled/path-facilities/commit/79dbbf5e773fa3b15759c18ff088899707d774c3))

## [4.0.1](https://github.com/mxenabled/path-facilities/compare/v4.0.0...4.0.1) (2023-06-06)


### Bug Fixes

* semantic release ([f5a986f](https://github.com/mxenabled/path-facilities/commit/f5a986ff1814df147a1f07eebadbd6b36c02a28f))

# Changelog

## [4.0.0](https://github.com/mxenabled/path-facilities/compare/v3.0.1...v4.0.0) (2023-05-16)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _Gradle_
<!-- x-release-please-start-version -->
```groovy
dependencies {
api platform("com.mx.path-facilities:platform:4.0.0")
api platform("com.mx.path-facilities:platform:5.0.0")

implementation "com.mx.path-facilities:store-redis"
implementation "com.mx.path-facilities:store-vault"
Expand All @@ -41,13 +41,13 @@ _Gradle_
<!-- x-release-please-start-version -->
```groovy
dependencies {
implementation "com.mx.path-facilities:store-redis:4.0.0"
implementation "com.mx.path-facilities:store-vault:4.0.0"
implementation "com.mx.path-facilities:encryption-service-vault:4.0.0"
implementation "com.mx.path-facilities:encryption-service-jasypt:4.0.0"
implementation "com.mx.path-facilities:message-broker-nats:4.0.0"
implementation "com.mx.path-facilities:fault-tolerant-executor-resilience4j:4.0.0"
implementation "com.mx.path-facilities:exception-reporter-honeybadger:4.0.0"
implementation "com.mx.path-facilities:store-redis:5.0.0"
implementation "com.mx.path-facilities:store-vault:5.0.0"
implementation "com.mx.path-facilities:encryption-service-vault:5.0.0"
implementation "com.mx.path-facilities:encryption-service-jasypt:5.0.0"
implementation "com.mx.path-facilities:message-broker-nats:5.0.0"
implementation "com.mx.path-facilities:fault-tolerant-executor-resilience4j:5.0.0"
implementation "com.mx.path-facilities:exception-reporter-honeybadger:5.0.0"
}
```
<!-- x-release-please-end -->
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}

version "4.0.0" // x-release-please-version
version "5.0.0" // x-release-please-version

def platformProject = "platform"

Expand All @@ -22,7 +22,7 @@ allprojects {
targetCompatibility = 1.8

ext {
pathSDKVersion = "[2.0,3.0)"
pathSDKVersion = "[3.0,4.0)"
}

repositories {
Expand Down Expand Up @@ -85,7 +85,7 @@ subprojects {
coppuccino {
rootDir = "${projectDir}/"
dependencies {
excludePreReleaseVersions = false
excludePreReleaseVersions = true
}
}

Expand Down
2 changes: 0 additions & 2 deletions encryption-service-jasypt/dependency_suppression.xml

This file was deleted.

14 changes: 7 additions & 7 deletions encryption-service-jasypt/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ com.google.guava:guava:28.2-jre=checkstyle
com.google.guava:guava:31.1-jre=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:1.3=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:common:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:2.0.0=testRuntimeClasspath
com.mx.path-core:gateway:2.0.0=testRuntimeClasspath
com.mx.path-core:messaging:2.0.0=testRuntimeClasspath
com.mx.path-core:platform:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:2.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:2.0.0=testRuntimeClasspath
com.mx.path-core:common:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:3.0.0=testRuntimeClasspath
com.mx.path-core:gateway:3.0.0=testRuntimeClasspath
com.mx.path-core:messaging:3.0.0=testRuntimeClasspath
com.mx.path-core:platform:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:3.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:3.0.0=testRuntimeClasspath
com.puppycrawl.tools:checkstyle:8.29=checkstyle
com.sun.activation:jakarta.activation:1.2.2=testRuntimeClasspath
com.sun.istack:istack-commons-runtime:3.0.12=testRuntimeClasspath
Expand Down
2 changes: 0 additions & 2 deletions encryption-service-vault/dependency_suppression.xml

This file was deleted.

14 changes: 7 additions & 7 deletions encryption-service-vault/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ com.google.guava:guava:28.2-jre=checkstyle
com.google.guava:guava:31.1-jre=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:1.3=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:common:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:2.0.0=testRuntimeClasspath
com.mx.path-core:gateway:2.0.0=testRuntimeClasspath
com.mx.path-core:messaging:2.0.0=testRuntimeClasspath
com.mx.path-core:platform:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:2.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:2.0.0=testRuntimeClasspath
com.mx.path-core:common:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:3.0.0=testRuntimeClasspath
com.mx.path-core:gateway:3.0.0=testRuntimeClasspath
com.mx.path-core:messaging:3.0.0=testRuntimeClasspath
com.mx.path-core:platform:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:3.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:3.0.0=testRuntimeClasspath
com.puppycrawl.tools:checkstyle:8.29=checkstyle
com.sun.activation:jakarta.activation:1.2.2=testRuntimeClasspath
com.sun.istack:istack-commons-runtime:3.0.12=testRuntimeClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,20 @@ final Vault buildAuthenticatedDriver(Vault authenticationDriver) {

case APPROLE:
resp = authenticationDriver.auth().loginByAppRole(configuration.getAppRole(), configuration.getSecretId());
validateVaultAuthenticationResponse(resp, "Unable to login via jwt");
validateVaultAuthenticationResponse(resp, "Unable to login via vault app-role");

token = resp.getAuthClientToken();
break;

case APPID:
resp = authenticationDriver.auth().loginByAppID("app-id/login", configuration.getAppId(), configuration.getUserId());
validateVaultAuthenticationResponse(resp, "Unable to login via app-id");
validateVaultAuthenticationResponse(resp, "Unable to login via vault app-id");

token = resp.getAuthClientToken();
break;

default:
throw new VaultEncryptionConfigurationException("Invalid authentication type: " + getConfiguration().getAuthentication());
throw new VaultEncryptionConfigurationException("Invalid vault authentication type: " + getConfiguration().getAuthentication());
}

return buildVaultDriver(token);
Expand All @@ -260,7 +260,7 @@ private String doEncrypt(String plaintext) {
String path = "transit/encrypt/" + configuration.getKeyName();

LogicalResponse response = logicalWriteWithReauthentication(path, Collections.singletonMap("plaintext", encodedValue));
validateVaultOperationResponse(response, "Encrypt failed");
validateVaultOperationResponse(response, "Vault encrypt failed");

return response.getData().get("ciphertext");
}
Expand All @@ -269,7 +269,7 @@ private String doDecrypt(String ciphertext) {
LogicalResponse response = logicalWriteWithReauthentication(
"transit/decrypt/" + configuration.getKeyName(),
Collections.singletonMap("ciphertext", ciphertext));
validateVaultOperationResponse(response, "Decrypt failed");
validateVaultOperationResponse(response, "Vault decrypt failed");

String plaintext = response.getData().get("plaintext");

Expand Down Expand Up @@ -336,7 +336,7 @@ private LogicalResponse logicalReadWithReauthentication(final String path) {
resetDriver();
continue;
} catch (VaultException e) {
throw new VaultEncryptionOperationException("Logical read failed", e);
throw new VaultEncryptionOperationException("Vault logical read failed", e);
}

// If the response is permission denied
Expand All @@ -347,7 +347,7 @@ private LogicalResponse logicalReadWithReauthentication(final String path) {
}
}

throw new VaultEncryptionAuthenticationException("Permission denied and unable to reauthenticate");
throw new VaultEncryptionAuthenticationException("Permission denied and unable to reauthenticate vault read");
}

private LogicalResponse logicalWriteWithReauthentication(final String path, final Map<String, Object> nameValuePairs) {
Expand All @@ -359,7 +359,7 @@ private LogicalResponse logicalWriteWithReauthentication(final String path, fina
resetDriver();
continue;
} catch (VaultException e) {
throw new VaultEncryptionOperationException("Logical write failed", e);
throw new VaultEncryptionOperationException("Vault logical write failed", e);
}

// If the response is permission denied
Expand All @@ -370,6 +370,6 @@ private LogicalResponse logicalWriteWithReauthentication(final String path, fina
}
}

throw new VaultEncryptionAuthenticationException("Permission denied and unable to reauthenticate");
throw new VaultEncryptionAuthenticationException("Permission denied and unable to reauthenticate vault write");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class VaultEncryptionServiceTest extends Specification {

then:
def ex = thrown(VaultEncryptionAuthenticationException)
ex.getMessage() == "Permission denied and unable to reauthenticate"
ex.getMessage() == "Permission denied and unable to reauthenticate vault write"
verify(subject, times(3)).resetDriver() || true
}

Expand All @@ -305,7 +305,7 @@ class VaultEncryptionServiceTest extends Specification {

then:
def ex = thrown(VaultEncryptionOperationException)
ex.getMessage() == "Logical write failed"
ex.getMessage() == "Vault logical write failed"
verify(subject, never()).resetDriver() || true
}

Expand Down Expand Up @@ -366,7 +366,7 @@ class VaultEncryptionServiceTest extends Specification {

then:
def ex = thrown(VaultEncryptionAuthenticationException)
ex.getMessage() == "Permission denied and unable to reauthenticate"
ex.getMessage() == "Permission denied and unable to reauthenticate vault write"
verify(subject, times(3)).resetDriver() || true
}

Expand All @@ -384,7 +384,7 @@ class VaultEncryptionServiceTest extends Specification {

then:
def ex = thrown(VaultEncryptionOperationException)
ex.getMessage() == "Logical write failed"
ex.getMessage() == "Vault logical write failed"
verify(subject, never()).resetDriver() || true
}

Expand Down
2 changes: 0 additions & 2 deletions exception-reporter-honeybadger/dependency_suppression.xml

This file was deleted.

14 changes: 7 additions & 7 deletions exception-reporter-honeybadger/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=chec
com.google.j2objc:j2objc-annotations:1.3=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.jcabi:jcabi-log:0.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.jcabi:jcabi-manifests:1.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:common:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:2.0.0=testRuntimeClasspath
com.mx.path-core:gateway:2.0.0=testRuntimeClasspath
com.mx.path-core:messaging:2.0.0=testRuntimeClasspath
com.mx.path-core:platform:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:2.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:2.0.0=testRuntimeClasspath
com.mx.path-core:common:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:3.0.0=testRuntimeClasspath
com.mx.path-core:gateway:3.0.0=testRuntimeClasspath
com.mx.path-core:messaging:3.0.0=testRuntimeClasspath
com.mx.path-core:platform:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:3.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:3.0.0=testRuntimeClasspath
com.puppycrawl.tools:checkstyle:8.29=checkstyle
com.sun.activation:jakarta.activation:1.2.2=testRuntimeClasspath
com.sun.istack:istack-commons-runtime:3.0.12=testRuntimeClasspath
Expand Down

This file was deleted.

14 changes: 7 additions & 7 deletions fault-tolerant-executor-resilience4j/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ com.google.guava:guava:28.2-jre=checkstyle
com.google.guava:guava:31.1-jre=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:1.3=checkstyle,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:common:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:2.0.0=testRuntimeClasspath
com.mx.path-core:gateway:2.0.0=testRuntimeClasspath
com.mx.path-core:messaging:2.0.0=testRuntimeClasspath
com.mx.path-core:platform:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:2.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:2.0.0=testRuntimeClasspath
com.mx.path-core:common:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:context:3.0.0=testRuntimeClasspath
com.mx.path-core:gateway:3.0.0=testRuntimeClasspath
com.mx.path-core:messaging:3.0.0=testRuntimeClasspath
com.mx.path-core:platform:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.mx.path-core:testing:3.0.0=testCompileClasspath,testRuntimeClasspath
com.mx.path-core:utilities:3.0.0=testRuntimeClasspath
com.puppycrawl.tools:checkstyle:8.29=checkstyle
com.sun.activation:jakarta.activation:1.2.2=testRuntimeClasspath
com.sun.istack:istack-commons-runtime:3.0.12=testRuntimeClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
import lombok.AccessLevel;
import lombok.Setter;

import com.mx.path.core.common.accessor.PathResponseStatus;
import com.mx.path.core.common.configuration.Configuration;
import com.mx.path.core.common.connect.ConnectException;
import com.mx.path.core.common.connect.ServiceUnavailableException;
import com.mx.path.core.common.connect.TooManyRequestsException;
import com.mx.path.core.common.exception.PathRequestException;
import com.mx.path.core.common.exception.PathSystemException;
import com.mx.path.core.common.process.FaultTolerantExecutor;
import com.mx.path.core.common.process.FaultTolerantTask;
import com.mx.path.service.facility.fault_tolerant_executor.resilience4j.configuration.Configurations;
Expand All @@ -36,7 +32,7 @@ public Resilience4jFaultTolerantExecutor(@Configuration Configurations configura

@SuppressWarnings("PMD.CyclomaticComplexity")
@Override
public void submit(String scope, FaultTolerantTask task) {
public void submit(String scope, FaultTolerantTask task) throws Exception {
try {
executeDecoratorStack(scope, task);
} catch (BulkheadFullException e) {
Expand All @@ -51,13 +47,6 @@ public void submit(String scope, FaultTolerantTask task) {
throw new com.mx.path.core.common.connect.TimeoutException(
"Resilience4j triggered a timeout.",
e);
} catch (PathRequestException | PathSystemException e) {
throw e; // rethrow Path exceptions
} catch (Exception e) {
throw new ConnectException(
"An unknown error occurred",
PathResponseStatus.INTERNAL_ERROR,
e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import java.time.Duration
import java.util.concurrent.TimeoutException

import com.mx.path.core.common.accessor.PathResponseStatus
import com.mx.path.core.common.accessor.UpstreamSystemMaintenance
import com.mx.path.core.common.connect.ConnectException
import com.mx.path.core.common.connect.ServiceUnavailableException
import com.mx.path.core.common.connect.TooManyRequestsException
Expand Down Expand Up @@ -39,16 +40,19 @@ class Resilience4jFaultTolerantExecutorTest extends Specification {
subject.submit("DEFAULT", { config -> })

then:
def exception = thrown(ConnectException)
exception.status == failureStatus
exception.cause == originalException
def exception = thrown(expectedType)
failureStatus == null ? !exception.hasProperty("status") : exception.status == failureStatus
!wrapsOriginalException || exception.cause == originalException
wrapsOriginalException || exception.cause == null

where:
originalException || failureStatus
mock(BulkheadFullException) || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
mock(CallNotPermittedException) || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
new TimeoutException() || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
new RuntimeException() || PathResponseStatus.INTERNAL_ERROR
originalException || wrapsOriginalException || expectedType || failureStatus
mock(BulkheadFullException) || true || TooManyRequestsException || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
mock(CallNotPermittedException) || true || ServiceUnavailableException || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
new TimeoutException() || true || com.mx.path.core.common.connect.TimeoutException || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
new UpstreamSystemMaintenance("upstream is being maintained") || false || UpstreamSystemMaintenance || PathResponseStatus.UPSTREAM_SERVICE_UNAVAILABLE
new RuntimeException() || false || RuntimeException || null
new NullPointerException() || false || NullPointerException || null
}

def "runs a submitted task"() {
Expand Down
2 changes: 0 additions & 2 deletions message-broker-nats/dependency_suppression.xml

This file was deleted.

Loading
Loading