From 2be41d87143fd71aaa921502d7020f573a951de5 Mon Sep 17 00:00:00 2001 From: James Maes Date: Fri, 5 Jul 2024 13:51:32 -0500 Subject: [PATCH 01/24] Update README.md Corrected Copyright Dates --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a840321..6b0375a6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You can also use fine-grained jars: ## License QQQ - Low-code Application Framework for Engineers. \ -Copyright (C) 2022. Kingsrook, LLC \ +Copyright (C) 2020-2024. Kingsrook, LLC \ 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States \ contact@kingsrook.com | https://github.com/Kingsrook/ From 1669741d19daea68238d280abbddfdce9437b153 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 5 Jul 2024 20:26:06 -0500 Subject: [PATCH 02/24] Add system property picocli.ansi=false, to help reliability of tests, which can fail if the don't expect ansci codes in the outputs --- .../qqq/frontend/picocli/QPicoCliImplementationTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/qqq-middleware-picocli/src/test/java/com/kingsrook/qqq/frontend/picocli/QPicoCliImplementationTest.java b/qqq-middleware-picocli/src/test/java/com/kingsrook/qqq/frontend/picocli/QPicoCliImplementationTest.java index c0b7417c..ba858384 100644 --- a/qqq-middleware-picocli/src/test/java/com/kingsrook/qqq/frontend/picocli/QPicoCliImplementationTest.java +++ b/qqq-middleware-picocli/src/test/java/com/kingsrook/qqq/frontend/picocli/QPicoCliImplementationTest.java @@ -70,6 +70,7 @@ class QPicoCliImplementationTest @BeforeEach public void beforeEach() throws Exception { + System.setProperty("picocli.ansi", "false"); TestUtils.primeTestDatabase(); QContext.init(TestUtils.defineInstance(), new QSession()); } From 2cf14e543cb089ce2ff5ba9bce68d6d47d75313c Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:35 -0500 Subject: [PATCH 03/24] Add workflow Kingsrook/qqq/test_only --- .github/workflows/test_only.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test_only.yml diff --git a/.github/workflows/test_only.yml b/.github/workflows/test_only.yml new file mode 100644 index 00000000..dd033a78 --- /dev/null +++ b/.github/workflows/test_only.yml @@ -0,0 +1,33 @@ +name: Kingsrook/qqq/test_only +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_test: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref != 'refs/heads//(dev|integration.*)/' && github.ref != 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify" From f380d44dd25bb4f1e58c468ea4fa7c9a3b957d8c Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:36 -0500 Subject: [PATCH 04/24] Add composite action install_java17 --- .github/actions/install_java17/action.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/actions/install_java17/action.yml diff --git a/.github/actions/install_java17/action.yml b/.github/actions/install_java17/action.yml new file mode 100644 index 00000000..7131a96d --- /dev/null +++ b/.github/actions/install_java17/action.yml @@ -0,0 +1,16 @@ +name: install_java17 +runs: + using: composite + steps: + - name: Install Java 17 + run: |- + sudo apt-get update + sudo apt install -y openjdk-17-jdk + sudo rm /etc/alternatives/java + sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java + shell: bash + - name: Install html2text + run: |- + sudo apt-get update + sudo apt-get install -y html2text + shell: bash \ No newline at end of file From 6ee8dad45fdf1cf1c0ed49ea9519a1523cf634c7 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:36 -0500 Subject: [PATCH 05/24] Add composite action mvn_verify --- .github/actions/mvn_verify/action.yml | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/actions/mvn_verify/action.yml diff --git a/.github/actions/mvn_verify/action.yml b/.github/actions/mvn_verify/action.yml new file mode 100644 index 00000000..a5f2e435 --- /dev/null +++ b/.github/actions/mvn_verify/action.yml @@ -0,0 +1,61 @@ +name: mvn_verify +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Write .env + run: echo "RDBMS_PASSWORD=$RDBMS_PASSWORD" >> qqq-sample-project/.env + shell: bash + - name: Run Maven Verify + run: mvn -s .circleci/mvn-settings.xml -T4 verify + shell: bash + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-core + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-filesystem + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-rdbms + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-javalin + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-picocli + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-slack + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-language-support-javascript + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-sample-project + - name: Save test results + run: |- + mkdir -p ~/test-results/junit/ + find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \; + if: always() + shell: bash + - uses: actions/upload-artifact@v4.1.0 + with: + path: "~/test-results" + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file From 429513f337d008c23182e6ab7b52525ea036b8a0 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:37 -0500 Subject: [PATCH 06/24] Add composite action store_jacoco_site --- .github/actions/store_jacoco_site/action.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/actions/store_jacoco_site/action.yml diff --git a/.github/actions/store_jacoco_site/action.yml b/.github/actions/store_jacoco_site/action.yml new file mode 100644 index 00000000..3dbe2345 --- /dev/null +++ b/.github/actions/store_jacoco_site/action.yml @@ -0,0 +1,13 @@ +name: store_jacoco_site +inputs: + module: + required: false +runs: + using: composite + steps: + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/index.html" + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/jacoco-resources" \ No newline at end of file From 9b1786dc0111f532bf68f4cfaa35094d77a1dfc7 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:38 -0500 Subject: [PATCH 07/24] Add workflow Kingsrook/qqq/deploy --- .github/workflows/deploy.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..b3da8f11 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Kingsrook/qqq/deploy +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_deploy: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//(dev|integration.*)/' || github.ref == 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify" + - uses: "./.github/actions/mvn_jar_deploy" + publish_asciidoc: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//dev/' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_asciidoctor" + - uses: "./.github/actions/run_asciidoctor" + - uses: "./.github/actions/upload_docs_site" From 3273e56b179ca796128ef5d21f5b62d80acecc64 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:39 -0500 Subject: [PATCH 08/24] Add composite action mvn_jar_deploy --- .github/actions/mvn_jar_deploy/action.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/actions/mvn_jar_deploy/action.yml diff --git a/.github/actions/mvn_jar_deploy/action.yml b/.github/actions/mvn_jar_deploy/action.yml new file mode 100644 index 00000000..1d46384b --- /dev/null +++ b/.github/actions/mvn_jar_deploy/action.yml @@ -0,0 +1,22 @@ +name: mvn_jar_deploy +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Adjust pom version + run: ".circleci/adjust-pom-version.sh" + shell: bash + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Run Maven Jar Deploy + run: mvn -s .circleci/mvn-settings.xml -T4 flatten:flatten jar:jar deploy:deploy + shell: bash + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file From 8395dfaa52fbfd21c7d28733b526f78540bec715 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:39 -0500 Subject: [PATCH 09/24] Add composite action install_asciidoctor --- .github/actions/install_asciidoctor/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/actions/install_asciidoctor/action.yml diff --git a/.github/actions/install_asciidoctor/action.yml b/.github/actions/install_asciidoctor/action.yml new file mode 100644 index 00000000..1dae4ede --- /dev/null +++ b/.github/actions/install_asciidoctor/action.yml @@ -0,0 +1,10 @@ +name: install_asciidoctor +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Install asciidoctor + run: |- + sudo apt-get update + sudo apt install -y asciidoctor + shell: bash \ No newline at end of file From d11ae90ad6b81697d0063f5cea544d160ee876ef Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:40 -0500 Subject: [PATCH 10/24] Add composite action run_asciidoctor --- .github/actions/run_asciidoctor/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/actions/run_asciidoctor/action.yml diff --git a/.github/actions/run_asciidoctor/action.yml b/.github/actions/run_asciidoctor/action.yml new file mode 100644 index 00000000..4a13752f --- /dev/null +++ b/.github/actions/run_asciidoctor/action.yml @@ -0,0 +1,9 @@ +name: run_asciidoctor +runs: + using: composite + steps: + - name: Run asciidoctor + run: |- + cd docs + asciidoctor -a docinfo=shared index.adoc + shell: bash \ No newline at end of file From 8648c67a985ecfeec3b4780a97b6dc3a3bfd3505 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:41 -0500 Subject: [PATCH 11/24] Add composite action upload_docs_site --- .github/actions/upload_docs_site/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/actions/upload_docs_site/action.yml diff --git a/.github/actions/upload_docs_site/action.yml b/.github/actions/upload_docs_site/action.yml new file mode 100644 index 00000000..19043bfe --- /dev/null +++ b/.github/actions/upload_docs_site/action.yml @@ -0,0 +1,9 @@ +name: upload_docs_site +runs: + using: composite + steps: + - name: scp html to justinsgotskinnylegs.com + run: |- + cd docs + scp index.html dkelkhoff@45.79.44.221:/mnt/first-volume/dkelkhoff/nginx/html/justinsgotskinnylegs.com/qqq-docs.html + shell: bash \ No newline at end of file From cb41f239b88cd16d144d2cd98b525735e57e07f3 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 09:18:47 -0500 Subject: [PATCH 12/24] Create SECURITY.md --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..034e8480 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. From 3c927693f1d0d496555d50e88a4a9bd6bdb786a2 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 09:21:06 -0500 Subject: [PATCH 13/24] Create codeql.yml --- .github/workflows/codeql.yml | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..2a229a37 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,93 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "dev", "main" ] + pull_request: + branches: [ "dev", "main" ] + schedule: + - cron: '31 10 * * 3' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: java-kotlin + build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From b11f1fb394bc16020d007922489c1af2c1f4b729 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 09:23:02 -0500 Subject: [PATCH 14/24] Create codacy.yml --- .github/workflows/codacy.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/codacy.yml diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml new file mode 100644 index 00000000..c43743d9 --- /dev/null +++ b/.github/workflows/codacy.yml @@ -0,0 +1,61 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow checks out code, performs a Codacy security scan +# and integrates the results with the +# GitHub Advanced Security code scanning feature. For more information on +# the Codacy security scan action usage and parameters, see +# https://github.com/codacy/codacy-analysis-cli-action. +# For more information on Codacy Analysis CLI in general, see +# https://github.com/codacy/codacy-analysis-cli. + +name: Codacy Security Scan + +on: + push: + branches: [ "dev", "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "dev" ] + schedule: + - cron: '26 5 * * 4' + +permissions: + contents: read + +jobs: + codacy-security-scan: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Codacy Security Scan + runs-on: ubuntu-latest + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout code + uses: actions/checkout@v4 + + # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b + with: + # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository + # You can also omit the token and run the tools that support default configurations + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + # Adjust severity of non-security issues + gh-code-scanning-compat: true + # Force 0 exit code to allow SARIF file generation + # This will handover control about PR rejection to the GitHub side + max-allowed-issues: 2147483647 + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif From 79b9f0e921f5272fc26cdf4c3f412873a50d017d Mon Sep 17 00:00:00 2001 From: KofTwentyTwo Date: Sat, 6 Jul 2024 10:10:56 -0500 Subject: [PATCH 15/24] Setup branches for security and release - to work as staging workflow branches for now --- .github/workflows/codacy.yml | 4 ++-- .github/workflows/codeql.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml index c43743d9..3fb8c874 100644 --- a/.github/workflows/codacy.yml +++ b/.github/workflows/codacy.yml @@ -15,10 +15,10 @@ name: Codacy Security Scan on: push: - branches: [ "dev", "main" ] + branches: [ "security" ] pull_request: # The branches below must be a subset of the branches above - branches: [ "dev" ] + branches: [ "security" ] schedule: - cron: '26 5 * * 4' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2a229a37..e860fc6b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,9 +13,9 @@ name: "CodeQL" on: push: - branches: [ "dev", "main" ] + branches: [ "security" ] pull_request: - branches: [ "dev", "main" ] + branches: [ "security" ] schedule: - cron: '31 10 * * 3' From 7fe7c2d0a0502b342b0c6b6a5a0c8771eba32ec2 Mon Sep 17 00:00:00 2001 From: KofTwentyTwo Date: Sat, 6 Jul 2024 10:11:11 -0500 Subject: [PATCH 16/24] Setup branches for security and release - to work as staging workflow branches for now --- .github/workflows/deploy.yml | 25 +------------------------ .github/workflows/test_only.yml | 23 +---------------------- 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b3da8f11..2ef902dd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,39 +2,16 @@ name: Kingsrook/qqq/deploy on: push: branches: - - dev -env: - ACTIVATE_PRO: xxxx - AUTH0_AUDIENCE: xxxx000/ - AUTH0_BASE_URL: xxxxcom/ - AUTH0_CLIENT_ID: xxxxYfcq - AUTH0_CLIENT_SECRET: xxxxA8P6 - CUSTOM_PROPERTY: xxxx9876 - EASYPOST_API_KEY: xxxxEt0Q - RDBMS_DATABASE_NAME: xxxxq - RDBMS_HOSTNAME: xxxx.0.1 - RDBMS_PASSWORD: xxxxua6L - RDBMS_PORT: xxxx06 - RDBMS_USERNAME: xxxxot - RDBMS_VENDOR: xxxxql + - release jobs: mvn_deploy: - if: # GitHub does not currently support regular expressions inside if conditions -# github.ref == 'refs/heads//(dev|integration.*)/' || github.ref == 'refs/tags//(version|snapshot)-.*/' runs-on: ubuntu-latest - env: - NPM_TOKEN: - QQQ_MAVEN_REGISTRY_PASSWORD: - QQQ_MAVEN_REGISTRY_USERNAME: - RDBMS_PASSWORD: steps: - uses: actions/checkout@v4.1.0 - uses: "./.github/actions/install_java17" - uses: "./.github/actions/mvn_verify" - uses: "./.github/actions/mvn_jar_deploy" publish_asciidoc: - if: # GitHub does not currently support regular expressions inside if conditions -# github.ref == 'refs/heads//dev/' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.0 diff --git a/.github/workflows/test_only.yml b/.github/workflows/test_only.yml index dd033a78..e1f5b1dd 100644 --- a/.github/workflows/test_only.yml +++ b/.github/workflows/test_only.yml @@ -2,31 +2,10 @@ name: Kingsrook/qqq/test_only on: push: branches: - - dev -env: - ACTIVATE_PRO: xxxx - AUTH0_AUDIENCE: xxxx000/ - AUTH0_BASE_URL: xxxxcom/ - AUTH0_CLIENT_ID: xxxxYfcq - AUTH0_CLIENT_SECRET: xxxxA8P6 - CUSTOM_PROPERTY: xxxx9876 - EASYPOST_API_KEY: xxxxEt0Q - RDBMS_DATABASE_NAME: xxxxq - RDBMS_HOSTNAME: xxxx.0.1 - RDBMS_PASSWORD: xxxxua6L - RDBMS_PORT: xxxx06 - RDBMS_USERNAME: xxxxot - RDBMS_VENDOR: xxxxql + - release jobs: mvn_test: - if: # GitHub does not currently support regular expressions inside if conditions -# github.ref != 'refs/heads//(dev|integration.*)/' && github.ref != 'refs/tags//(version|snapshot)-.*/' runs-on: ubuntu-latest - env: - NPM_TOKEN: - QQQ_MAVEN_REGISTRY_PASSWORD: - QQQ_MAVEN_REGISTRY_USERNAME: - RDBMS_PASSWORD: steps: - uses: actions/checkout@v4.1.0 - uses: "./.github/actions/install_java17" From 9e33ac564defbcdc9550b9414a577ca0a6e02176 Mon Sep 17 00:00:00 2001 From: KofTwentyTwo Date: Sat, 6 Jul 2024 10:14:38 -0500 Subject: [PATCH 17/24] Adding support for local qodana static analysis within IntelliJ --- qodana.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 qodana.yaml diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 00000000..08a316bd --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,31 @@ +#-------------------------------------------------------------------------------# +# Qodana analysis is configured by qodana.yaml file # +# https://www.jetbrains.com/help/qodana/qodana-yaml.html # +#-------------------------------------------------------------------------------# +version: "1.0" + +#Specify inspection profile for code analysis +profile: + name: qodana.starter + +#Enable inspections +#include: +# - name: + +#Disable inspections +#exclude: +# - name: +# paths: +# - + +projectJDK: 17 #(Applied in CI/CD pipeline) + +#Execute shell command before Qodana execution (Applied in CI/CD pipeline) +#bootstrap: sh ./prepare-qodana.sh + +#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) +#plugins: +# - id: #(plugin id can be found at https://plugins.jetbrains.com) + +#Specify Qodana linter for analysis (Applied in CI/CD pipeline) +linter: jetbrains/qodana-jvm:latest From 75279c2e6ce6c763b018064fd28bc1ff5aeacad0 Mon Sep 17 00:00:00 2001 From: KofTwentyTwo Date: Sat, 6 Jul 2024 10:15:28 -0500 Subject: [PATCH 18/24] Updated to ingore local cache and additional local generated ENV files with secerts in them --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index dffbdad6..cdf84762 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ hs_err_pid* *.swp .flattened-pom.xml dependency-reduced-pom.xml +/.env.local +/.cache/ From bd683253a51bb5d835bbd67c33e7ad4a895e65f5 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sat, 6 Jul 2024 11:13:34 -0500 Subject: [PATCH 19/24] Update qqq-frontend-material-dashboard to 0.20.0 release --- qqq-sample-project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qqq-sample-project/pom.xml b/qqq-sample-project/pom.xml index 9d9ea946..d7e8e2bf 100644 --- a/qqq-sample-project/pom.xml +++ b/qqq-sample-project/pom.xml @@ -68,7 +68,7 @@ com.kingsrook.qqq qqq-frontend-material-dashboard - 0.20.0-20240418.180316-42 + 0.20.0 com.h2database From 32573bdf78284855ece375ecc844345fd0ae7fab Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sat, 6 Jul 2024 11:26:00 -0500 Subject: [PATCH 20/24] Add releaseBranchPrefix=rel/ (to work around/with release branch exiting now) --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 29594d5a..da98726a 100644 --- a/pom.xml +++ b/pom.xml @@ -209,6 +209,7 @@ main dev version- + rel/ true install From 338670118daeaaec96932e63215fb70b91af21ab Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sat, 6 Jul 2024 11:29:38 -0500 Subject: [PATCH 21/24] Update versions for release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index da98726a..434ed4db 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ - 0.20.0-SNAPSHOT + 0.20.0 UTF-8 UTF-8 From 1522eed629ad3f68fd5a174f6080fecb6c0a6571 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sat, 6 Jul 2024 11:29:41 -0500 Subject: [PATCH 22/24] Update for next development version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 434ed4db..95ac1378 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ - 0.20.0 + 0.21.0-SNAPSHOT UTF-8 UTF-8 From e38e172722f0d30b5e13a496de5c2514364c62c4 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sat, 6 Jul 2024 11:40:00 -0500 Subject: [PATCH 23/24] Updating to 0.21.0 --- qqq-dev-tools/CURRENT-SNAPSHOT-VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qqq-dev-tools/CURRENT-SNAPSHOT-VERSION b/qqq-dev-tools/CURRENT-SNAPSHOT-VERSION index 5a03fb73..88541566 100644 --- a/qqq-dev-tools/CURRENT-SNAPSHOT-VERSION +++ b/qqq-dev-tools/CURRENT-SNAPSHOT-VERSION @@ -1 +1 @@ -0.20.0 +0.21.0 From 1a8980b2752b3714cf75604ca1ea93e3249fd63d Mon Sep 17 00:00:00 2001 From: Tim Chamberlain Date: Mon, 8 Jul 2024 18:41:44 -0500 Subject: [PATCH 24/24] hotfix - added getQueryJoins to allow adding joins in table sync query --- .../AbstractTableSyncTransformStep.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/implementations/tablesync/AbstractTableSyncTransformStep.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/implementations/tablesync/AbstractTableSyncTransformStep.java index d9b882b9..37652098 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/implementations/tablesync/AbstractTableSyncTransformStep.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/implementations/tablesync/AbstractTableSyncTransformStep.java @@ -49,6 +49,7 @@ import com.kingsrook.qqq.backend.core.model.actions.tables.query.QCriteriaOperat import com.kingsrook.qqq.backend.core.model.actions.tables.query.QFilterCriteria; import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter; import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryInput; +import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryJoin; import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryOutput; import com.kingsrook.qqq.backend.core.model.data.QRecord; import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData; @@ -430,6 +431,12 @@ public abstract class AbstractTableSyncTransformStep extends AbstractTransformSt queryInput.setAssociationNamesToInclude(associationNamesToInclude); } + Collection joins = getQueryJoins(); + if(CollectionUtils.nullSafeHasContents(joins)) + { + queryInput.setQueryJoins(getQueryJoins()); + } + QueryOutput queryOutput = new QueryAction().execute(queryInput); return (buildExistingRecordsMap(destinationTableForeignKeyField, queryOutput.getRecords())); } @@ -443,7 +450,7 @@ public abstract class AbstractTableSyncTransformStep extends AbstractTransformSt ** Note, if you're overriding this method, you'll likely also want & need to ** override getExistingRecord. *******************************************************************************/ - protected Map, QRecord> buildExistingRecordsMap(String destinationTableForeignKeyField, List existingRecordList) + protected Map, QRecord> buildExistingRecordsMap(String destinationTableForeignKeyField, List existingRecordList) throws QException { Map, QRecord> existingRecordsByForeignKey = new HashMap<>(); for(QRecord record : existingRecordList) @@ -455,6 +462,16 @@ public abstract class AbstractTableSyncTransformStep extends AbstractTransformSt + /******************************************************************************* + ** + *******************************************************************************/ + protected List getQueryJoins() + { + return null; + } + + + /******************************************************************************* ** *******************************************************************************/