From e21b4b850a7f3327e4a29709a77e559a26fbe1b2 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:05:10 -0500 Subject: [PATCH 01/86] Extension Release Automation --- .github/add-comment-to-pull-request.sh | 26 ++++ .github/add-label-to-pull-request.sh | 26 ++++ .github/set-version-from-head.sh | 13 ++ .github/set-version-from-pom.sh | 6 + .../workflows/pull-request-labeled-closed.yml | 126 ++++++++++++++++++ .../pull-request-labeled-release.yml | 33 +++++ .github/workflows/pull-request.yml | 94 +++++++++++++ .github/workflows/release-published.yml | 29 ++++ RELEASE.md | 85 ++++++++++++ 9 files changed, 438 insertions(+) create mode 100644 .github/add-comment-to-pull-request.sh create mode 100644 .github/add-label-to-pull-request.sh create mode 100644 .github/set-version-from-head.sh create mode 100644 .github/set-version-from-pom.sh create mode 100644 .github/workflows/pull-request-labeled-closed.yml create mode 100644 .github/workflows/pull-request-labeled-release.yml create mode 100644 .github/workflows/pull-request.yml create mode 100644 .github/workflows/release-published.yml create mode 100644 RELEASE.md diff --git a/.github/add-comment-to-pull-request.sh b/.github/add-comment-to-pull-request.sh new file mode 100644 index 0000000..a562524 --- /dev/null +++ b/.github/add-comment-to-pull-request.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -ex +set -o pipefail + +if [[ -z "$GITHUB_TOKEN" ]]; then + echo "Set the GITHUB_TOKEN env variable." + exit 1 +fi + +if [[ -z "$GITHUB_ISSUE_URL" ]]; then + echo "Set the GITHUB_ISSUE_URL env variable." + exit 1 +fi + +if [[ -z "$GITHUB_COMMENT" ]]; then + echo "Set the GITHUB_COMMENT env variable." + exit 1 +fi + +data='{"body":"'${GITHUB_COMMENT}'"}' + +#Create Label on Pull Request +curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + --data "$data" \ + "$GITHUB_ISSUE_URL/comments" diff --git a/.github/add-label-to-pull-request.sh b/.github/add-label-to-pull-request.sh new file mode 100644 index 0000000..ecd564f --- /dev/null +++ b/.github/add-label-to-pull-request.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +if [[ -z "$GITHUB_TOKEN" ]]; then + echo "Set the GITHUB_TOKEN env variable." + exit 1 +fi + +if [[ -z "$GITHUB_ISSUE_URL" ]]; then + echo "Set the GITHUB_ISSUE_URL env variable." + exit 1 +fi + +if [[ -z "$GITHUB_LABEL" ]]; then + echo "Set the GITHUB_LABEL env variable." + exit 1 +fi + +data='["'${GITHUB_LABEL}'"]' + +#Create Label on Pull Request +curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + --data "$data" \ + "$GITHUB_ISSUE_URL/labels" diff --git a/.github/set-version-from-head.sh b/.github/set-version-from-head.sh new file mode 100644 index 0000000..29fb0f5 --- /dev/null +++ b/.github/set-version-from-head.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +HEAD_REF=$1 + +if [[ -z "$HEAD_REF" ]]; then + echo "Set the HEAD_REF parameter" + exit 1 +fi + +echo "VERSION_TAG=${HEAD_REF#*org.liquibase-liquibase-core-}" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/set-version-from-pom.sh b/.github/set-version-from-pom.sh new file mode 100644 index 0000000..535e1fc --- /dev/null +++ b/.github/set-version-from-pom.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +echo "VERSION_TAG=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/pull-request-labeled-closed.yml b/.github/workflows/pull-request-labeled-closed.yml new file mode 100644 index 0000000..c86f52b --- /dev/null +++ b/.github/workflows/pull-request-labeled-closed.yml @@ -0,0 +1,126 @@ +name: Prepare Release Candidate for Release + +on: + pull_request: + types: + - closed + +jobs: + build: + name: Build Artifact + runs-on: ubuntu-latest + if: github.ref == 'main'&& github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) + steps: + - uses: actions/checkout@v2 + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: sonatype-nexus-staging + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.GPG_SECRET }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Build With Maven + run: mvn clean install -Dmaven.test.skip + env: + MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: liquibase-cosmosdb + path: target/*.jar + + draft-release: + needs: [ build ] + name: Draft Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + + - name: Set Version Tag ENV from POM + run: ./.github/set-version-from-pom.sh + + - run: echo ::set-output name=version::$VERSION_TAG + id: version + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: liquibase-cosmosdb + + - name: Release + uses: softprops/action-gh-release@v1 + with: + target_commitish: ${{ github.sha }} + name: v${{ steps.version.outputs.version }} + tag_name: liquibase-cosmosdb-${{ steps.version.outputs.version }} + draft: true + body: Support for Liquibase ${{ steps.version.outputs.version }}. + files: liquibase-cosmosdb-*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + bump-pom-to-snapshot: + name: Prepare POM for Development + runs-on: ubuntu-latest + needs: [ draft-release ] + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + + - name: Configure git user + run: | + git config user.name "liquibot" + git config user.email "liquibot@liquibase.org" + + - name: Bump POM Version for Development + run: | + mvn versions:set -DnextSnapshot=true + git add pom.xml + git commit -m "Version Bumped to Snapshot for Developent" + git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.base_ref }} --follow-tags --tags + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pull-request-labeled-release.yml b/.github/workflows/pull-request-labeled-release.yml new file mode 100644 index 0000000..602a2a5 --- /dev/null +++ b/.github/workflows/pull-request-labeled-release.yml @@ -0,0 +1,33 @@ +name: Build, Test, and Prepare Release Candidate + +on: + pull_request: + types: + - labeled + - reopened + - synchronize + +jobs: + integration-tests: + name: Java ${{ matrix.java }} + runs-on: ubuntu-latest + if: contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) + strategy: + matrix: + java: [8, 11, 16] + steps: + - uses: actions/checkout@v2 + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'adopt' + - name: Test With Maven + run: mvn clean verify --file pom.xml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..858f76a --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,94 @@ +name: Run Unit Tests + +on: + pull_request: + types: + - opened + - reopened + - synchronize + +jobs: + unit-test: + name: Java ${{ matrix.java }} + runs-on: ubuntu-latest + # Only run job if untagged as release. Will run for all PRs and release PRs during the first run. + if: ${{ !contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) }} + strategy: + matrix: + java: [8, 11, 16] + + steps: + - uses: actions/checkout@v2 + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'adopt' + - name: Run Unit Tests With Maven + run: mvn surefire:test --file pom.xml + + # This step is the automation to create a release based on a liquibase core bump + # If a manual release is required, the steps below will need to be done manually prior + # to adding the Release Candidate label. + label: + name: Label as Release Candidate + runs-on: ubuntu-latest + needs: [ unit-test ] + if: contains( github.event.pull_request.head.ref, 'dependabot/maven/org.liquibase-liquibase-core' ) + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + + - name: Cache Local Maven Repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + + - name: Set Version Tag ENV + run: ./.github/set-version-from-head.sh ${{ github.event.pull_request.head.ref }} + + - run: echo $VERSION_TAG + + - name: Configure git user + run: | + git config user.name "liquibot" + git config user.email "liquibot@liquibase.org" + + - name: Bump POM Version for Next Release + run: | + mvn versions:set -DnewVersion=$VERSION_TAG + git add pom.xml + git commit -m "Version Bumped to $VERSION_TAG" + git tag -a -m "Version Bumped to $VERSION_TAG" liquibase-cosmosdb-$VERSION_TAG + git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.event.pull_request.head.ref }} --follow-tags --tags + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + + - run: ./.github/add-label-to-pull-request.sh + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + GITHUB_ISSUE_URL: ${{ github.event.pull_request._links.issue.href }} + GITHUB_LABEL: "Extension Release Candidate :rocket:" + - run: ./.github/add-comment-to-pull-request.sh + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + GITHUB_ISSUE_URL: ${{ github.event.pull_request._links.issue.href }} + GITHUB_COMMENT: "

⚠️ Reminder

Release Candidate pull requests will automatically release when merged.

