From d5d6d637753fdb025ed685c6680395f24b2c4940 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Mon, 5 Jun 2023 11:17:01 -0600 Subject: [PATCH 01/11] build: change to semantic-release --- .github/workflows/publish.yml | 3 --- .github/workflows/release.yml | 3 ++- .release-please-manifest.json | 3 --- .releaserc | 47 +++++++++++++++++++++++++++++++++++ README.md | 21 +--------------- build.gradle | 2 +- commitlint.config.js | 36 +-------------------------- release-please-config.json | 13 ---------- 8 files changed, 52 insertions(+), 76 deletions(-) delete mode 100644 .release-please-manifest.json create mode 100644 .releaserc delete mode 100644 release-please-config.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5b2372..90cbad7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,9 +6,6 @@ on: description: Dry-Run required: false type: boolean - push: - branches: - - coreV2 name: publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33aa047..210f718 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,13 +3,14 @@ on: push: branches: - master + - rc name: release jobs: release: permissions: write-all - uses: mxenabled/path-tools/.github/workflows/release_manifest.yml@master + uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@master secrets: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json deleted file mode 100644 index e6f8775..0000000 --- a/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "4.0.0" -} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..cee44a0 --- /dev/null +++ b/.releaserc @@ -0,0 +1,47 @@ +{ + "branches": [ + { name: "master" }, + { name: "rc", prerelease: "rc" } + ], + "tagFormat": "${version}", + "plugins": [ + [ + "@google/semantic-release-replace-plugin", + { + "replacements": [ + { + "files": ["./README.md", "build.gradle"], + "from": "(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(?.+x-release-version.?)", + "to": "${nextRelease.version}$" + } + ] + } + ], + [ + '@semantic-release/commit-analyzer', + { + preset: 'conventionalcommits', + }, + ], + [ + '@semantic-release/release-notes-generator', + { + preset: 'conventionalcommits', + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": ["./README.md", "CHANGELOG.md", "./build.gradle"], + "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}" + } + ], + "@semantic-release/github" + ] +} diff --git a/README.md b/README.md index 364885a..c353805 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,9 @@ Issues: https://github.com/mxenabled/path-core/issues ### Using platform (preferred) _Gradle_ - ```groovy dependencies { - api platform("com.mx.path-facilities:platform:4.0.0") + api platform("com.mx.path-facilities:platform:4.0.0") // x-release-version implementation "com.mx.path-facilities:store-redis" implementation "com.mx.path-facilities:store-vault" @@ -33,24 +32,6 @@ dependencies { implementation "com.mx.path-facilities:exception-reporter-honeybadger" } ``` - - -### Using without platform - -_Gradle_ - -```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" -} -``` - ## Releases diff --git a/build.gradle b/build.gradle index 0f30bd0..f579ecb 100644 --- a/build.gradle +++ b/build.gradle @@ -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 "4.0.0" // x-release-version def platformProject = "platform" diff --git a/commitlint.config.js b/commitlint.config.js index d157a89..28fe5c5 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,35 +1 @@ -module.exports = { - parserPreset: 'conventional-changelog-conventionalcommits', - rules: { - 'body-leading-blank': [1, 'always'], - 'body-max-line-length': [2, 'always', 100], - 'footer-leading-blank': [1, 'always'], - 'footer-max-line-length': [2, 'always', 100], - 'header-max-length': [2, 'always', 100], - 'subject-case': [ - 2, - 'never', - ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], - ], - 'subject-empty': [2, 'never'], - 'subject-full-stop': [2, 'never', '.'], - 'type-case': [2, 'always', 'lower-case'], - 'type-empty': [2, 'never'], - 'type-enum': [ - 2, - 'always', - [ - 'build', - 'chore', - 'docs', - 'feat', - 'fix', - 'perf', - 'refactor', - 'revert', - 'style', - 'test', - ], - ], - }, -}; +module.exports = {extends: ['@commitlint/config-conventional']} diff --git a/release-please-config.json b/release-please-config.json deleted file mode 100644 index d81cfc3..0000000 --- a/release-please-config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "bootstrap-sha": "101b9976977e65747a19919783562df35c9402c4", - "prerelease": false, - "release-type": "simple", - "packages": { - ".": { - "extra-files": [ - "build.gradle", - "README.md" - ] - } - } -} From 97ec4330e93c40055e99eac5cd286826e49178ba Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Mon, 5 Jun 2023 12:17:09 -0600 Subject: [PATCH 02/11] build: point to troubleshoot semantic release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 210f718..efdb988 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ name: release jobs: release: permissions: write-all - uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@master + uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@ts secrets: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} From f5a986ff1814df147a1f07eebadbd6b36c02a28f Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Tue, 6 Jun 2023 16:43:26 -0600 Subject: [PATCH 03/11] fix: semantic release --- .github/workflows/release.yml | 1 + .releaserc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efdb988..0dd2abc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: permissions: write-all uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@ts secrets: + SEMANTIC_TOKEN: ${{ secrets.SEMANTIC_TOKEN }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} GPG_SIGNING_KEY_BASE64: ${{ secrets.GPG_SIGNING_KEY_BASE64 }} diff --git a/.releaserc b/.releaserc index cee44a0..e5a4f4f 100644 --- a/.releaserc +++ b/.releaserc @@ -39,7 +39,7 @@ "@semantic-release/git", { "assets": ["./README.md", "CHANGELOG.md", "./build.gradle"], - "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}" + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } ], "@semantic-release/github" From ff3fa0db1a91e47ef908a56ddaad04ac15052256 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 6 Jun 2023 22:44:21 +0000 Subject: [PATCH 04/11] chore(release): 4.0.1 [skip ci] ## [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.md | 7 +++++++ README.md | 2 +- build.gradle | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b8d68..5ad62a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [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) diff --git a/README.md b/README.md index c353805..1f6ccca 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Issues: https://github.com/mxenabled/path-core/issues _Gradle_ ```groovy dependencies { - api platform("com.mx.path-facilities:platform:4.0.0") // x-release-version + api platform("com.mx.path-facilities:platform:4.0.1") // x-release-version implementation "com.mx.path-facilities:store-redis" implementation "com.mx.path-facilities:store-vault" diff --git a/build.gradle b/build.gradle index f579ecb..72769c3 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } -version "4.0.0" // x-release-version +version "4.0.1" // x-release-version def platformProject = "platform" From 79dbbf5e773fa3b15759c18ff088899707d774c3 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Tue, 6 Jun 2023 17:45:32 -0600 Subject: [PATCH 05/11] build!: upgrade to core:3.0.0 --- build.gradle | 4 +-- encryption-service-jasypt/gradle.lockfile | 14 +++++----- encryption-service-vault/gradle.lockfile | 14 +++++----- .../gradle.lockfile | 14 +++++----- .../gradle.lockfile | 14 +++++----- message-broker-nats/gradle.lockfile | 14 +++++----- store-redis/gradle.lockfile | 28 +++++++++---------- store-vault/gradle.lockfile | 14 +++++----- 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/build.gradle b/build.gradle index 72769c3..2d6f5ae 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ allprojects { targetCompatibility = 1.8 ext { - pathSDKVersion = "[2.0,3.0)" + pathSDKVersion = "[3.0,4.0)" } repositories { @@ -85,7 +85,7 @@ subprojects { coppuccino { rootDir = "${projectDir}/" dependencies { - excludePreReleaseVersions = false + excludePreReleaseVersions = true } } diff --git a/encryption-service-jasypt/gradle.lockfile b/encryption-service-jasypt/gradle.lockfile index ad16bdf..947464f 100644 --- a/encryption-service-jasypt/gradle.lockfile +++ b/encryption-service-jasypt/gradle.lockfile @@ -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 diff --git a/encryption-service-vault/gradle.lockfile b/encryption-service-vault/gradle.lockfile index 35e8472..4611777 100644 --- a/encryption-service-vault/gradle.lockfile +++ b/encryption-service-vault/gradle.lockfile @@ -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 diff --git a/exception-reporter-honeybadger/gradle.lockfile b/exception-reporter-honeybadger/gradle.lockfile index 52c9b61..0a46eea 100644 --- a/exception-reporter-honeybadger/gradle.lockfile +++ b/exception-reporter-honeybadger/gradle.lockfile @@ -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 diff --git a/fault-tolerant-executor-resilience4j/gradle.lockfile b/fault-tolerant-executor-resilience4j/gradle.lockfile index dae99bc..481c709 100644 --- a/fault-tolerant-executor-resilience4j/gradle.lockfile +++ b/fault-tolerant-executor-resilience4j/gradle.lockfile @@ -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 diff --git a/message-broker-nats/gradle.lockfile b/message-broker-nats/gradle.lockfile index 7c03c78..47fdf52 100644 --- a/message-broker-nats/gradle.lockfile +++ b/message-broker-nats/gradle.lockfile @@ -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=testCompileClasspath,testRuntimeClasspath -com.mx.path-core:gateway:2.0.0=testCompileClasspath,testRuntimeClasspath -com.mx.path-core:messaging:2.0.0=testCompileClasspath,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=testCompileClasspath,testRuntimeClasspath +com.mx.path-core:common:3.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.mx.path-core:context:3.0.0=testCompileClasspath,testRuntimeClasspath +com.mx.path-core:gateway:3.0.0=testCompileClasspath,testRuntimeClasspath +com.mx.path-core:messaging:3.0.0=testCompileClasspath,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=testCompileClasspath,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=testCompileClasspath,testRuntimeClasspath diff --git a/store-redis/gradle.lockfile b/store-redis/gradle.lockfile index 09c2e64..bb3c814 100644 --- a/store-redis/gradle.lockfile +++ b/store-redis/gradle.lockfile @@ -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 @@ -41,13 +41,13 @@ commons-lang:commons-lang:2.6=testRuntimeClasspath commons-logging:commons-logging:1.2=testRuntimeClasspath info.picocli:picocli:4.1.4=checkstyle io.lettuce:lettuce-core:6.2.0.RELEASE=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-buffer:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-codec:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-common:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-handler:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-resolver:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-transport-native-unix-common:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-transport:4.1.92.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-buffer:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-codec:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-common:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-handler:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-resolver:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-transport-native-unix-common:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-transport:4.1.93.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.opentracing:opentracing-api:0.33.0=testRuntimeClasspath io.projectreactor:reactor-core:3.4.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath jakarta.activation:jakarta.activation-api:1.2.2=testRuntimeClasspath diff --git a/store-vault/gradle.lockfile b/store-vault/gradle.lockfile index 35e8472..4611777 100644 --- a/store-vault/gradle.lockfile +++ b/store-vault/gradle.lockfile @@ -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 From ffe79ab11be7f526ea0ec32aee77db9075d7dc55 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 7 Jun 2023 00:13:28 +0000 Subject: [PATCH 06/11] chore(release): 5.0.0 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [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)) --- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- build.gradle | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad62a2..7a6c4cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## [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) diff --git a/README.md b/README.md index 1f6ccca..f803e2a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Issues: https://github.com/mxenabled/path-core/issues _Gradle_ ```groovy dependencies { - api platform("com.mx.path-facilities:platform:4.0.1") // x-release-version + api platform("com.mx.path-facilities:platform:5.0.0") // x-release-version implementation "com.mx.path-facilities:store-redis" implementation "com.mx.path-facilities:store-vault" diff --git a/build.gradle b/build.gradle index 2d6f5ae..1f61c6d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } -version "4.0.1" // x-release-version +version "5.0.0" // x-release-version def platformProject = "platform" From f421e28890d1b039d3b2befcb0bfe5605918f464 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Tue, 6 Jun 2023 18:15:06 -0600 Subject: [PATCH 07/11] build: point to master semantic release script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0dd2abc..6bb09dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ name: release jobs: release: permissions: write-all - uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@ts + uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@master secrets: SEMANTIC_TOKEN: ${{ secrets.SEMANTIC_TOKEN }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} From d3b8d2f34749b8161219a874d3cc46b18a367775 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Fri, 7 Jul 2023 09:57:08 -0600 Subject: [PATCH 08/11] build: revert to release-please --- .github/workflows/release.yml | 4 +-- .release-please-manifest.json | 3 +++ .releaserc | 47 ----------------------------------- README.md | 21 +++++++++++++++- build.gradle | 2 +- commitlint.config.js | 36 ++++++++++++++++++++++++++- release-please-config.json | 13 ++++++++++ 7 files changed, 73 insertions(+), 53 deletions(-) create mode 100644 .release-please-manifest.json delete mode 100644 .releaserc create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6bb09dc..33aa047 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,16 +3,14 @@ on: push: branches: - master - - rc name: release jobs: release: permissions: write-all - uses: mxenabled/path-tools/.github/workflows/release_semantic.yml@master + uses: mxenabled/path-tools/.github/workflows/release_manifest.yml@master secrets: - SEMANTIC_TOKEN: ${{ secrets.SEMANTIC_TOKEN }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} GPG_SIGNING_KEY_BASE64: ${{ secrets.GPG_SIGNING_KEY_BASE64 }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..32dbe0e --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "5.0.0" +} diff --git a/.releaserc b/.releaserc deleted file mode 100644 index e5a4f4f..0000000 --- a/.releaserc +++ /dev/null @@ -1,47 +0,0 @@ -{ - "branches": [ - { name: "master" }, - { name: "rc", prerelease: "rc" } - ], - "tagFormat": "${version}", - "plugins": [ - [ - "@google/semantic-release-replace-plugin", - { - "replacements": [ - { - "files": ["./README.md", "build.gradle"], - "from": "(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(?.+x-release-version.?)", - "to": "${nextRelease.version}$" - } - ] - } - ], - [ - '@semantic-release/commit-analyzer', - { - preset: 'conventionalcommits', - }, - ], - [ - '@semantic-release/release-notes-generator', - { - preset: 'conventionalcommits', - } - ], - [ - "@semantic-release/changelog", - { - "changelogFile": "CHANGELOG.md" - } - ], - [ - "@semantic-release/git", - { - "assets": ["./README.md", "CHANGELOG.md", "./build.gradle"], - "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ], - "@semantic-release/github" - ] -} diff --git a/README.md b/README.md index f803e2a..ceb1cf2 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ Issues: https://github.com/mxenabled/path-core/issues ### Using platform (preferred) _Gradle_ + ```groovy dependencies { - api platform("com.mx.path-facilities:platform:5.0.0") // x-release-version + api platform("com.mx.path-facilities:platform:5.0.0") implementation "com.mx.path-facilities:store-redis" implementation "com.mx.path-facilities:store-vault" @@ -32,6 +33,24 @@ dependencies { implementation "com.mx.path-facilities:exception-reporter-honeybadger" } ``` + + +### Using without platform + +_Gradle_ + +```groovy +dependencies { + 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" +} +``` + ## Releases diff --git a/build.gradle b/build.gradle index 1f61c6d..b0cb55f 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } -version "5.0.0" // x-release-version +version "5.0.0" // x-release-please-version def platformProject = "platform" diff --git a/commitlint.config.js b/commitlint.config.js index 28fe5c5..d157a89 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1 +1,35 @@ -module.exports = {extends: ['@commitlint/config-conventional']} +module.exports = { + parserPreset: 'conventional-changelog-conventionalcommits', + rules: { + 'body-leading-blank': [1, 'always'], + 'body-max-line-length': [2, 'always', 100], + 'footer-leading-blank': [1, 'always'], + 'footer-max-line-length': [2, 'always', 100], + 'header-max-length': [2, 'always', 100], + 'subject-case': [ + 2, + 'never', + ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], + ], + 'subject-empty': [2, 'never'], + 'subject-full-stop': [2, 'never', '.'], + 'type-case': [2, 'always', 'lower-case'], + 'type-empty': [2, 'never'], + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + ], + ], + }, +}; diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..d81cfc3 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,13 @@ +{ + "bootstrap-sha": "101b9976977e65747a19919783562df35c9402c4", + "prerelease": false, + "release-type": "simple", + "packages": { + ".": { + "extra-files": [ + "build.gradle", + "README.md" + ] + } + } +} From d3e9d7f3ee4b94671994bba5606d6ade76032121 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Fri, 2 Feb 2024 13:53:50 -0700 Subject: [PATCH 09/11] fix: clarify vault error messages --- .../security/vault/VaultEncryptionService.java | 18 +++++++++--------- .../vault/VaultEncryptionServiceTest.groovy | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/encryption-service-vault/src/main/java/com/mx/path/service/facility/security/vault/VaultEncryptionService.java b/encryption-service-vault/src/main/java/com/mx/path/service/facility/security/vault/VaultEncryptionService.java index c700789..555b070 100644 --- a/encryption-service-vault/src/main/java/com/mx/path/service/facility/security/vault/VaultEncryptionService.java +++ b/encryption-service-vault/src/main/java/com/mx/path/service/facility/security/vault/VaultEncryptionService.java @@ -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); @@ -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"); } @@ -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"); @@ -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 @@ -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 nameValuePairs) { @@ -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 @@ -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"); } } diff --git a/encryption-service-vault/src/test/groovy/com/mx/path/service/facility/security/vault/VaultEncryptionServiceTest.groovy b/encryption-service-vault/src/test/groovy/com/mx/path/service/facility/security/vault/VaultEncryptionServiceTest.groovy index 00d1332..ab1d37f 100644 --- a/encryption-service-vault/src/test/groovy/com/mx/path/service/facility/security/vault/VaultEncryptionServiceTest.groovy +++ b/encryption-service-vault/src/test/groovy/com/mx/path/service/facility/security/vault/VaultEncryptionServiceTest.groovy @@ -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 } @@ -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 } @@ -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 } @@ -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 } From d72d5f77436b29aebc3814195335de7bbcc5a072 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Tue, 30 May 2023 15:45:37 -0600 Subject: [PATCH 10/11] build: remove unneeded dependency_suppression files --- encryption-service-jasypt/dependency_suppression.xml | 2 -- encryption-service-vault/dependency_suppression.xml | 2 -- .../dependency_suppression.xml | 2 -- .../dependency_suppression.xml | 2 -- message-broker-nats/dependency_suppression.xml | 2 -- store-redis/dependency_suppression.xml | 2 -- store-vault/dependency_suppression.xml | 11 ----------- 7 files changed, 23 deletions(-) delete mode 100644 encryption-service-jasypt/dependency_suppression.xml delete mode 100644 encryption-service-vault/dependency_suppression.xml delete mode 100644 exception-reporter-honeybadger/dependency_suppression.xml delete mode 100644 fault-tolerant-executor-resilience4j/dependency_suppression.xml delete mode 100644 message-broker-nats/dependency_suppression.xml delete mode 100644 store-redis/dependency_suppression.xml delete mode 100644 store-vault/dependency_suppression.xml diff --git a/encryption-service-jasypt/dependency_suppression.xml b/encryption-service-jasypt/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/encryption-service-jasypt/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/encryption-service-vault/dependency_suppression.xml b/encryption-service-vault/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/encryption-service-vault/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/exception-reporter-honeybadger/dependency_suppression.xml b/exception-reporter-honeybadger/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/exception-reporter-honeybadger/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/fault-tolerant-executor-resilience4j/dependency_suppression.xml b/fault-tolerant-executor-resilience4j/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/fault-tolerant-executor-resilience4j/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/message-broker-nats/dependency_suppression.xml b/message-broker-nats/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/message-broker-nats/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/store-redis/dependency_suppression.xml b/store-redis/dependency_suppression.xml deleted file mode 100644 index b00d296..0000000 --- a/store-redis/dependency_suppression.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/store-vault/dependency_suppression.xml b/store-vault/dependency_suppression.xml deleted file mode 100644 index 1b84784..0000000 --- a/store-vault/dependency_suppression.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - https://gitlab.mx.com/mx/money-experiences/path/path-issues/-/issues/1244 - CVE-2022-1471 - - - https://gitlab.mx.com/mx/money-experiences/path/path-issues/-/issues/1248 - CVE-2021-37533 - - From d1188da3a2c4b76e1cad05892619107f0103694d Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Tue, 30 May 2023 14:45:55 -0600 Subject: [PATCH 11/11] feat: clean up fault-tolerant executor exception handling This removes the extra throw of ConnectException on an unknown exception. By allowing Exception to be thrown in the interface, we can allow any non-R4J exception to be handled up the stack. --- .../Resilience4jFaultTolerantExecutor.java | 13 +----------- ...silience4jFaultTolerantExecutorTest.groovy | 20 +++++++++++-------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/fault-tolerant-executor-resilience4j/src/main/java/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutor.java b/fault-tolerant-executor-resilience4j/src/main/java/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutor.java index 94f78e9..e6ee0fd 100644 --- a/fault-tolerant-executor-resilience4j/src/main/java/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutor.java +++ b/fault-tolerant-executor-resilience4j/src/main/java/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutor.java @@ -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; @@ -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) { @@ -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); } } diff --git a/fault-tolerant-executor-resilience4j/src/test/groovy/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutorTest.groovy b/fault-tolerant-executor-resilience4j/src/test/groovy/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutorTest.groovy index 2a392c9..9b39f5d 100644 --- a/fault-tolerant-executor-resilience4j/src/test/groovy/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutorTest.groovy +++ b/fault-tolerant-executor-resilience4j/src/test/groovy/com/mx/path/service/facility/fault_tolerant_executor/resilience4j/Resilience4jFaultTolerantExecutorTest.groovy @@ -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 @@ -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"() {