Skip to content

Commit

Permalink
Merge branch 'master' into improve-test-system-error
Browse files Browse the repository at this point in the history
  • Loading branch information
abrackx committed Oct 13, 2022
2 parents 805df56 + ea43d36 commit 4030924
Show file tree
Hide file tree
Showing 183 changed files with 6,978 additions and 2,168 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:

jobs:
check_build_safety:
permissions:
contents: none
name: Check if Build should be done
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
(cd download/repo/liquibase-pro && git push -f origin v${{ needs.setup.outputs.version }})
build-installers:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
needs: [ setup, reversion ]
name: Build Installers
runs-on: macos-latest #needs macos for apple notarization
Expand Down
33 changes: 32 additions & 1 deletion .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download release assets
uses: robinraju/release-downloader@v1.4
uses: robinraju/release-downloader@v1.5
with:
repository: "liquibase/liquibase"
tag: "${{ needs.setup.outputs.tag }}"
Expand Down Expand Up @@ -164,3 +164,34 @@ jobs:
-DserverId=sonatype-nexus-staging \
-DstagingRepositoryId=$stagingRepositoryId \
-DstagingProgressTimeoutMinutes=10
deploy_javadocs:
name: Upload Javadocs
needs: [ setup ]
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- name: Download release javadocs
uses: robinraju/release-downloader@v1.5
with:
repository: "liquibase/liquibase"
tag: "${{ needs.setup.outputs.tag }}"
filename: "liquibase-additional*.zip"
out-file-path: "."

- name: Unpack javadoc files and upload to s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.JAVADOCS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.JAVADOCS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
unzip -j '*.zip' '*javadoc*.jar'
unzip '*liquibase-cdi*.jar' -d liquibase-cdi/
unzip '*liquibase-commercial*.jar' -d liquibase-commercial/
unzip '*liquibase-core*.jar' -d liquibase-core/
unzip '*liquibase-maven-plugin*.jar' -d liquibase-maven-plugin/
rm -rf *.jar *.zip
aws s3 sync . s3://javadocsliquibasecom-origin --only-show-errors
5 changes: 4 additions & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- cron: "5 6 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
security-scan:
# This workflow only runs on the main liquibase repo, not in forks
Expand Down Expand Up @@ -39,7 +42,7 @@ jobs:
## This builds and installs the sub-modules so they are available. The liquibase-core:test module has to be installed manually since it wasn't coming along with the regular mvn install
- name: Install modules
run: |
mvn -B -pl '!liquibase-dist' test-compile install -DskipTests=true
mvn -B test-compile install -DskipTests=true
mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=liquibase-core/target/liquibase-core-0-SNAPSHOT-tests.jar -Dpackaging=jar -Dclassifier=tests -DgroupId=org.liquibase -DartifactId=liquibase-core
## snyk monitor requires --all-projects because otherwise it only reports on the dependencies of one of the sub-modules. It would be nice if we could have one snyk project which included all the sub-modules in it, but that doesn't seem possible at this point
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jacoco.exec
original-pom.xml
**/logback-test.xml
**/*.swp
**/dependency-reduced-pom.xml
**/dependency-reduced-pom.xml
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2022 Liquibase Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This repository contains the main source code for Liquibase. For more informatio

## Liquibase Automation and Integrations