Please review and merge all other pull requests prior to merging this request." \ No newline at end of file diff --git a/.github/workflows/release-published.yml b/.github/workflows/release-published.yml new file mode 100644 index 0000000..eb9d2ff --- /dev/null +++ b/.github/workflows/release-published.yml @@ -0,0 +1,29 @@ +name: Release Extension to Sonatype + +on: + release: + types: [published] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: sonatype-nexus-staging + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.GPG_SECRET }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Publish to the Maven Central Repository + run: mvn clean deploy -Dmaven.test.skip -P release + env: + MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..ada6278 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,85 @@ +# Release Workflow +The release automation is designed to quickly release updates to liquibase extensions. This routinely happens when there is an update to liquibase core. There are unique automates automated steps when a pull requests is created by dependabot for a `Bump liquibase-core from *.*.* to *.*.*`, but these steps can also be taken manually for a patch or other manual release. + +## Triggers +### Pull Request Opened +When all pull requests are opened the Unit Tests will run and they must pass before the PR can be merged. For a liquibase core bump PR, the application version in the POM will automatically be set to match the liquibase core version. If creating a manual PR for release, the `*.*.*` tag in the POM will need to be set to the correct version without the `SNAPSHOT` suffix in order to release to Sonatype Nexus. For example, `4.3.5.1/version>` to release a patch version for the extension release for liquibase core 4.3.5. +### Pull Request Labeled as Release Candidate +If the `Extension Release Candidate :rocket:` label is applied to the PR, this is the trigger for GitHub Actions to run the full Integration Test suite matrix on the pull requests because this commit will become the next release. For a liquibase core bump, this label will automatically be applied to the dependabot PR. If this is a manual release, manually applying the label will also start the release testing and subsequent automation. +### Pull Request is Approved and Merged to Main +If a Pull Request is merged into main and is labeled as release candidate the following automation steps will be taken: +* Signed artifact is built +* A draft GitHub Release is created proper tagging, version name, and artifact +* The application version in the POM is bumped to be the next SNAPSHOT version for development +### Draft Release is Published +Once the GitHub release is published, the signed artifact is uploaded to Sonatype Nexus. The `true` option is defined in the POM, so for all releases without the `SNAPSHOT` suffix, they will automatically release after all the staging test have passed. If everything goes well, no further manual action is required. + +## Testing +The workflow separates Unit Test from Integration Tests and runs them at separate times, as mentioned above. In order to separate the tests, they must be in separate files. Put all Unit Tests into files that end with `Test.java` and Integration Test files should end with `IT.java`. For example the tests for the Liquibase Postgresql Extension now look like: +``` +> src + > test + > java + > liquibase.ext + > copy + CopyChangeIT.java + CopyChangeTest.java + > vacuum + VacuumChangeTest.java +``` +Any tests that require a JDBC connection to a running database are integration tests and should be in the `IT.java` files. + +## Repository Configuration +The automation requires the below secrets and configuration in order to run. +### BOT TOKEN +Github secret named: `BOT_TOKEN` + +Github Actions bot cannot trigger events, so a liquibase robot user is needed to trigger automated events. An access token belonging to the liquibase robot user should be added to the repository secrets and named `BOT_TOKEN`. + +### GPG SECRET +Github secret named: `GPG_SECRET` + +According to [the advanced java setup docs for github actions](https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#gpg) the GPG key should be exported by: `gpg --armor --export-secret-keys YOUR_ID`. From the datical/build-maven:jdk-8 docker container, this can be export by the following: +```bash +$ docker run -it -u root docker.artifactory.datical.net/datical/build-maven:jdk-8 bash + +$ gpg -k +/home/jenkins/.gnupg/pubring.kbx +-------------------------------- +pub rsa2048 2020-02-12 [SC] [expires: 2022-02-11] + **** OBFUSCATED ID **** +uid [ultimate] Liquibase +sub rsa2048 2020-02-12 [E] [expires: 2022-02-11] + +$ gpg --armor --export-secret-keys --pinentry-mode loopback **** OBFUSCATED ID **** +Enter passphrase: *** GPG PASSPHRASE *** +-----BEGIN PGP PRIVATE KEY BLOCK----- +****** +****** +=XCvo +-----END PGP PRIVATE KEY BLOCK----- +``` + +### GPG PASSPHRASE +Github secret named: `GPG_PASSPHRASE` +The passphrase is the same one used previously for the manual release and is documented elsewhere for the manual release process. + +### SONATYPE USERNAME +Github secret named: `SONATYPE_USERNAME` + +The username or token for the sonatype account. Current managed and shared via lastpass for the Shared-DevOps group. + +### SONATYPE TOKEN +Github secret named: `SONATYPE_TOKEN` + +The password or token for the sonatype account. Current managed and shared via lastpass for the Shared-DevOps group. + +### Label Settings +Create a label with the following settings: +* Label name: `Extension Release Candidate :rocket:` +* Description: `Release Candidate for Extension` +* Color: `#ff3d00` + +## Useful Links +* [Advanced Java Setup for GitHub Actions](https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#gpg) +* [Deploying to Sonatype Nexus with Apache Maven](https://central.sonatype.org/publish/publish-maven/) \ No newline at end of file From 2f68aa07cef206d1d0f089d2965e3ed28c352d76 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:09:28 -0500 Subject: [PATCH 02/86] Extension Release Automation --- .github/add-comment-to-pull-request.sh | 0 .github/add-label-to-pull-request.sh | 0 .github/set-version-from-head.sh | 0 .github/set-version-from-pom.sh | 0 pom.xml | 317 ++++++++++--------------- 5 files changed, 120 insertions(+), 197 deletions(-) mode change 100644 => 100755 .github/add-comment-to-pull-request.sh mode change 100644 => 100755 .github/add-label-to-pull-request.sh mode change 100644 => 100755 .github/set-version-from-head.sh mode change 100644 => 100755 .github/set-version-from-pom.sh diff --git a/.github/add-comment-to-pull-request.sh b/.github/add-comment-to-pull-request.sh old mode 100644 new mode 100755 diff --git a/.github/add-label-to-pull-request.sh b/.github/add-label-to-pull-request.sh old mode 100644 new mode 100755 diff --git a/.github/set-version-from-head.sh b/.github/set-version-from-head.sh old mode 100644 new mode 100755 diff --git a/.github/set-version-from-pom.sh b/.github/set-version-from-pom.sh old mode 100644 new mode 100755 diff --git a/pom.xml b/pom.xml index e1e48c1..891453a 100644 --- a/pom.xml +++ b/pom.xml @@ -137,162 +137,105 @@ - - - src/test/resources - true - - + + + + maven-resources-plugin + + UTF-8 + + + + + maven-compiler-plugin + + 1.8 + 1.8 + true + true + ${project.build.sourceEncoding} + + + + + maven-surefire-plugin + + false + true + plain + + + + unit-tests + test + + test + + + + **/*Test.java + + + + + integration-tests + integration-test + + test + + + + **/*IT.java + **/*Test.java + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-java + compile + + enforce + + + + + 1.8 + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + sonatype-nexus-staging + https://oss.sonatype.org/ + true + + + + - - - - maven-surefire-plugin - ${maven-surefire-plugin.version} - - true - plain - - - - maven-failsafe-plugin - ${maven-failsafe-plugin.version} - - - - org.apache.maven.plugins - maven-help-plugin - ${maven-help-plugin.version} - - - show-profiles - compile - - active-profiles - - - - - - - org.codehaus.mojo - license-maven-plugin - ${license-maven-plugin.version} - - - first - - update-file-header - - process-sources - - - - - maven-resources-plugin - - ${project.build.sourceEncoding} - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-jar-plugin.version} - - - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - true - true - ${project.build.sourceEncoding} - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-java - compile - - enforce - - - - - ${maven.compiler.target} - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - - - org.apache.maven.plugins - maven-release-plugin - ${maven-release-plugin.version} - - /tmp/maven-snapshot - forked-path - false - - - - maven-deploy-plugin - - false - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} - true - - - default-deploy - deploy - - deploy - - - - - sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - org.apache.maven.plugins - maven-javadoc-plugin - - false - Liquibase CDI ${project.version} API - true - none - ${project.build.sourceEncoding} - ${project.basedir}/target - - - - jar-javadoc - - jar - - package - - - - - + sonatype-nexus-staging @@ -300,77 +243,56 @@ https://oss.sonatype.org/service/local/staging/deploy/maven2 - sonatype-nexus-snapshots + sonatype-nexus-staging Sonatype Nexus Snapshots https://oss.sonatype.org/content/repositories/snapshots + - test-jar + + release org.apache.maven.plugins - maven-jar-plugin + maven-source-plugin + 3.2.1 + attach-sources - test-jar + jar-no-fork - - - - - run-its - - cosmosdb://localhost:C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==@localhost:8081/testdb1 - - - org.apache.maven.plugins - maven-failsafe-plugin + maven-javadoc-plugin + + false + Liquibase CDI ${project.version} API + true + none + UTF-8 + ${project.basedir}/target + - default - - integration-test - - - - verify - verify + jar-javadoc - verify + jar + package - - ${project.build.outputDirectory} - - - - - - - release-sign-artifacts - - - performRelease - true - - - - org.apache.maven.plugins maven-gpg-plugin - ${maven-gpg-plugin.version} + 3.0.1 ${env.GPG_PASSPHRASE} @@ -395,4 +317,5 @@ - + + \ No newline at end of file From 9d3043636a629afe7f48a9d25a7ea01ead0c4cd6 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:12:10 -0500 Subject: [PATCH 03/86] Extension Release Automation --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 891453a..e2539d4 100644 --- a/pom.xml +++ b/pom.xml @@ -38,11 +38,11 @@ 2.22.2 2.22.2 4.3.5 - 5.7.1 + 5.7.2 1.3.2 - 3.9.0 - 3.9.0 - 4.14.0 + 3.10.0 + 3.10.0 + 4.15.0 1.18.20 1.3 3.19.0 @@ -59,7 +59,7 @@ 3.2.0 2.5.3 3.2.0 - 1.6 + 3.0.1 @@ -292,7 +292,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + ${maven-gpg-plugin.version} ${env.GPG_PASSPHRASE} From c9e2d6b0ba55378dc5fc4539b865db1dd9687daa Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:13:15 -0500 Subject: [PATCH 04/86] Extension Release Automation --- .travis.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6135d0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: shell - -os: windows - -services: - - docker - -before_script: - - choco install openjdk8 --version 8.282.08 - - export JAVA_HOME='/c/Program Files/OpenJDK/openjdk-8u282-b08' - - echo $JAVA_HOME - - choco install maven --version 3.6.3 - - export M2_HOME=/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3 - - echo $M2_HOME - - echo $PATH - #- docker run --name azure-cosmosdb-emulator --memory 2GB -p 8081:8081 -p 8900:8900 -p 8901:8901 -p 8902:8902 -p 10250:10250 -p 10251:10251 -p 10252:10252 -p 10253:10253 -p 10254:10254 -p 10255:10255 -p 10256:10256 -p 10350:10350 mcr.microsoft.com/cosmosdb/windows/azure-cosmos-emulator - -# Unit tests only until cosmos-emulator in place -script: - - $M2_HOME/bin/mvn clean install From fdc9f0ef49f18dc7a2152663dddc5d0308581c6e Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:15:53 -0500 Subject: [PATCH 05/86] Release 4.3.5 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e2539d4..2c69429 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.3.5-SNAPSHOT + 4.3.5 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -318,4 +318,4 @@ - \ No newline at end of file + From 9fe45edb65b3adc3909f65591487eeaedc8b96b5 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 14:18:40 -0500 Subject: [PATCH 06/86] Release 4.3.5 From 329e535eaa555375f507a4639407893f8ccb983e Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 15:27:13 -0500 Subject: [PATCH 07/86] Release 4.3.5 From 2d45c42e20ffe3c8bd9f5462f13f534e644aaecf Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 15:30:02 -0500 Subject: [PATCH 08/86] Release 4.3.5 --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 2c69429..1502ff9 100644 --- a/pom.xml +++ b/pom.xml @@ -319,3 +319,9 @@ + + + + + + From d671653b94531c97da581fdc7ca7ad96def2e305 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 15:37:37 -0500 Subject: [PATCH 09/86] Revert "Release 4.3.5" --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1502ff9..2c69429 100644 --- a/pom.xml +++ b/pom.xml @@ -319,9 +319,3 @@ - - - - - - From f99bdd9b9cc2c95e38affe9c7a30618f07fdf063 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 15:56:44 -0500 Subject: [PATCH 10/86] Removing Java 11 and 16, sticking with 8 for now --- .github/workflows/pull-request-labeled-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-labeled-release.yml b/.github/workflows/pull-request-labeled-release.yml index 602a2a5..af598b7 100644 --- a/.github/workflows/pull-request-labeled-release.yml +++ b/.github/workflows/pull-request-labeled-release.yml @@ -14,7 +14,7 @@ jobs: if: contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) strategy: matrix: - java: [8, 11, 16] + java: [8] steps: - uses: actions/checkout@v2 - name: Cache Local Maven Repository From 741d85347320c4e82b710aa2e09e9529a29901ba Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Mon, 17 May 2021 16:00:00 -0500 Subject: [PATCH 11/86] Moving back in Java 11 and 16 --- .github/workflows/pull-request-labeled-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-labeled-release.yml b/.github/workflows/pull-request-labeled-release.yml index af598b7..602a2a5 100644 --- a/.github/workflows/pull-request-labeled-release.yml +++ b/.github/workflows/pull-request-labeled-release.yml @@ -14,7 +14,7 @@ jobs: if: contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) strategy: matrix: - java: [8] + java: [8, 11, 16] steps: - uses: actions/checkout@v2 - name: Cache Local Maven Repository From 65dced6676e83fda4663c05a97da21e62e9cf2ca Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Wed, 19 May 2021 09:05:59 -0500 Subject: [PATCH 12/86] Update for Java 11/16 compilation --- .../liquibase/ext/cosmosdb/persistence/AbstractRepository.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/liquibase/ext/cosmosdb/persistence/AbstractRepository.java b/src/main/java/liquibase/ext/cosmosdb/persistence/AbstractRepository.java index 3dfacda..abc3b91 100644 --- a/src/main/java/liquibase/ext/cosmosdb/persistence/AbstractRepository.java +++ b/src/main/java/liquibase/ext/cosmosdb/persistence/AbstractRepository.java @@ -29,7 +29,8 @@ public Optional get(final String id) { final SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=" + JsonUtils.COSMOS_ID_PARAMETER, new SqlParameter(JsonUtils.COSMOS_ID_PARAMETER, id)); - return container.queryItems(querySpec, null, Map.class).stream().findFirst().map(converter::fromDocument); + //return container.queryItems(querySpec, null, Map.class).stream().findFirst().map(converter::fromDocument); + return container.queryItems(querySpec, null, Map.class).stream().findFirst().map(map -> (T) converter.fromDocument(map)); } public List getAll() { From f0e8e94a3cf4989391a6d0337bdf336f8ffbd3a8 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Wed, 19 May 2021 09:26:33 -0500 Subject: [PATCH 13/86] Version Bumped to 4.3.5 --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 2c69429..c21d041 100644 --- a/pom.xml +++ b/pom.xml @@ -319,3 +319,6 @@ + + + From 0a2a12d86242849f7bf7d801ee864a729ca05168 Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Wed, 19 May 2021 09:37:16 -0500 Subject: [PATCH 14/86] Bump pom version for development MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GH action failed because it couldn't talk to GH. 🤷 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c21d041..a527feb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.3.5 + 4.3.6-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From a8167827a4beb5d46f790c759d55026a50c92623 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 06:32:17 +0000 Subject: [PATCH 15/86] Bump snakeyaml from 1.28 to 1.29 Bumps [snakeyaml](https://bitbucket.org/asomov/snakeyaml) from 1.28 to 1.29. - [Commits](https://bitbucket.org/asomov/snakeyaml/branches/compare/snakeyaml-1.29..snakeyaml-1.28) --- updated-dependencies: - dependency-name: org.yaml:snakeyaml dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a527feb..5a2a8f9 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 2.0.0 3.2.0 2.12.3 - 1.28 + 1.29 1.6.8 3.2.0 2.5.3 From 1a8f67047e741b7f3adcb41e21ece3d846db274a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 08:06:18 +0000 Subject: [PATCH 16/86] Bump mockito-junit-jupiter from 3.10.0 to 3.11.1 Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.10.0 to 3.11.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.10.0...v3.11.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a527feb..1362abb 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 5.7.2 1.3.2 3.10.0 - 3.10.0 + 3.11.1 4.15.0 1.18.20 1.3 From b38c38f504aa96dce25c27134afe9467b20dad52 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 16 Jun 2021 09:48:33 -0500 Subject: [PATCH 17/86] Updated to liquibase 4.4.0 --- pom.xml | 2 +- .../nosql/lockservice/AbstractNoSqlLockService.java | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index a527feb..f941164 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 4.3.5 + 4.4.0 5.7.2 1.3.2 3.10.0 diff --git a/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java b/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java index 18f2023..055c657 100644 --- a/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java +++ b/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java @@ -20,9 +20,8 @@ * #L% */ +import liquibase.GlobalConfiguration; import liquibase.Scope; -import liquibase.configuration.GlobalConfiguration; -import liquibase.configuration.LiquibaseConfiguration; import liquibase.database.Database; import liquibase.exception.DatabaseException; import liquibase.exception.LockException; @@ -272,10 +271,7 @@ public Long getChangeLogLockRecheckTime() { if (changeLogLockRecheckTime != null) { return changeLogLockRecheckTime; } - return LiquibaseConfiguration - .getInstance() - .getConfiguration(GlobalConfiguration.class) - .getDatabaseChangeLogLockPollRate(); + return GlobalConfiguration.CHANGELOGLOCK_POLL_RATE.getCurrentValue(); } @Override @@ -287,10 +283,7 @@ public Long getChangeLogLockWaitTime() { if (changeLogLockPollRate != null) { return changeLogLockPollRate; } - return LiquibaseConfiguration - .getInstance() - .getConfiguration(GlobalConfiguration.class) - .getDatabaseChangeLogLockWaitTime(); + return GlobalConfiguration.CHANGELOGLOCK_WAIT_TIME.getCurrentValue(); } @Override From 51bd62d71e13082babb62aa5eb3e0764e681bf58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 08:13:33 +0000 Subject: [PATCH 18/86] Bump assertj-core from 3.19.0 to 3.20.2 Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.19.0 to 3.20.2. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.19.0...assertj-core-3.20.2) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a527feb..6bd5850 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 4.15.0 1.18.20 1.3 - 3.19.0 + 3.20.2 mastercard_apache_license ${project.baseUri}/src/license 2021 From 24af3f78c52c53d7b51c3c8e37b74a68ac7e859f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 19:24:46 +0000 Subject: [PATCH 19/86] Bump azure-cosmos from 4.15.0 to 4.16.0 Bumps [azure-cosmos](https://github.com/Azure/azure-sdk-for-java) from 4.15.0 to 4.16.0. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](https://github.com/Azure/azure-sdk-for-java/compare/azure-cosmos_4.15.0...azure-cosmos_4.16.0) --- updated-dependencies: - dependency-name: com.azure:azure-cosmos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73a43e1..495a676 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 1.3.2 3.10.0 3.11.1 - 4.15.0 + 4.16.0 1.18.20 1.3 3.19.0 From 568af92b77e8e6e1cfab98f0fe281f16482d627e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 19:25:07 +0000 Subject: [PATCH 20/86] Bump mockito-core from 3.10.0 to 3.11.2 Bumps [mockito-core](https://github.com/mockito/mockito) from 3.10.0 to 3.11.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.10.0...v3.11.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73a43e1..56bb42b 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 4.3.5 5.7.2 1.3.2 - 3.10.0 + 3.11.2 3.11.1 4.15.0 1.18.20 From 1ba02de0c1633f3754a3c0f77e932a397061d415 Mon Sep 17 00:00:00 2001 From: Mike Olivas <47544147+molivasdat@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:26:48 -0500 Subject: [PATCH 21/86] Bumping to match jupiter changes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56bb42b..d804089 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 4.3.5 5.7.2 1.3.2 - 3.11.2 + 3.11.1 3.11.1 4.15.0 1.18.20 From cfef49929c65fa844554376cae159b6d0dfdf41a Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Mon, 21 Jun 2021 14:49:35 -0500 Subject: [PATCH 22/86] Version bumped to 4.4.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f941164..3902dbf 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.3.6-SNAPSHOT + 4.4.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 84f065fde923b4783a409b9ea85f64892cc427eb Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 21 Jun 2021 20:11:44 +0000 Subject: [PATCH 23/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 779afd3..697ed87 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.0 + 4.4.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 3dda186343ad9c386c9ea96193ca60bac75b9703 Mon Sep 17 00:00:00 2001 From: Mike Olivas <47544147+molivasdat@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:18:59 -0500 Subject: [PATCH 24/86] Redo release candidate with correct versions --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 697ed87..779afd3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.1-SNAPSHOT + 4.4.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 2182cc2ebe26ba3bac7498c6d6f400fdd00b0beb Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 21 Jun 2021 20:27:24 +0000 Subject: [PATCH 25/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 779afd3..697ed87 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.0 + 4.4.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 1c8fdefb3674447d2cca4ff67447b3bbde37c6bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 08:11:29 +0000 Subject: [PATCH 26/86] Bump mockito-core from 3.11.1 to 3.11.2 Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.1 to 3.11.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.1...v3.11.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 697ed87..181f5aa 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 4.4.0 5.7.2 1.3.2 - 3.11.1 + 3.11.2 3.11.1 4.16.0 1.18.20 From 5d2c98e09d655b38bc1d4dfcac54357e1ff07f7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 08:10:25 +0000 Subject: [PATCH 27/86] Bump jackson-databind from 2.12.3 to 2.12.4 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.3 to 2.12.4. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 697ed87..e45e414 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ true 2.0.0 3.2.0 - 2.12.3 + 2.12.4 1.29 1.6.8 3.2.0 From 6fe81064ecbdb130206cc021d9a0433bfc6727ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:51:33 +0000 Subject: [PATCH 28/86] Bump mockito-junit-jupiter from 3.11.1 to 3.11.2 Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.11.1 to 3.11.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.1...v3.11.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 181f5aa..84b666c 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 5.7.2 1.3.2 3.11.2 - 3.11.1 + 3.11.2 4.16.0 1.18.20 1.3 From 61025191cc7c21b748918ef6b4172138e58a9379 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:53:31 +0000 Subject: [PATCH 29/86] Bump azure-cosmos from 4.16.0 to 4.17.0 Bumps [azure-cosmos](https://github.com/Azure/azure-sdk-for-java) from 4.16.0 to 4.17.0. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](https://github.com/Azure/azure-sdk-for-java/compare/azure-cosmos_4.16.0...azure-cosmos_4.17.0) --- updated-dependencies: - dependency-name: com.azure:azure-cosmos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb95a0d..4ba97e6 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 1.3.2 3.11.2 3.11.2 - 4.16.0 + 4.17.0 1.18.20 1.3 3.20.2 From 2e7dfd80c3916c0ffabcc4a41412417984354fd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:55:23 +0000 Subject: [PATCH 30/86] Bump liquibase-core from 4.4.0 to 4.4.1 Bumps [liquibase-core](https://github.com/liquibase/liquibase) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.4.0...v4.4.1) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ba97e6..d3f4713 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 4.4.0 + 4.4.1 5.7.2 1.3.2 3.11.2 From 1ebd04c0222f98860379b7a67eed1a8d2dc7e0fc Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 16 Jul 2021 19:58:00 +0000 Subject: [PATCH 31/86] Version Bumped to 4.4.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3f4713..1fb4ba6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.1-SNAPSHOT + 4.4.1 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 464b173fa064b31bfd696fffd7b50b4a65dfc02c Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 16 Jul 2021 20:00:33 +0000 Subject: [PATCH 32/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fb4ba6..e0d0879 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.1 + 4.4.2-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 257b87f628b1ecdd4c360d57b3fdab514f7e345f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jul 2021 08:12:00 +0000 Subject: [PATCH 33/86] Bump liquibase-core from 4.4.1 to 4.4.2 Bumps [liquibase-core](https://github.com/liquibase/liquibase) from 4.4.1 to 4.4.2. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.4.1...v4.4.2) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e0d0879..d33861a 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 4.4.1 + 4.4.2 5.7.2 1.3.2 3.11.2 From 6ca9315e300a548d23b767523926b1a155634af6 Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 6 Aug 2021 18:54:56 +0000 Subject: [PATCH 34/86] Version Bumped to 4.4.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d33861a..ef6aea9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.2-SNAPSHOT + 4.4.2 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 90f9fd71dbe62ed862d4fab55bbe78b705ae28b4 Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 6 Aug 2021 18:59:04 +0000 Subject: [PATCH 35/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef6aea9..87b93e0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.2 + 4.4.3-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From ea2e098bf050bf88ef892bc4bf84ce041bc0d39e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 08:15:46 +0000 Subject: [PATCH 36/86] Bump liquibase-core from 4.4.2 to 4.4.3 Bumps [liquibase-core](https://github.com/liquibase/liquibase) from 4.4.2 to 4.4.3. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.4.2...v4.4.3) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 87b93e0..2c3411a 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 4.4.2 + 4.4.3 5.7.2 1.3.2 3.11.2 From 171199161fd97be83b9c10bcc3f8cb08b036c606 Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 9 Aug 2021 14:22:01 +0000 Subject: [PATCH 37/86] Version Bumped to 4.4.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c3411a..493f869 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.3-SNAPSHOT + 4.4.3 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From cc120e5e75d7910a3cb1730a0c8de648ec12c814 Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 9 Aug 2021 14:46:28 +0000 Subject: [PATCH 38/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 493f869..20b3f45 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.3 + 4.4.4-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 6cc19879ff715742180ee240748f4abdfd20f0b5 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 11 Aug 2021 16:06:32 -0500 Subject: [PATCH 39/86] Added missing supports() method to NoSqlExecutor --- src/main/java/liquibase/nosql/executor/NoSqlExecutor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/liquibase/nosql/executor/NoSqlExecutor.java b/src/main/java/liquibase/nosql/executor/NoSqlExecutor.java index 5f7b84b..a360ba9 100644 --- a/src/main/java/liquibase/nosql/executor/NoSqlExecutor.java +++ b/src/main/java/liquibase/nosql/executor/NoSqlExecutor.java @@ -25,6 +25,7 @@ import liquibase.database.Database; import liquibase.exception.DatabaseException; import liquibase.executor.AbstractExecutor; +import liquibase.ext.cosmosdb.database.CosmosLiquibaseDatabase; import liquibase.logging.Logger; import liquibase.nosql.changelog.AbstractNoSqlHistoryService; import liquibase.nosql.database.AbstractNoSqlConnection; @@ -68,6 +69,11 @@ public String getName() { return EXECUTOR_NAME; } + @Override + public boolean supports(Database database) { + return database instanceof CosmosLiquibaseDatabase; + } + @Override public int getPriority() { return PRIORITY_SPECIALIZED; From ab7fd3dba4d8b131db4219049dd3348da06e1a03 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 11 Aug 2021 16:19:55 -0500 Subject: [PATCH 40/86] Added missing supports() method to CosmosConnection --- .../ext/cosmosdb/database/CosmosConnection.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/liquibase/ext/cosmosdb/database/CosmosConnection.java b/src/main/java/liquibase/ext/cosmosdb/database/CosmosConnection.java index 64d65bc..179b9cf 100644 --- a/src/main/java/liquibase/ext/cosmosdb/database/CosmosConnection.java +++ b/src/main/java/liquibase/ext/cosmosdb/database/CosmosConnection.java @@ -23,6 +23,7 @@ import com.azure.cosmos.CosmosDatabase; import liquibase.exception.DatabaseException; import liquibase.nosql.database.AbstractNoSqlConnection; +import liquibase.util.StringUtil; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -32,10 +33,7 @@ import static java.util.Objects.isNull; import static java.util.Optional.ofNullable; -import static liquibase.ext.cosmosdb.database.CosmosConnectionString.ACCOUNT_ENDPOINT_PROPERTY; -import static liquibase.ext.cosmosdb.database.CosmosConnectionString.ACCOUNT_KEY_PROPERTY; -import static liquibase.ext.cosmosdb.database.CosmosConnectionString.DATABASE_NAME_PROPERTY; -import static liquibase.ext.cosmosdb.database.CosmosConnectionString.fromConnectionString; +import static liquibase.ext.cosmosdb.database.CosmosConnectionString.*; @Getter @Setter @@ -136,6 +134,11 @@ public void open(final CosmosConnectionString cosmosConnectionString, final Driv } } + @Override + public boolean supports(String url) { + return !StringUtil.isEmpty(StringUtil.trimToNull(url)) && url.startsWith(COSMOSDB_PREFIX); + } + @Override public void close() throws DatabaseException { try { From db7ebdb6789fcdf99caee18eb88c1718dfb8c3fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Aug 2021 08:09:01 +0000 Subject: [PATCH 41/86] Bump mockito-core from 3.11.2 to 3.12.4 Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.2 to 3.12.4. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.4) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20b3f45..3115478 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 4.4.3 5.7.2 1.3.2 - 3.11.2 + 3.12.4 3.11.2 4.17.0 1.18.20 From ab390ea1cca6106cac8dcd87f01ccde55d48f0df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 08:10:59 +0000 Subject: [PATCH 42/86] Bump assertj-core from 3.20.2 to 3.21.0 Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.20.2 to 3.21.0. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.20.2...assertj-core-3.21.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20b3f45..74b64e5 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 4.17.0 1.18.20 1.3 - 3.20.2 + 3.21.0 mastercard_apache_license ${project.baseUri}/src/license 2021 From cfd6c4a8e229c1c8e68d9f29f19b846234e23fca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:09:51 +0000 Subject: [PATCH 43/86] Bump jupiter.version from 5.7.2 to 5.8.1 Bumps `jupiter.version` from 5.7.2 to 5.8.1. Updates `junit-jupiter-api` from 5.7.2 to 5.8.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.1) Updates `junit-jupiter-engine` from 5.7.2 to 5.8.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.1) Updates `junit-jupiter-params` from 5.7.2 to 5.8.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20b3f45..bb4dd31 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 2.22.2 2.22.2 4.4.3 - 5.7.2 + 5.8.1 1.3.2 3.11.2 3.11.2 From d905abd7b4e45844bab6bbd62e0e1242c2ce79c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 08:10:52 +0000 Subject: [PATCH 44/86] Bump jackson-databind from 2.12.4 to 2.13.0 Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.4 to 2.13.0. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20b3f45..61164e9 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ true 2.0.0 3.2.0 - 2.12.4 + 2.13.0 1.29 1.6.8 3.2.0 From d58d95ec2f84bd6ffa5d7e57ea24a08c1c11be55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 11:12:58 +0000 Subject: [PATCH 45/86] Bump mockito-junit-jupiter from 3.11.2 to 3.12.4 Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.11.2 to 3.12.4. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.4) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3115478..ce64ed9 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 5.7.2 1.3.2 3.12.4 - 3.11.2 + 3.12.4 4.17.0 1.18.20 1.3 From 44adb4a02e5fc9920aa5809a6d141a03d0acc465 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 11:15:36 +0000 Subject: [PATCH 46/86] Bump azure-cosmos from 4.17.0 to 4.19.1 Bumps [azure-cosmos](https://github.com/Azure/azure-sdk-for-java) from 4.17.0 to 4.19.1. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](https://github.com/Azure/azure-sdk-for-java/compare/azure-cosmos_4.17.0...azure-cosmos_4.19.1) --- updated-dependencies: - dependency-name: com.azure:azure-cosmos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3a9c1f5..26c1ad8 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 1.3.2 3.12.4 3.12.4 - 4.17.0 + 4.19.1 1.18.20 1.3 3.21.0 From 916867856d97485cc0d54f49ef8a207d45aa6f9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 16:48:17 +0000 Subject: [PATCH 47/86] Bump liquibase-core from 4.4.3 to 4.5.0 Bumps [liquibase-core](https://github.com/liquibase/liquibase) from 4.4.3 to 4.5.0. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.4.3...v4.5.0) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2823832..04f7207 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 4.4.3 + 4.5.0 5.8.1 1.3.2 3.12.4 From f6a5c4f0b9245c14ce4ed8a390c555d8c9881177 Mon Sep 17 00:00:00 2001 From: Mike Olivas <47544147+molivasdat@users.noreply.github.com> Date: Mon, 4 Oct 2021 11:51:55 -0500 Subject: [PATCH 48/86] Bump extension version from 4.4.3 to 4.5.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 04f7207..14a1999 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.4.4-SNAPSHOT + 4.5.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 1332567cce33c36983adc57ca5900ed4292b8175 Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 4 Oct 2021 16:56:51 +0000 Subject: [PATCH 49/86] Version Bumped to Snapshot for Developent --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 14a1999..7e93439 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.5.0 + 4.5.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From f8a4b1e00c68cd9c77192d8f2173c28091336256 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Oct 2021 08:10:12 +0000 Subject: [PATCH 50/86] Bump mockito-core from 3.12.4 to 4.0.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.4 to 4.0.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.4...v4.0.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e93439..2303672 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 4.5.0 5.8.1 1.3.2 - 3.12.4 + 4.0.0 3.12.4 4.19.1 1.18.20 From 36d9bab77be02e6b77a987b6b8c7eefc25abe0e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Oct 2021 08:08:41 +0000 Subject: [PATCH 51/86] Bump azure-cosmos from 4.19.1 to 4.20.1 Bumps [azure-cosmos](https://github.com/Azure/azure-sdk-for-java) from 4.19.1 to 4.20.1. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](https://github.com/Azure/azure-sdk-for-java/compare/azure-cosmos_4.19.1...azure-cosmos_4.20.1) --- updated-dependencies: - dependency-name: com.azure:azure-cosmos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e93439..aa315ac 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 1.3.2 3.12.4 3.12.4 - 4.19.1 + 4.20.1 1.18.20 1.3 3.21.0 From 627c3d60dcd6ae217adbd6ac9cf31a2b0e3a658d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Nov 2021 15:39:25 +0000 Subject: [PATCH 52/86] Bump lombok from 1.18.20 to 1.18.22 Bumps [lombok](https://github.com/projectlombok/lombok) from 1.18.20 to 1.18.22. - [Release notes](https://github.com/projectlombok/lombok/releases) - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.20...v1.18.22) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 39447df..5315fc4 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 4.0.0 3.12.4 4.20.1 - 1.18.20 + 1.18.22 1.3 3.21.0 mastercard_apache_license From 1a01a2b7a24b999696fa80d3bf6252ee6214711f Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 10 Nov 2021 09:35:45 -0600 Subject: [PATCH 53/86] Updated release automation - Use triggers vs. dependabot --- .github/add-comment-to-pull-request.sh | 26 --- .github/add-label-to-pull-request.sh | 26 --- .github/set-version-from-head.sh | 13 -- .github/set-version-from-pom.sh | 6 - .github/workflows/create-release.yml | 192 ++++++++++++++++++ .../workflows/pull-request-labeled-closed.yml | 126 ------------ .../pull-request-labeled-release.yml | 33 --- .github/workflows/pull-request.yml | 61 ------ 8 files changed, 192 insertions(+), 291 deletions(-) delete mode 100755 .github/add-comment-to-pull-request.sh delete mode 100755 .github/add-label-to-pull-request.sh delete mode 100755 .github/set-version-from-head.sh delete mode 100755 .github/set-version-from-pom.sh create mode 100644 .github/workflows/create-release.yml delete mode 100644 .github/workflows/pull-request-labeled-closed.yml delete mode 100644 .github/workflows/pull-request-labeled-release.yml diff --git a/.github/add-comment-to-pull-request.sh b/.github/add-comment-to-pull-request.sh deleted file mode 100755 index a562524..0000000 --- a/.github/add-comment-to-pull-request.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -ex -set -o pipefail - -if [[ -z "$GITHUB_TOKEN" ]]; then - echo "Set the GITHUB_TOKEN env variable." - exit 1 -fi - -if [[ -z "$GITHUB_ISSUE_URL" ]]; then - echo "Set the GITHUB_ISSUE_URL env variable." - exit 1 -fi - -if [[ -z "$GITHUB_COMMENT" ]]; then - echo "Set the GITHUB_COMMENT env variable." - exit 1 -fi - -data='{"body":"'${GITHUB_COMMENT}'"}' - -#Create Label on Pull Request -curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ - --data "$data" \ - "$GITHUB_ISSUE_URL/comments" diff --git a/.github/add-label-to-pull-request.sh b/.github/add-label-to-pull-request.sh deleted file mode 100755 index ecd564f..0000000 --- a/.github/add-label-to-pull-request.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -if [[ -z "$GITHUB_TOKEN" ]]; then - echo "Set the GITHUB_TOKEN env variable." - exit 1 -fi - -if [[ -z "$GITHUB_ISSUE_URL" ]]; then - echo "Set the GITHUB_ISSUE_URL env variable." - exit 1 -fi - -if [[ -z "$GITHUB_LABEL" ]]; then - echo "Set the GITHUB_LABEL env variable." - exit 1 -fi - -data='["'${GITHUB_LABEL}'"]' - -#Create Label on Pull Request -curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ - --data "$data" \ - "$GITHUB_ISSUE_URL/labels" diff --git a/.github/set-version-from-head.sh b/.github/set-version-from-head.sh deleted file mode 100755 index 29fb0f5..0000000 --- a/.github/set-version-from-head.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -HEAD_REF=$1 - -if [[ -z "$HEAD_REF" ]]; then - echo "Set the HEAD_REF parameter" - exit 1 -fi - -echo "VERSION_TAG=${HEAD_REF#*org.liquibase-liquibase-core-}" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/set-version-from-pom.sh b/.github/set-version-from-pom.sh deleted file mode 100755 index 535e1fc..0000000 --- a/.github/set-version-from-pom.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -echo "VERSION_TAG=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..7b7ce13 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,192 @@ +name: Release Extension (v2) +on: + repository_dispatch: + types: [liquibase-release] + workflow_dispatch: + inputs: + liquibaseVersion: + description: 'Liquibase Version' + required: true + extensionVersion: + description: 'Extension Version (Defaults to Liquibase Version)' + required: false + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + outputs: + liquibaseVersion: ${{ steps.collect-data.outputs.liquibaseVersion }} + extensionVersion: ${{ steps.collect-data.outputs.extensionVersion }} + steps: + - name: Collect Data + id: collect-data + uses: actions/github-script@v4 + with: + script: | + if (context.payload.client_payload) { + core.setOutput("liquibaseVersion", context.payload.client_payload.liquibaseVersion); + core.setOutput("extensionVersion", context.payload.client_payload.liquibaseVersion); + } else if (context.payload.inputs) { + core.setOutput("liquibaseVersion", context.payload.inputs.liquibaseVersion); + core.setOutput("extensionVersion", context.payload.inputs.extensionVersion || context.payload.inputs.liquibaseVersion); + } else { + core.setFailed('Unknown event type') + } + + - run: | + echo "Saw Liquibase version ${{ steps.collect-data.outputs.liquibaseVersion }}" + echo "Saw Extension version ${{ steps.collect-data.outputs.extensionVersion }}" + + build: + name: "Build and Test" + runs-on: ubuntu-latest + needs: setup + outputs: + releaseSha: ${{ steps.get-release-sha.outputs.releaseSha }} + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 # otherwise, you will fail to push refs to dest repo + + - name: Cache Built Code + uses: actions/cache@v2 + with: + key: built-code-${{ github.run_id }} + path: ./**/target + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + + - name: Configure git user + run: | + git config user.name "liquibot" + git config user.email "liquibot@liquibase.org" + + - name: Download and install liquibase.jar + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: "liquibase/liquibase" + version: "tags/v${{ needs.setup.outputs.liquibaseVersion }}" + file: "liquibase-${{ needs.setup.outputs.liquibaseVersion }}.jar" + target: "liquibase.jar" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install liquibase.jar + run: mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=liquibase.jar + + - name: Update pom.xml with release versions and commit changes + run: | + mvn -B versions:set -DnewVersion=${{ needs.setup.outputs.extensionVersion }} -DallowSnapshots=false -DoldVersion="*" + mvn -B versions:use-dep-version -Dincludes=org.liquibase:liquibase-core -DdepVersion=${{ needs.setup.outputs.liquibaseVersion }} -DforceVersion=true + + if git diff-index --cached --quiet HEAD -- + then + echo "Nothing new to commit" + else + git add pom.xml + git commit -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" + fi + git tag -a -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" liquibase-cosmosdb-${{ needs.setup.outputs.extensionVersion }} + git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.ref }} --follow-tags --tags + + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + + - name: Get release SHA + id: get-release-sha + run: echo ::set-output name=releaseSha::$(git rev-parse HEAD) + + + - name: Build and Unit Test + run: mvn -B clean test package + + - name: Archive Test Results + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: test-reports-jdk + path: ./**/target/surefire-reports + + - name: Save Artifacts + uses: actions/upload-artifact@v2 + with: + name: liquibase-cosmosdb + path: | + target/*.jar + + integration-tests: + name: Java ${{ matrix.java }} + runs-on: ubuntu-latest + needs: build + strategy: + matrix: + java: [8, 11, 17] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'adopt' + - name: Test With Maven + run: mvn clean verify --file pom.xml + + draft-release: + needs: [ setup, build, integration-tests ] + name: Draft Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: liquibase-cosmosdb + + - name: Release + uses: softprops/action-gh-release@v1 + with: + target_commitish: ${{ needs.build.outputs.releaseSha }} + name: v${{ needs.setup.outputs.extensionVersion }} + tag_name: liquibase-cosmosdb-${{ needs.setup.outputs.extensionVersion }} + draft: true + body: Support for Liquibase ${{ needs.setup.outputs.liquibaseVersion }}. + files: liquibase-cosmosdb-*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + bump-pom-to-snapshot: + name: Prepare POM for Development + runs-on: ubuntu-latest + needs: [ draft-release ] + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + + - name: Configure git user + run: | + git config user.name "liquibot" + git config user.email "liquibot@liquibase.org" + + - name: Prepare code for next version + run: | + git pull + mvn -B versions:set -DnextSnapshot=true + git add pom.xml + git commit -m "Version Bumped to Snapshot for Development" + git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.ref }} --follow-tags --tags + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/pull-request-labeled-closed.yml b/.github/workflows/pull-request-labeled-closed.yml deleted file mode 100644 index c86f52b..0000000 --- a/.github/workflows/pull-request-labeled-closed.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Prepare Release Candidate for Release - -on: - pull_request: - types: - - closed - -jobs: - build: - name: Build Artifact - runs-on: ubuntu-latest - if: github.ref == 'main'&& github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) - steps: - - uses: actions/checkout@v2 - - name: Cache Local Maven Repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - server-id: sonatype-nexus-staging - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.GPG_SECRET }} - gpg-passphrase: GPG_PASSPHRASE - - - name: Build With Maven - run: mvn clean install -Dmaven.test.skip - env: - MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: liquibase-cosmosdb - path: target/*.jar - - draft-release: - needs: [ build ] - name: Draft Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Cache Local Maven Repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - - name: Set Version Tag ENV from POM - run: ./.github/set-version-from-pom.sh - - - run: echo ::set-output name=version::$VERSION_TAG - id: version - - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: liquibase-cosmosdb - - - name: Release - uses: softprops/action-gh-release@v1 - with: - target_commitish: ${{ github.sha }} - name: v${{ steps.version.outputs.version }} - tag_name: liquibase-cosmosdb-${{ steps.version.outputs.version }} - draft: true - body: Support for Liquibase ${{ steps.version.outputs.version }}. - files: liquibase-cosmosdb-*.jar - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - bump-pom-to-snapshot: - name: Prepare POM for Development - runs-on: ubuntu-latest - needs: [ draft-release ] - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - - name: Cache Local Maven Repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - - name: Configure git user - run: | - git config user.name "liquibot" - git config user.email "liquibot@liquibase.org" - - - name: Bump POM Version for Development - run: | - mvn versions:set -DnextSnapshot=true - git add pom.xml - git commit -m "Version Bumped to Snapshot for Developent" - git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.base_ref }} --follow-tags --tags - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pull-request-labeled-release.yml b/.github/workflows/pull-request-labeled-release.yml deleted file mode 100644 index 602a2a5..0000000 --- a/.github/workflows/pull-request-labeled-release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build, Test, and Prepare Release Candidate - -on: - pull_request: - types: - - labeled - - reopened - - synchronize - -jobs: - integration-tests: - name: Java ${{ matrix.java }} - runs-on: ubuntu-latest - if: contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) - strategy: - matrix: - java: [8, 11, 16] - steps: - - uses: actions/checkout@v2 - - name: Cache Local Maven Repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java }} - distribution: 'adopt' - - name: Test With Maven - run: mvn clean verify --file pom.xml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 858f76a..a072142 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -11,8 +11,6 @@ jobs: unit-test: name: Java ${{ matrix.java }} runs-on: ubuntu-latest - # Only run job if untagged as release. Will run for all PRs and release PRs during the first run. - if: ${{ !contains( github.event.pull_request.labels.*.name, 'Extension Release Candidate :rocket:' ) }} strategy: matrix: java: [8, 11, 16] @@ -33,62 +31,3 @@ jobs: distribution: 'adopt' - name: Run Unit Tests With Maven run: mvn surefire:test --file pom.xml - - # This step is the automation to create a release based on a liquibase core bump - # If a manual release is required, the steps below will need to be done manually prior - # to adding the Release Candidate label. - label: - name: Label as Release Candidate - runs-on: ubuntu-latest - needs: [ unit-test ] - if: contains( github.event.pull_request.head.ref, 'dependabot/maven/org.liquibase-liquibase-core' ) - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - - name: Cache Local Maven Repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - - name: Set Version Tag ENV - run: ./.github/set-version-from-head.sh ${{ github.event.pull_request.head.ref }} - - - run: echo $VERSION_TAG - - - name: Configure git user - run: | - git config user.name "liquibot" - git config user.email "liquibot@liquibase.org" - - - name: Bump POM Version for Next Release - run: | - mvn versions:set -DnewVersion=$VERSION_TAG - git add pom.xml - git commit -m "Version Bumped to $VERSION_TAG" - git tag -a -m "Version Bumped to $VERSION_TAG" liquibase-cosmosdb-$VERSION_TAG - git push "https://liquibot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ github.event.pull_request.head.ref }} --follow-tags --tags - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - - - run: ./.github/add-label-to-pull-request.sh - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - GITHUB_ISSUE_URL: ${{ github.event.pull_request._links.issue.href }} - GITHUB_LABEL: "Extension Release Candidate :rocket:" - - run: ./.github/add-comment-to-pull-request.sh - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - GITHUB_ISSUE_URL: ${{ github.event.pull_request._links.issue.href }} - GITHUB_COMMENT: "

