From 9a95aec800b9043fc4297196bb5368402c7b4450 Mon Sep 17 00:00:00 2001 From: "Alex J Hawk (HMS)" <51409174+alexjhawk@users.noreply.github.com> Date: Tue, 28 May 2024 09:21:20 -0400 Subject: [PATCH 1/4] Update Logger.java Added the Logger#resetLoggedOnce method which allows for directly resetting the logged once flag of a specified log once key. --- .../americas/sc/extensions/logging/Logger.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/hms_networks/americas/sc/extensions/logging/Logger.java b/src/main/java/com/hms_networks/americas/sc/extensions/logging/Logger.java index 2708bce7..35a0fcca 100644 --- a/src/main/java/com/hms_networks/americas/sc/extensions/logging/Logger.java +++ b/src/main/java/com/hms_networks/americas/sc/extensions/logging/Logger.java @@ -615,6 +615,21 @@ public static void setLoggedOnce(String logKey, boolean logOutputted) { } } + /** + * Resets the output status of a specific log. This is used to allow the log to be outputted + * again. + * + *
The specified log key must be unique for each log event that should only be logged once. If + * the same log key is used for multiple log events, only the first log event will be logged, + * regardless of the message. + * + * @param logKey key for the log event + * @since 1.15.15 + */ + public static void resetLoggedOnce(String logKey) { + logOnceList.remove(logKey); + } + /** * Gets a boolean indicating whether a specific log has been outputted. This is used to prevent * spamming the log with the same message. From 8d79915bc72529f461376eb7be414f2c6d923dcf Mon Sep 17 00:00:00 2001 From: "Alex J Hawk (HMS)" <51409174+alexjhawk@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:16:04 -0400 Subject: [PATCH 2/4] Fix Javadocs in RapidCatchUp.java --- .../americas/sc/extensions/historicaldata/RapidCatchUp.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hms_networks/americas/sc/extensions/historicaldata/RapidCatchUp.java b/src/main/java/com/hms_networks/americas/sc/extensions/historicaldata/RapidCatchUp.java index c0c9ccc5..1e35b94d 100644 --- a/src/main/java/com/hms_networks/americas/sc/extensions/historicaldata/RapidCatchUp.java +++ b/src/main/java/com/hms_networks/americas/sc/extensions/historicaldata/RapidCatchUp.java @@ -74,7 +74,7 @@ public static boolean shouldEnterRapidCatchUpMode( /** * Dynamically adjust the request period by doubling it, but do not exceed {@link - * RAPID_CATCH_UP_TIME_DURATION_MAX_MILLISECONDS}. + * #RAPID_CATCH_UP_TIME_DURATION_MAX_MILLISECONDS}. */ public static void adjustRapidCatchUpPeriod() { // Double duration @@ -85,14 +85,14 @@ public static void adjustRapidCatchUpPeriod() { RAPID_CATCH_UP_TIME_DURATION_MAX_MILLISECONDS); } - /** Reset the request period to {@link RAPID_CATCH_UP_TIME_BASE_MILLISECONDS }. */ + /** Reset the request period to {@link #RAPID_CATCH_UP_TIME_BASE_MILLISECONDS }. */ public static void resetRapidCatchUpPeriod() { catchUpRequestDurationMilliseconds = RAPID_CATCH_UP_TIME_BASE_MILLISECONDS; } /** * Special purpose stream reader to enable rapid catch up. Performs a limited number of reads and - * returns up to {@link MAX_STREAM_READS} from {@link InputStream} as a {@link String} in the + * returns up to {@link #MAX_STREAM_READS} from {@link InputStream} as a {@link String} in the * specified encoding. * * @param inputStream input stream to read From 63c112904624643d471d33c5a334a3b4e15a10a5 Mon Sep 17 00:00:00 2001 From: "Alex J Hawk (HMS)" <51409174+alexjhawk@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:29:38 -0400 Subject: [PATCH 3/4] Update GitHub workflows Updated all the GitHub workflows to their latest versions available from the starter project. --- .github/workflows/build-artifacts.yml | 26 +++++--------- .github/workflows/build-test.yml | 25 +++++-------- .github/workflows/code-format-test.yml | 16 +++++---- .github/workflows/commit-format-check.yml | 15 +++++--- .github/workflows/doc-deploy.yml | 13 ++++--- .github/workflows/doc-test-deploy.yml | 13 ++++--- .github/workflows/junit-test.yml | 25 +++++-------- .../workflows/project-issue-automation.yml | 8 +++++ .github/workflows/release-build-outputs.yml | 36 +++++++++---------- .github/workflows/release-make-branch.yml | 7 ++-- .github/workflows/release-push-maven-repo.yml | 24 +++++-------- 11 files changed, 101 insertions(+), 107 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index c08a6e4d..171156c4 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -1,10 +1,10 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Artifact Build Action for Maven-based Ewon ETK Projects -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a push -# is made or pull request is merged to the `main` or `master` -# branch. +# is made to the `main` branch. name: Build Artifacts @@ -14,26 +14,18 @@ on: - main jobs: - build: + build-artifacts: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Set Up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 16 - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - target/buildJdk - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: 'maven' - name: Compile Java Files With Maven run: mvn package -f pom.xml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d93e2c6a..bac4fa2a 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,9 +1,10 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Build Test Action for Maven-based Ewon ETK Projects -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a push -# is made or pull request is merged to the `main` or `master` +# is made to the `main` branch or a pull request for the `main` # branch. name: Build Test @@ -17,26 +18,18 @@ on: - main jobs: - build: + build-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Set Up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 16 - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - target/buildJdk - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: 'maven' - name: Package Java Files With Maven run: mvn package -f pom.xml \ No newline at end of file diff --git a/.github/workflows/code-format-test.yml b/.github/workflows/code-format-test.yml index eb52421f..efd57169 100644 --- a/.github/workflows/code-format-test.yml +++ b/.github/workflows/code-format-test.yml @@ -1,9 +1,10 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Code Format Test Action for Maven-based Ewon ETK Projects -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a push -# is made or pull request is merged to the `main` or `master` +# is made to the `main` branch or a pull request for the `main` # branch. name: Code Format Test @@ -17,10 +18,13 @@ on: - main jobs: - formatting: + code-format-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # v2 minimum required - - uses: axel-op/googlejavaformat-action@v3 + - name: Checkout Project + uses: actions/checkout@v4 + + - name: Test Code Formatting + uses: axel-op/googlejavaformat-action@v3 with: args: "--dry-run --skip-sorting-imports --set-exit-if-changed" \ No newline at end of file diff --git a/.github/workflows/commit-format-check.yml b/.github/workflows/commit-format-check.yml index 1f1cef66..dbb32c44 100644 --- a/.github/workflows/commit-format-check.yml +++ b/.github/workflows/commit-format-check.yml @@ -1,9 +1,10 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Commit Format Action for Maven-based Ewon ETK Projects -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # -# This action is configured to automatically run when a pull -# request is made to the `main` or `master` branch. +# This action is configured to automatically run when a push +# is made to a pull request for the `main` branch. name: Commit Format Check @@ -13,9 +14,10 @@ on: - main jobs: - check-commit-message: + commit-format-check: name: Check Commit Message runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} steps: - name: Check Title Line Length uses: gsactions/commit-message-checker@v2 @@ -27,6 +29,7 @@ jobs: excludeTitle: 'true' # optional: this excludes the title of a pull request checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true + - name: Check Title Does Not End With Period uses: gsactions/commit-message-checker@v2 with: @@ -37,6 +40,7 @@ jobs: excludeTitle: 'true' # optional: this excludes the title of a pull request checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true + - name: Check Title Begins With Capital uses: gsactions/commit-message-checker@v2 with: @@ -47,6 +51,7 @@ jobs: excludeTitle: 'true' # optional: this excludes the title of a pull request checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true + - name: Check Body Line Length uses: gsactions/commit-message-checker@v2 with: diff --git a/.github/workflows/doc-deploy.yml b/.github/workflows/doc-deploy.yml index 6f15983a..ca3e0fe1 100644 --- a/.github/workflows/doc-deploy.yml +++ b/.github/workflows/doc-deploy.yml @@ -1,10 +1,12 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Docusaurus Deploy Action for Maven-based Ewon ETK Projects -# Version: 1.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a push # is made to either the `main` or `gh-pages-staging` branch, # or when a run is manually triggered. + name: Docusaurus Deploy to GitHub Pages on: @@ -15,7 +17,7 @@ on: workflow_dispatch: jobs: - deploy: + doc-deploy: name: Docusaurus Deploy to GitHub Pages runs-on: ubuntu-latest defaults: @@ -23,10 +25,11 @@ jobs: shell: bash working-directory: web-docs steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 cache: yarn diff --git a/.github/workflows/doc-test-deploy.yml b/.github/workflows/doc-test-deploy.yml index 0b3ad9d9..adc2f07b 100644 --- a/.github/workflows/doc-test-deploy.yml +++ b/.github/workflows/doc-test-deploy.yml @@ -1,9 +1,11 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Test Docusaurus Deploy Action for Maven-based Ewon ETK Projects -# Version: 1.0 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a pull request # is opened for the `main` branch. + name: Test Docusaurus Build on: @@ -12,7 +14,7 @@ on: - main jobs: - test-deploy: + doc-test-deploy: name: Test Docusaurus Build runs-on: ubuntu-latest defaults: @@ -20,10 +22,11 @@ jobs: shell: bash working-directory: web-docs steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 cache: yarn diff --git a/.github/workflows/junit-test.yml b/.github/workflows/junit-test.yml index b9f0f29a..bee392ce 100644 --- a/.github/workflows/junit-test.yml +++ b/.github/workflows/junit-test.yml @@ -1,9 +1,10 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # JUnit Test Action for Maven-based Ewon ETK Projects -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a push -# is made or pull request is merged to the `main` or `master` +# is made to the `main` branch or a pull request for the `main` # branch. name: JUnit Test @@ -17,26 +18,18 @@ on: - main jobs: - build: + junit-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Set Up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 16 - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - target/buildJdk - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: 'maven' - name: Run JUnit Testing With Maven run: mvn test -f pom.xml diff --git a/.github/workflows/project-issue-automation.yml b/.github/workflows/project-issue-automation.yml index 6df77a71..f7a34b5f 100644 --- a/.github/workflows/project-issue-automation.yml +++ b/.github/workflows/project-issue-automation.yml @@ -1,3 +1,11 @@ +# HMS Networks; Americas +# Build Outputs Action for Maven-based Ewon ETK Project Releases +# Version: 3.0.0 +# Date: February 8, 2024 +# +# This action is configured to automatically run when a release +# tag is created in the following syntax: `v*`. + name: Add Issue to Project on: issues: diff --git a/.github/workflows/release-build-outputs.yml b/.github/workflows/release-build-outputs.yml index 248439bd..e02d5377 100644 --- a/.github/workflows/release-build-outputs.yml +++ b/.github/workflows/release-build-outputs.yml @@ -1,6 +1,7 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Build Outputs Action for Maven-based Ewon ETK Project Releases -# Version: 2.2 +# Version: 3.0.2 +# Date: April 9, 2024 # # This action is configured to automatically run when a release # tag is created in the following syntax: `v*`. @@ -22,26 +23,18 @@ env: jobs: - build: + build-outputs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 - name: Set Up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 16 - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - target/buildJdk - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: 'maven' - name: Compile Java Files With Maven run: mvn package -f pom.xml @@ -65,6 +58,13 @@ jobs: tr -d '\0' < $RELEASE_BODY_FILE.tmp > $RELEASE_BODY_FILE # gets section of changelog between (not including) version-specific header and next version header using regex look-back and look-ahead and removes trailing NULL characters + - name: Get Name of Artifact + run: | + ARTIFACT_PATHNAME=$(ls target/*-full.jar | head -n 1) + ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) + echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV + echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV + - name: Get Name of Release (RepoName-Version) run: echo "RELEASE_NAME=${{ github.event.repository.name }}-${{ env.VERSION_NUMBER }}" >> $GITHUB_ENV @@ -76,7 +76,7 @@ jobs: id: check_pre_release run: | # Check if SEMVER indicates a pre-release (has a hyphen after MAJOR.MINOR.PATCH) - if [[ ${{ env.VERSION_NUMBER }} =~ ^[0-9]+\.[0-9]+\.[0-9]+(-\S+)$ ]]; then + if [[ "${{ env.VERSION_NUMBER }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-(0|[1-9]\d*|([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then echo "IS_PRE_RELEASE=true" >> $GITHUB_ENV else echo "IS_PRE_RELEASE=false" >> $GITHUB_ENV @@ -91,10 +91,10 @@ jobs: target_commitish: ${{ github.sha }} name: Release ${{ env.VERSION_NUMBER }} draft: false - prerelease: ${{ steps.check_pre_release.outputs.IS_PRE_RELEASE }} + prerelease: ${{ env.IS_PRE_RELEASE }} generate_release_notes: false body_path: ${{ env.RELEASE_BODY_FILE }} files: | ./starting-files/* ${{ env.ARTIFACT_PATHNAME }} - ${{ env.RELEASE_NAME }}.zip + ${{ env.RELEASE_NAME }}.zip \ No newline at end of file diff --git a/.github/workflows/release-make-branch.yml b/.github/workflows/release-make-branch.yml index 3faded47..cf510b35 100644 --- a/.github/workflows/release-make-branch.yml +++ b/.github/workflows/release-make-branch.yml @@ -1,6 +1,7 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Make Branch Action for Maven-based Ewon ETK Project Releases -# Version: 2.0 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a release # tag is created in the following syntax: `v*`. @@ -16,7 +17,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - build: + make-branch: name: Create Release Branch runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release-push-maven-repo.yml b/.github/workflows/release-push-maven-repo.yml index 4764a343..fc2af55b 100644 --- a/.github/workflows/release-push-maven-repo.yml +++ b/.github/workflows/release-push-maven-repo.yml @@ -1,6 +1,7 @@ -# HMS Networks Solution Center +# HMS Networks; Americas # Maven Release Push Action for Maven-based Ewon ETK Project Releases -# Version: 2.1 +# Version: 3.0.0 +# Date: February 8, 2024 # # This action is configured to automatically run when a release # tag is created in the following syntax: `v*`. @@ -13,29 +14,20 @@ on: - 'v*' # Push events to matching v*, i.e. v1.0 jobs: - build: + push-maven-repo: runs-on: ubuntu-latest steps: - - name: Checkout project - uses: actions/checkout@v3 + - name: Checkout Project + uses: actions/checkout@v4 with: path: './project' - name: Set Up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 16 - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - ./project/target/buildJdk - key: ${{ runner.os }}-maven-${{ hashFiles('./project/**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: 'maven' - name: Compile Java Files With Maven run: mvn package -f ./project/pom.xml From 5c919b16ecd4bd36594b9abfec1fb12c8808aebc Mon Sep 17 00:00:00 2001 From: "Alex J Hawk (HMS)" <51409174+alexjhawk@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:40:10 -0400 Subject: [PATCH 4/4] Add GitHub issue templates Added the GitHub issue templates from the starter project, and replaced references of the word 'Application' with 'Library' for clarity. --- .github/ISSUE_TEMPLATE/01-app-bug-report.yml | 121 ++++++++++++++++++ .../ISSUE_TEMPLATE/02-doc-issue-report.yml | 48 +++++++ .github/ISSUE_TEMPLATE/03-feature-request.yml | 59 +++++++++ .github/ISSUE_TEMPLATE/04-security-report.yml | 68 ++++++++++ .github/ISSUE_TEMPLATE/05-other-report.yml | 73 +++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ 6 files changed, 377 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/01-app-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/02-doc-issue-report.yml create mode 100644 .github/ISSUE_TEMPLATE/03-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/04-security-report.yml create mode 100644 .github/ISSUE_TEMPLATE/05-other-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/01-app-bug-report.yml b/.github/ISSUE_TEMPLATE/01-app-bug-report.yml new file mode 100644 index 00000000..29a0a357 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-app-bug-report.yml @@ -0,0 +1,121 @@ +# HMS Networks; Americas +# Application Bug Report Template for Maven-based Ewon ETK Projects +# Version: 3.0.1 +# Date: June 6, 2024 +# +# Changes (v3.0.1): Replaced references to 'Application' with 'Library' +# +# This template provides an option when creating a new issue to report an +# application bug using a structured format. + +name: Bug Report +description: Create a new bug report to help us improve the project. +title: "[BUG]