Liquibase Core works with the following databases: Apache Derby, CockroachDB, Firebird, H2, HSQL, Informix, InterBase, MariaDB, MSSQL, MySQL, Oracle, PostgreSQL, SQLite, Sybase Anywhere, Sybase Enterprise. The databases that require extensions are: [Azure Cosmos DB](https://github.com/liquibase/liquibase-cosmosdb), [Cassandra](https://github.com/liquibase/liquibase-cassandra), [Cache](https://github.com/liquibase/liquibase-cache), [DB2i](https://github.com/liquibase/liquibase-db2i), [Hibernate](https://github.com/liquibase/liquibase-hibernate), [Impala/Hive](https://github.com/eselyavka/liquibase-impala), [MaxDB](https://github.com/liquibase/liquibase-maxdb), [MongoDB](https://github.com/liquibase/liquibase-mongodb), [Redshift](https://github.com/liquibase/liquibase-redshift), [SAP HANA](https://github.com/liquibase/liquibase-hanadb), [SQLFire](https://github.com/liquibase/liquibase-sqlfire), [Snowflake](https://github.com/liquibase/liquibase-snowflake), [Teradata](https://github.com/liquibase/liquibase-teradata), [Vertica](https://github.com/liquibase/liquibase-vertica), [VoltDB](https://github.com/diorman/liquibase-voltdb). See [Liquibase Database Tutorials](https://docs.liquibase.com/workflows/database-setup-tutorials/home.html).
Liquibase Core has built-in support for a variety of databases. Databases that are not part of Liquibase Core require extensions that you can download for free. For a full list of supported databases, see [Liquibase Database Tutorials](https://docs.liquibase.com/install/tutorials/home.html).

Liquibase can be integrated with Maven, Ant, Gradle, Spring Boot, and other CI/CD tools. You can use Liquibase GitHub Actions, Liquibase and Jenkins with Spinnaker, and many different workflows.
Liquibase can be integrated with Maven, Ant, Gradle, Spring Boot, and other CI/CD tools. For a full list, see [Liquibase Tools & Integrations](https://docs.liquibase.com/tools-integrations/home.html). You can use Liquibase GitHub Actions, Liquibase and Jenkins with Spinnaker, and many different [workflows](https://docs.liquibase.com/workflows/home.html).

## Real-time monitoring and visibility
Try [Liquibase Hub](https://hub.liquibase.com/) to get real-time information about your deployments, an overview of recent commands for the specific database you’re working on, and a place for your team collaboration.
Expand All @@ -35,7 +35,7 @@ Liquibase system requirements can be found on the [Download Liquibase](https://w
8. Run the `liquibase history` command.
9. If you entered your email, check the report link and the output of the `history` command to see they match.

See also how to [get started with Liquibase in minutes](https://www.liquibase.org/get-started/quickstart) or refer to our [Liquibase Installation](https://docs.liquibase.com/concepts/installation/home.html) documentation page for more details.
See also how to [get started with Liquibase in minutes](https://www.liquibase.org/get-started/quickstart) or refer to our [Installing Liquibase](https://docs.liquibase.com/install/home.html) documentation page for more details.

## Documentation

Expand Down Expand Up @@ -76,3 +76,4 @@ LIQUIBASE is a registered trademark of [Liquibase Inc.](https://www.liquibase.co
[Liquibase Blog](https://www.liquibase.org/blog)

[Get Support & Advanced Features](https://liquibase.com/pricing)

97 changes: 97 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,103 @@
Liquibase Core Changelog
===========================================

Changes in version 4.17.0 (2022.10.05)

## Notable Changes
* [PRO] The `liquibase flow` command and flow files are available with a Pro license. It allows you to create portable, platform-independent workflows that can run across different tools without modifying each workflow.
- Learn more about flow here: [liquibase flow file and command](https://docs.liquibase.com/commands/flow/flow.html)
- If you want to provide feedback on this capability, please email mario@liquibase.com.

* [PRO] Pro license users can now integrate Amazon S3 with Liquibase. You can extend Liquibase to use remote file locations to enable secure, centralized file management.
- Learn more here: [S3 Remote Files](https://docs.liquibase.com/tools-integrations/remote-files/s3.html)
* [PRO] Pro license users can use searchpath to find files located on S3 that cannot be found by an absolute path.
- Learn more about the [Searchpath command here](https://docs.liquibase.com/concepts/changelogs/how-liquibase-finds-files.html).
- Learn more about [Searchpath with S3 here](https://docs.liquibase.com/tools-integrations/remote-files/searchpath.html).

## API Breaking Changes
* The liquibase.resource.ResourceAccessor APIs were updated to take advantage of the new liquibase.resource.Resource abstraction that was introduced. Code that USES the existing ResourceAccessor methods will continue to work as before with no changes, but if you have written custom implementations of ResourceAccessor there are new and changed methods to implement. For more information, see [javadocs.liquibase.com](https://javadocs.liquibase.com)

## Enhancements
* Created new liquibase.resource.Resource interface by @nvoxland in https://github.com/liquibase/liquibase/pull/3064
* Created ThreadLocalScopeManager by @nvoxland in https://github.com/liquibase/liquibase/pull/3240
* Create liquibase_autocomplete.zsh by @szandany in https://github.com/liquibase/liquibase/pull/3130

## Fixes

* AlterSequence: include NOORDER clause ordered="false" is specified by @LeBezout in https://github.com/liquibase/liquibase/pull/1044
* Upper case result columns only for case-insensitive databases by @fbiville in https://github.com/liquibase/liquibase/pull/3102
* Postgresql: Fix for case when current search_path is an empty string by @gadget in https://github.com/liquibase/liquibase/pull/3233
* Fix missing catalog on add column rollback by @jandurovec in https://github.com/liquibase/liquibase/pull/921
* Fix an error which can occur if getAutoCommit is called on a closed connection by @gpsfl in https://github.com/liquibase/liquibase/pull/3135
* apply sqlVisitors to CompoundStatements on DB2z by @MichaelKern-IVV in https://github.com/liquibase/liquibase/pull/3220
* Improved message when precondition onFail : MARK_RAN is set by @MultiM25 in https://github.com/liquibase/liquibase/pull/2238
* Add default catalog condition to SequenceSnapshotGenerator for Oracle by @gabrielnardes in https://github.com/liquibase/liquibase/pull/3152
* Fixed issue with h2 loadUpdateData not correctly handling values with the string " values " in the inserted data by @tomyy in https://github.com/liquibase/liquibase/pull/1831
* Fix the smallserial issue not being parsed as a SmallInt type for Postgres by @MalloD12 in https://github.com/liquibase/liquibase/pull/3234
* Remove snowflake unsupported logging from snapshot command by @abrackx in https://github.com/liquibase/liquibase/pull/3277
* Fix "double" handling with H2 by @MalloD12 in https://github.com/liquibase/liquibase/pull/3273
* Firebird: fix createIndex missing space around "computed" by @Markus-Patt in https://github.com/liquibase/liquibase/pull/1500
* Test Race Condititons During Liquibase Locking by @schrieveslaach in https://github.com/liquibase/liquibase/pull/2327
* Use configuration to get 'altTablespace', 'altSchema' and 'altCatalog… by @mehrabisajad in https://github.com/liquibase/liquibase/pull/3124
* Add missing generator for parameterized SQL statements by @fbiville in https://github.com/liquibase/liquibase/pull/3225
* Add catalog null check to fix initializing a MSSQL db issue by @MalloD12 in https://github.com/liquibase/liquibase/pull/3235
* PD-2838: pointing DB list to docs by @adrian-velonis1 in https://github.com/liquibase/liquibase/pull/3280
* Addition of liquibase.update() Enhancement Request #1614 by @Betlista in https://github.com/liquibase/liquibase/pull/1638
* Fixed createView handling of replaceIfExists=true when the string "replace" exists in the view definition by @filipelautert in https://github.com/liquibase/liquibase/pull/3305
* replace backslashes in NotFoundResource URI by @StevenMassaro in https://github.com/liquibase/liquibase/pull/3322
* Fix generateChangeLog and diffChangeLog logic to avoid including default schema name when it should not by @MalloD12 in https://github.com/liquibase/liquibase/pull/3246

## Updates

### Security Updates
* None

### JDBC Driver and Third-Party Library Updates
* Upgraded snowflake-jdbc from 3.13.21 to 3.13.22 by @dependabot in https://github.com/liquibase/liquibase/pull/3196
* Upgraded opencsv from 5.6 to 5.7.0 by @dependabot in https://github.com/liquibase/liquibase/pull/3243
* Upgraded installer to use JDK 17.0.4.1 by @nvoxland in https://github.com/liquibase/liquibase/pull/3266
* Upgraded sqlite-jdbc from 3.39.2.1 to 3.39.3.0 by @dependabot in https://github.com/liquibase/liquibase/pull/3267
* Upgraded jaxb-core from 4.0.0 to 4.0.1 by @dependabot in https://github.com/liquibase/liquibase/pull/3292
* Upgraded mariadb-java-client from 3.0.7 to 3.0.8 by @dependabot in https://github.com/liquibase/liquibase/pull/3293
* Upgraded jaxb-runtime from 4.0.0 to 4.0.1 by @dependabot in https://github.com/liquibase/liquibase/pull/3294
* Upgraded snakeyaml from 1.32 to 1.33 by @dependabot in https://github.com/liquibase/liquibase/pull/3310


Changes in version 4.16.1 (2022.09.14)

## New and Notable Capability
* Liquibase 4.16.0 incorrectly included the [msal4j.jar](https://mvnrepository.com/artifact/com.microsoft.azure/msal4j) and it's dependencies in `internal/lib`. This release does not include that SqlServer related library
* Upgraded snakeyaml to 1.32
## Enhancements
* None

## Fixes
* None

Changes in version 4.16.0 (2022.09.08)

## New and Notable Capability
* [LABS] The liquibase flow command and flow files are still available under the Liquibase Labs license. If you want to try and provide feedback on this capability, please email mario@liquibase.com
* [PRO] The Quality Checks for Databases are now available to all Pro license users. These checks inspect your active database, or a liquibase-generated snapshot for compliance with your rules. Learn more at https://docs.liquibase.com/quality-checks

## Enhancements
* Introduced "contextFilter" and "labelFilter" replacement settings by @nvoxland in #2971
* Added support for changeset references in rollback for Formatted SQL changelogs by @atzawada in #1386
* Add schemas and includeSchema parameters to maven generateChangeLog by @MalloD12 in #3210
* [PRO] Two new Pro commands update-one-changeset and update-one-changeset-sql serving as complements to rollback-one-changeset and roll-back-one-changeset-sql

## Fixes
* Fix addColumn on mysql when including a "value" attribute by @nvoxland in #3070
* Add support for AS <dataType> clause for H2 since version 2.0 by @marcus-nl in #3047
* Fixed NUMBER not compatible with H2 by @nick318 in #3098
* SpringResourceAccessor: fix issue with incorrect match pattern for files from classPath root by @danilmalkin in #3095
* Made liquibase.snapshot.ResultSetCache an extensible class. by @breglerj in #2087
* Added support for \u2116 symbol win1251 cyrillic symbol of number by @Stuchalin in #1324
* Tidy ExecutorService code, remove superfluous map access (Issue 1841) by @jamey-clari in #1842
* Fixed order of enum values on MySQL 8 by @Tantalon in #3150
* Removed invalid warning in Maven by @nvoxland in #3189
* [PRO] QC: checks show changes (--show-cols flag, drop some, etc) by @dyadyushko in #3187

Changes in version 4.15.0 (2022.08.04)

## Notable Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import liquibase.integration.cdi.annotations.Liquibase;
import liquibase.integration.cdi.annotations.LiquibaseSchema;
import liquibase.logging.Logger;
import liquibase.resource.FileSystemResourceAccessor;
import liquibase.resource.DirectoryResourceAccessor;
import liquibase.resource.ResourceAccessor;
import liquibase.util.FileUtil;
import liquibase.util.StreamUtil;
Expand Down Expand Up @@ -54,8 +54,8 @@ public SchemesCDIConfigBuilder(BeanManager bm, SchemesTreeBuilder treeBuilder) {
/**
* API method.
*/
public ResourceAccessor createResourceAccessor() {
return new FileSystemResourceAccessor(new File(ROOT_PATH));
public ResourceAccessor createResourceAccessor() throws IOException {
return new DirectoryResourceAccessor(new File(ROOT_PATH));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package liquibase.integration.commandline;

import liquibase.Scope;
import liquibase.command.CommandResults;
import liquibase.command.CommandScope;
import liquibase.command.CommonArgumentNames;
import liquibase.exception.CommandValidationException;
import liquibase.exception.MissingRequiredArgumentException;
import liquibase.resource.OpenOptions;
import liquibase.resource.PathHandlerFactory;
import liquibase.util.StringUtil;
import picocli.CommandLine;

Expand Down Expand Up @@ -39,12 +42,13 @@ public CommandResults call() throws Exception {
}

final CommandScope commandScope = new CommandScope(commandName);
final File outputFile = LiquibaseCommandLineConfiguration.OUTPUT_FILE.getCurrentValue();
final String outputFile = LiquibaseCommandLineConfiguration.OUTPUT_FILE.getCurrentValue();
OutputStream outputStream = null;

try {
if (outputFile != null) {
outputStream = new FileOutputStream(outputFile);
final PathHandlerFactory pathHandlerFactory = Scope.getCurrentScope().getSingleton(PathHandlerFactory.class);
outputStream = pathHandlerFactory.openResourceOutputStream(outputFile, new OpenOptions());
commandScope.setOutput(outputStream);
}

Expand Down

0 comments on commit 4030924

Please sign in to comment.