⚠️ Reminder

Release Candidate pull requests will automatically release when merged.

Please review and merge all other pull requests prior to merging this request." \ No newline at end of file From 4ed9ee50ba843bf0116b6006bd3cbef7644becf6 Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 10 Nov 2021 15:39:44 +0000 Subject: [PATCH 54/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5315fc4..7859979 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.5.1-SNAPSHOT + 4.5.2-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 9652b7abfd6953b1a755225f1600ea1944e49057 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 10 Nov 2021 15:48:28 -0600 Subject: [PATCH 55/86] Updated release automation - Use triggers vs. dependabot --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7b7ce13..844690f 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -84,11 +84,11 @@ jobs: mvn -B versions:set -DnewVersion=${{ needs.setup.outputs.extensionVersion }} -DallowSnapshots=false -DoldVersion="*" mvn -B versions:use-dep-version -Dincludes=org.liquibase:liquibase-core -DdepVersion=${{ needs.setup.outputs.liquibaseVersion }} -DforceVersion=true + git add pom.xml if git diff-index --cached --quiet HEAD -- then echo "Nothing new to commit" else - git add pom.xml git commit -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" fi git tag -a -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" liquibase-cosmosdb-${{ needs.setup.outputs.extensionVersion }} From 54c3a4d667414ddf408a672bbe1bfcefa5ad2745 Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 10 Nov 2021 21:50:20 +0000 Subject: [PATCH 56/86] Version Bumped to 4.6.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7859979..0763de8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.5.2-SNAPSHOT + 4.6.1 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 4014247fbddd00d533bfc9280817d5997547255c Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 10 Nov 2021 21:52:18 +0000 Subject: [PATCH 57/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0763de8..8861779 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.1 + 4.6.2-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From a38b2a494539d7bf7248525b468839da6a1ea85c Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 10 Nov 2021 16:00:12 -0600 Subject: [PATCH 58/86] Updated release automation - Use triggers vs. dependabot --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8861779..2bb79f8 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,6 @@ UTF-8 2.22.2 2.22.2 - 4.5.0 5.8.1 1.3.2 4.0.0 @@ -65,7 +64,7 @@ org.liquibase liquibase-core - ${liquibase.version} + 4.5.0 provided From d7c5e522f74e739e258d783677c41d99e308d4d1 Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 10 Nov 2021 22:01:31 +0000 Subject: [PATCH 59/86] Version Bumped to 4.6.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2bb79f8..291009e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.2-SNAPSHOT + 4.6.1 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.5.0 + 4.6.1 provided From de635457173a8fb094fed3fe39e9a1969af827e6 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 10 Nov 2021 16:12:40 -0600 Subject: [PATCH 60/86] Locally handle FilenameUtil code removed from liquibase.util --- .../liquibase/ext/cosmosdb/TestUtils.java | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/test/java/liquibase/ext/cosmosdb/TestUtils.java b/src/test/java/liquibase/ext/cosmosdb/TestUtils.java index f5f5097..b869be3 100644 --- a/src/test/java/liquibase/ext/cosmosdb/TestUtils.java +++ b/src/test/java/liquibase/ext/cosmosdb/TestUtils.java @@ -28,7 +28,6 @@ import liquibase.parser.ChangeLogParser; import liquibase.parser.ChangeLogParserFactory; import liquibase.resource.ClassLoaderResourceAccessor; -import liquibase.util.file.FilenameUtils; import lombok.NoArgsConstructor; import lombok.SneakyThrows; @@ -59,10 +58,40 @@ public static Properties loadProperties(final String propertyFile) { public static List getChangeSets(final String changeSetPath, final CosmosLiquibaseDatabase database) throws LiquibaseException { final ClassLoaderResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor(); final ChangeLogParser parser = - ChangeLogParserFactory.getInstance().getParser(FilenameUtils.getExtension(changeSetPath), resourceAccessor); + ChangeLogParserFactory.getInstance().getParser(getExtension(changeSetPath), resourceAccessor); final DatabaseChangeLog changeLog = parser.parse(changeSetPath, new ChangeLogParameters(database), resourceAccessor); return changeLog.getChangeSets(); } + + public static String getExtension(String filename) { + if (filename == null) { + return null; + } + int index = indexOfExtension(filename); + if (index == -1) { + return ""; + } else { + return filename.substring(index + 1); + } + } + + public static int indexOfExtension(String filename) { + if (filename == null) { + return -1; + } + int extensionPos = filename.lastIndexOf("."); + int lastSeparator = indexOfLastSeparator(filename); + return ((lastSeparator > extensionPos) ? -1 : extensionPos); + } + + public static int indexOfLastSeparator(String filename) { + if (filename == null) { + return -1; + } + int lastUnixPos = filename.lastIndexOf('/'); + int lastWindowsPos = filename.lastIndexOf('/'); + return Math.max(lastUnixPos, lastWindowsPos); + } } From 7f6e2c2e41c58847a1f68559ea33216abe599244 Mon Sep 17 00:00:00 2001 From: liquibot Date: Wed, 10 Nov 2021 22:22:19 +0000 Subject: [PATCH 61/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 291009e..279a363 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.1 + 4.6.2-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 59dbf2cd2754a2048f170b30f6d7b5f70ce92b70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 08:14:29 +0000 Subject: [PATCH 62/86] Bump jupiter.version from 5.8.1 to 5.8.2 Bumps `jupiter.version` from 5.8.1 to 5.8.2. Updates `junit-jupiter-api` from 5.8.1 to 5.8.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) Updates `junit-jupiter-engine` from 5.8.1 to 5.8.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) Updates `junit-jupiter-params` from 5.8.1 to 5.8.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 279a363..0aac3e4 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ UTF-8 2.22.2 2.22.2 - 5.8.1 + 5.8.2 1.3.2 4.0.0 3.12.4 From fbf589a5772ac049e3658316c30292761f686c5e Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 1 Dec 2021 19:29:54 -0600 Subject: [PATCH 63/86] Don't auto-release after close --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 279a363..5b1adba 100644 --- a/pom.xml +++ b/pom.xml @@ -227,7 +227,6 @@ sonatype-nexus-staging https://oss.sonatype.org/ - true
From 28ce050969d45277e7257655bcb8fe34c4120e57 Mon Sep 17 00:00:00 2001 From: liquibot Date: Thu, 2 Dec 2021 01:45:05 +0000 Subject: [PATCH 64/86] Version Bumped to 4.6.2 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5b1adba..3492ba2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.2-SNAPSHOT + 4.6.2 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.6.1 + 4.6.2 provided From 1e276fc12b127deebb49c34651706f0f4fa6be14 Mon Sep 17 00:00:00 2001 From: liquibot Date: Thu, 2 Dec 2021 01:48:05 +0000 Subject: [PATCH 65/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3492ba2..85d5edc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.2 + 4.6.3-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 2d95d86fc045c78379dddff998051ec5d9598859 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Dec 2021 08:14:12 +0000 Subject: [PATCH 66/86] Bump snakeyaml from 1.29 to 1.30 Bumps [snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 1.29 to 1.30. - [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-1.30..snakeyaml-1.29) --- updated-dependencies: - dependency-name: org.yaml:snakeyaml dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85d5edc..93b64b9 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ 2.0.0 3.2.0 2.13.0 - 1.29 + 1.30 1.6.8 3.2.0 2.5.3 From 00f68387a7da9b55b377da7c596812e06ebc15cb Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 22 Dec 2021 03:46:45 +0000 Subject: [PATCH 67/86] fix: upgrade com.azure:azure-cosmos from 4.20.1 to 4.21.1 Snyk has created this PR to upgrade com.azure:azure-cosmos from 4.20.1 to 4.21.1. See this package in Maven Repository: https://mvnrepository.com/artifact/com.azure/azure-cosmos/ See this project in Snyk: https://app.snyk.io/org/datical/project/2b48aa22-16b9-4c4c-bcb1-4dd057122bf1?utm_source=github&utm_medium=referral&page=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85d5edc..59a2d37 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 1.3.2 4.0.0 3.12.4 - 4.20.1 + 4.21.1 1.18.22 1.3 3.21.0 From 5509ae33eb0bb49e1e36c24769e820ed8a76f065 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 08:13:05 +0000 Subject: [PATCH 68/86] Bump assertj-core from 3.21.0 to 3.22.0 Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.21.0 to 3.22.0. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.21.0...assertj-core-3.22.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85d5edc..b95f240 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 4.20.1 1.18.22 1.3 - 3.21.0 + 3.22.0 mastercard_apache_license ${project.baseUri}/src/license 2021 From 87388fe4ab7b1a183da14e90e02b3720b646ce40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 08:14:27 +0000 Subject: [PATCH 69/86] Bump build-helper-maven-plugin from 3.2.0 to 3.3.0 Bumps [build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases) - [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/build-helper-maven-plugin-3.2.0...build-helper-maven-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:build-helper-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85d5edc..7b128b8 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 From 4c8bc3026b6ed32c745a46657ee08ccbc48257ac Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 10 Jan 2022 21:01:40 +0000 Subject: [PATCH 70/86] Version Bumped to 4.7.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 85d5edc..a5b99a6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.6.3-SNAPSHOT + 4.7.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.6.2 + 4.7.0 provided From 22b2d0a5387e89d5a2a91bbfe6b542f9673239e1 Mon Sep 17 00:00:00 2001 From: liquibot Date: Mon, 10 Jan 2022 21:03:38 +0000 Subject: [PATCH 71/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5b99a6..3900000 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.7.0 + 4.7.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 0503a88a046f6d8f5bdd6aeac61fd416d268811a Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 21 Jan 2022 19:36:27 +0000 Subject: [PATCH 72/86] Version Bumped to 4.7.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3900000..919b7b0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.7.1-SNAPSHOT + 4.7.1 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.7.0 + 4.7.1 provided From 34b8391597cc199b03fb15a21bd0eac9a53274b3 Mon Sep 17 00:00:00 2001 From: liquibot Date: Fri, 21 Jan 2022 19:38:28 +0000 Subject: [PATCH 73/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 919b7b0..a9f96da 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.7.1 + 4.7.2-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 9954b228a02ec175c044409a9d84702ee06d4554 Mon Sep 17 00:00:00 2001 From: Mike Olivas <47544147+molivasdat@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:37:51 -0600 Subject: [PATCH 74/86] Removed Mongo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1311c1..f3a5a0c 100644 --- a/README.md +++ b/README.md @@ -174,12 +174,12 @@ cosmosdb://{"accountEndpoint" : "https://localhost:8080", "databaseName" : "testdb1"} ``` -#### Mongo URL like after the prefix +#### CosmosDB URL like after the prefix ```url cosmosdb://[host]:[accountKey]@[host]:[port]/[databaseName]?[Query Parameters] ``` -so a mongo like url looks like: +so a CosmosDB like url looks like: ```url cosmosdb://localhost:C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==@localhost:8080/testdb1 ``` From 4d53d15df8f341e6a5760b0b102180ea4d9fdb93 Mon Sep 17 00:00:00 2001 From: liquibot Date: Tue, 22 Feb 2022 17:45:59 +0000 Subject: [PATCH 75/86] Version Bumped to 4.8.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a9f96da..1e1f08a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.7.2-SNAPSHOT + 4.8.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.7.1 + 4.8.0 provided From 6505bf909b00fa498733a11e242c20dd0319d9bc Mon Sep 17 00:00:00 2001 From: liquibot Date: Tue, 22 Feb 2022 17:47:54 +0000 Subject: [PATCH 76/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e1f08a..e003e6a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.8.0 + 4.8.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From 12593e53ed3e166407505d487e1088c3f525cdc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 08:11:11 +0000 Subject: [PATCH 77/86] Bump nexus-staging-maven-plugin from 1.6.8 to 1.6.12 Bumps nexus-staging-maven-plugin from 1.6.8 to 1.6.12. --- updated-dependencies: - dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e003e6a..531c147 100644 --- a/pom.xml +++ b/pom.xml @@ -222,7 +222,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true sonatype-nexus-staging From 9e6ca1d01e87bac72e3ebe08b1ce828788f3552e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Mar 2022 08:17:33 +0000 Subject: [PATCH 78/86] Bump mockito-core from 4.0.0 to 4.4.0 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.0.0 to 4.4.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.4.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e003e6a..d0760f2 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 2.22.2 5.8.1 1.3.2 - 4.0.0 + 4.4.0 3.12.4 4.20.1 1.18.22 From 824752d87c5b6b0c083ced9ec396859934133aaa Mon Sep 17 00:00:00 2001 From: liquibot Date: Thu, 17 Mar 2022 19:19:37 +0000 Subject: [PATCH 79/86] Version Bumped to 4.9.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e003e6a..882f532 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.8.1-SNAPSHOT + 4.9.0 Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org @@ -64,7 +64,7 @@ org.liquibase liquibase-core - 4.8.0 + 4.9.0 provided From a2ac0e3e1014d348b5859f9df2987080e16ec7df Mon Sep 17 00:00:00 2001 From: liquibot Date: Thu, 17 Mar 2022 19:21:28 +0000 Subject: [PATCH 80/86] Version Bumped to Snapshot for Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 882f532..9b5ce39 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.liquibase.ext liquibase-cosmosdb jar - 4.9.0 + 4.9.1-SNAPSHOT Liquibase Cosmos DB Core (SQL) API Extension Liquibase extension for Cosmos DB via Core (SQL) API http://www.liquibase.org From fd03a6584099abe12f203a8c5f7e42eb3e8b5c86 Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Fri, 25 Mar 2022 17:18:47 -0500 Subject: [PATCH 81/86] Updates for tracking collection --- .../cosmosdb/changelog/CosmosHistoryService.java | 15 +++++++++++++-- .../changelog/AbstractNoSqlHistoryService.java | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java index ca23bd4..ff249be 100644 --- a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java +++ b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java @@ -31,11 +31,14 @@ import liquibase.ext.cosmosdb.statement.CountContainersByNameStatement; import liquibase.ext.cosmosdb.statement.CountDocumentsInContainerStatement; import liquibase.ext.cosmosdb.statement.DeleteContainerStatement; +import liquibase.ext.cosmosdb.statement.DeleteEachItemStatement; import liquibase.logging.Logger; import liquibase.nosql.changelog.AbstractNoSqlHistoryService; import liquibase.nosql.executor.NoSqlExecutor; import liquibase.util.StringUtil; +import com.azure.cosmos.models.SqlQuerySpec; + import java.util.List; import java.util.stream.Collectors; @@ -124,11 +127,19 @@ public String extractTag(final ChangeSet changeSet) { @Override protected void removeRanChangeSet(final ChangeSet changeSet) throws DatabaseException { - //TODO: Implement + /*String jsonQuery = "{\n" + + "\"query\" : \"SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\"\"" + + "}"; + */ + String query = "SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\""; + SqlQuerySpec querySpec = new SqlQuerySpec(query); + getExecutor().execute( + new DeleteEachItemStatement(getDatabaseChangeLogTableName(), + querySpec)); } @Override - protected void clearChekSums() throws DatabaseException { + protected void clearCheckSums() throws DatabaseException { //TODO: Implement } diff --git a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java index e0bdda4..61f6e2f 100644 --- a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java +++ b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java @@ -244,7 +244,7 @@ public boolean tagExists(final String tag) throws DatabaseException { public void clearAllCheckSums() throws DatabaseException { getLogger().info("Clear all checksums"); - clearChekSums(); + clearCheckSums(); getLogger().info("Clear all checksums executed"); } @@ -285,7 +285,7 @@ public void destroy() { protected abstract void removeRanChangeSet(ChangeSet changeSet) throws DatabaseException; - protected abstract void clearChekSums() throws DatabaseException; + protected abstract void clearCheckSums() throws DatabaseException; protected abstract long countTags(String tag) throws DatabaseException; From ba7025951ca24295d20e441b5176d60eb74ec3c4 Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Fri, 25 Mar 2022 18:42:40 -0500 Subject: [PATCH 82/86] Added clearChecksums --- .../changelog/CosmosHistoryService.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java index ff249be..04d081e 100644 --- a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java +++ b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java @@ -24,6 +24,7 @@ import liquibase.change.Change; import liquibase.change.core.TagDatabaseChange; import liquibase.changelog.ChangeSet; +import liquibase.ext.cosmosdb.changelog.CosmosRanChangeSet; import liquibase.changelog.RanChangeSet; import liquibase.database.Database; import liquibase.exception.DatabaseException; @@ -32,11 +33,13 @@ import liquibase.ext.cosmosdb.statement.CountDocumentsInContainerStatement; import liquibase.ext.cosmosdb.statement.DeleteContainerStatement; import liquibase.ext.cosmosdb.statement.DeleteEachItemStatement; +import liquibase.ext.cosmosdb.statement.UpdateEachItemStatement; import liquibase.logging.Logger; import liquibase.nosql.changelog.AbstractNoSqlHistoryService; import liquibase.nosql.executor.NoSqlExecutor; import liquibase.util.StringUtil; +import com.azure.cosmos.implementation.Document; import com.azure.cosmos.models.SqlQuerySpec; import java.util.List; @@ -127,10 +130,6 @@ public String extractTag(final ChangeSet changeSet) { @Override protected void removeRanChangeSet(final ChangeSet changeSet) throws DatabaseException { - /*String jsonQuery = "{\n" + - "\"query\" : \"SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\"\"" + - "}"; - */ String query = "SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\""; SqlQuerySpec querySpec = new SqlQuerySpec(query); getExecutor().execute( @@ -141,6 +140,17 @@ protected void removeRanChangeSet(final ChangeSet changeSet) throws DatabaseExce @Override protected void clearCheckSums() throws DatabaseException { //TODO: Implement + String query = "SELECT * FROM c"; + //Nullify each md5sum field + String docString = "{\n" + + "\"" + CosmosRanChangeSet.Fields.LAST_CHECK_SUM + "\"" + " : null\n" + + "}"; + Document doc = new Document(docString); + SqlQuerySpec querySpec = new SqlQuerySpec(query); + getExecutor().execute( + new UpdateEachItemStatement(getDatabaseChangeLogTableName(), + querySpec, + doc)); } @Override From 3c334bf7bfbb25a853f3aa1234a9fc1b47884dee Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Tue, 29 Mar 2022 12:54:19 -0500 Subject: [PATCH 83/86] Added checksum logic, tags and logging --- .../changelog/CosmosHistoryService.java | 39 ++++++++++++++++--- .../AbstractNoSqlHistoryService.java | 1 + 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java index 04d081e..1f80fa9 100644 --- a/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java +++ b/src/main/java/liquibase/ext/cosmosdb/changelog/CosmosHistoryService.java @@ -63,17 +63,20 @@ protected Logger getLogger() { @Override public boolean supports(final Database database) { + getLogger().fine("Entering: " + getClass().getSimpleName() + " supports()"); return CosmosLiquibaseDatabase.COSMOSDB_PRODUCT_NAME.equals(database.getDatabaseProductName()); } @Override protected Boolean existsRepository() throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " existsRepository()"); return getExecutor().queryForLong( new CountContainersByNameStatement(this.getDatabaseChangeLogTableName())) == 1L; } @Override protected void createRepository() throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " createRepository()"); final CreateChangeLogContainerStatement createChangeLogContainerStatement = new CreateChangeLogContainerStatement(this.getDatabaseChangeLogTableName()); getExecutor().execute(createChangeLogContainerStatement); @@ -87,26 +90,28 @@ protected void adjustRepository() throws DatabaseException { @Override protected void dropRepository() throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " dropRepository()"); getExecutor().execute( new DeleteContainerStatement(getDatabaseChangeLogTableName())); } @Override protected List queryRanChangeSets() throws DatabaseException { - + getLogger().fine("Entering: " + getClass().getSimpleName() + " queryRanChangeSets()"); return getExecutor().queryForList(new SelectChangeLogRanChangeSetsStatement(getDatabaseChangeLogTableName()), RanChangeSet.class) .stream().map(RanChangeSet.class::cast).collect(Collectors.toList()); } @Override protected Integer generateNextSequence() throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " generateNextSequence()"); return (int) getExecutor().queryForLong(new GetNextChangeSetSequenceValueStatement(getDatabaseChangeLogTableName())); } @Override protected void markChangeSetRun(final ChangeSet changeSet, final ChangeSet.ExecType execType, final Integer nextSequenceValue) throws DatabaseException { - + getLogger().fine("Entering: " + getClass().getSimpleName() + " markChangeSetRun(cs,et,nxtseq)"); final NoSqlExecutor executor = getExecutor(); final MarkChangeSetRanStatement markChangeSetRanStatement = @@ -118,6 +123,7 @@ protected void markChangeSetRun(final ChangeSet changeSet, final ChangeSet.ExecT //TODO: Raise with Liquibase to make it as part of ChangeSet class public String extractTag(final ChangeSet changeSet) { + getLogger().fine("Entering: " + getClass().getSimpleName() + " extractTag(changeSet)"); String tag = null; for (Change change : changeSet.getChanges()) { if (change instanceof TagDatabaseChange) { @@ -130,6 +136,7 @@ public String extractTag(final ChangeSet changeSet) { @Override protected void removeRanChangeSet(final ChangeSet changeSet) throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " removeRanChangeSet(changeSet)"); String query = "SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\""; SqlQuerySpec querySpec = new SqlQuerySpec(query); getExecutor().execute( @@ -139,7 +146,7 @@ protected void removeRanChangeSet(final ChangeSet changeSet) throws DatabaseExce @Override protected void clearCheckSums() throws DatabaseException { - //TODO: Implement + getLogger().fine("Entering: " + getClass().getSimpleName() + " clearCheckSums()"); String query = "SELECT * FROM c"; //Nullify each md5sum field String docString = "{\n" + @@ -155,22 +162,44 @@ protected void clearCheckSums() throws DatabaseException { @Override protected long countTags(final String tag) throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " countTags(tag)"); //TODO: Implement return 0; } @Override protected void tagLast(final String tagString) throws DatabaseException { - //TODO: Implement + getLogger().fine("Entering: " + getClass().getSimpleName() + " tagLast(tag)"); + String query = "SELECT TOP 1 * FROM c order by c.dateExecuted DESC"; + SqlQuerySpec querySpec = new SqlQuerySpec(query); + String docString = "{\n" + + "\"" + CosmosRanChangeSet.Fields.TAG + "\"" + " : \"" + tagString + "\"\n" + + "}"; + Document doc = new Document(docString); + getExecutor().execute( + new UpdateEachItemStatement(getDatabaseChangeLogTableName(), + querySpec, + doc)); } @Override protected long countRanChangeSets() throws DatabaseException { + getLogger().fine("Entering: " + getClass().getSimpleName() + " countRanChangeSets()"); return getExecutor().queryForLong(new CountDocumentsInContainerStatement(getDatabaseChangeLogTableName())); } @Override protected void updateCheckSum(final ChangeSet changeSet) throws DatabaseException { - //TODO: Implement + getLogger().fine("Entering: " + getClass().getSimpleName() + " updateCheckSum(changeSet)"); + String query = "SELECT * FROM c where c.author=\"" + changeSet.getAuthor() + "\" and c.changeSetId=\""+ changeSet.getId()+ "\" and c.fileName=\""+ changeSet.getFilePath() + "\""; + SqlQuerySpec querySpec = new SqlQuerySpec(query); + String docString = "{\n" + + "\"" + CosmosRanChangeSet.Fields.LAST_CHECK_SUM + "\"" + " : \"" + changeSet.generateCheckSum() + "\"\n" + + "}"; + Document doc = new Document(docString); + getExecutor().execute( + new UpdateEachItemStatement(getDatabaseChangeLogTableName(), + querySpec, + doc)); } } diff --git a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java index 61f6e2f..99e1717 100644 --- a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java +++ b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java @@ -213,6 +213,7 @@ public int getNextSequenceValue() throws DatabaseException { */ @Override public void tag(final String tagString) throws DatabaseException { + getLogger().fine(getClass().getSimpleName() + " tag Method: with tagString: " + tagString); final long totalRows = countRanChangeSets(); if (totalRows == 0L) { final ChangeSet emptyChangeSet = new ChangeSet(String.valueOf(new Date().getTime()), "liquibase", From 6b9fff4c2bc6fd690e7c09e40dc8a3b95e14a6c5 Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Tue, 29 Mar 2022 16:08:19 -0500 Subject: [PATCH 84/86] fix test runs --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 539de88..cc1b074 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,9 @@ 1.8 1.8 + 3.8.1 + 3.2.0 + 1.4.1 UTF-8 2.22.2 2.22.2 @@ -140,6 +143,7 @@ maven-resources-plugin + ${maven-resources-plugin.version} UTF-8 @@ -147,6 +151,7 @@ maven-compiler-plugin + ${maven-compiler-plugin.version} 1.8 1.8 @@ -158,6 +163,7 @@ maven-surefire-plugin + ${maven-surefire-plugin.version} false true From de875f58e6162039b53ad5ab5b6b6df3985dba79 Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Tue, 29 Mar 2022 16:23:40 -0500 Subject: [PATCH 85/86] Revert "fix test runs" This reverts commit 6b9fff4c2bc6fd690e7c09e40dc8a3b95e14a6c5. --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index cc1b074..539de88 100644 --- a/pom.xml +++ b/pom.xml @@ -34,9 +34,6 @@ 1.8 1.8 - 3.8.1 - 3.2.0 - 1.4.1 UTF-8 2.22.2 2.22.2 @@ -143,7 +140,6 @@ maven-resources-plugin - ${maven-resources-plugin.version} UTF-8 @@ -151,7 +147,6 @@ maven-compiler-plugin - ${maven-compiler-plugin.version} 1.8 1.8 @@ -163,7 +158,6 @@ maven-surefire-plugin - ${maven-surefire-plugin.version} false true From 504e18695036ba892fdbe00c8419714e3e6c8386 Mon Sep 17 00:00:00 2001 From: Mike Olivas Date: Tue, 29 Mar 2022 16:27:34 -0500 Subject: [PATCH 86/86] Fixed surefire tests to actually run --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 539de88..cc1b074 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,9 @@ 1.8 1.8 + 3.8.1 + 3.2.0 + 1.4.1 UTF-8 2.22.2 2.22.2 @@ -140,6 +143,7 @@ maven-resources-plugin + ${maven-resources-plugin.version} UTF-8 @@ -147,6 +151,7 @@ maven-compiler-plugin + ${maven-compiler-plugin.version} 1.8 1.8 @@ -158,6 +163,7 @@ maven-surefire-plugin + ${maven-surefire-plugin.version} false true