Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/maven/org.mariadb.jdbc-mariadb-…
Browse files Browse the repository at this point in the history
…java-client-3.0.5
  • Loading branch information
nvoxland committed Jun 24, 2022
2 parents c43b62b + 4dc1bce commit e1de33c
Show file tree
Hide file tree
Showing 201 changed files with 7,449 additions and 1,748 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ assignees: ''

**Operating System Type & Version**:

**Infrastructure Type/Provider**: <AWC, GCS, Azure, VM, etc>


## Description

Expand Down
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ updates:
open-pull-requests-limit: 10
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
78 changes: 26 additions & 52 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,38 @@
<!--- This environment context section helps us quickly review your PR.
Please take a minute to fill-out this information. -->
## Environment
## Impact

**Liquibase Version**:

**Liquibase Integration & Version**: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>

**Liquibase Extension(s) & Version**:

**Database Vendor & Version**:

**Operating System Type & Version**:

## Pull Request Type

<!--- What types of changes does your code introduce?
Put an `x` in all the boxes that apply:
If this PR fixes an existing GH issue, edit the next line to add "closes #XXXX" to auto-link.
If this PR fixes an existing CORE Jira issue, note that as well, although there will be no auto-linking. -->
- [ ] Bug fix (non-breaking change which fixes an issue.)
- [ ] Enhancement/New feature (non-breaking change which adds functionality)
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes expected existing functionality)
- [ ] Enhancement/New feature (adds functionality without impacting existing logic)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Description

A clear and concise description of the issue being addressed. Additional guidance [here](https://liquibase.jira.com/wiki/spaces/LB/pages/1274904896/How+to+Contribute+Code+to+Liquibase+Core).
- Describe the actual problematic behavior.
A clear and concise description of the change being made.

- Introduce what was/will be done in the title
- Titles show in release notes and search results, so make them useful
- Use verbs at the beginning of the title, such as "fix", "implement", "improve", "update", and "add"
- Be specific about what was fixed or changed
- Good Example: `Fix the --should-snapshot-data CLI parameter to be preserved when the --data-output-directory property is not specified in the command.`
- Bad Example: `Fixed --should-snapshot-data`
- If there is an existing issue this addresses, include "Fixes #XXXX" to auto-link the issue to this PR
- If there is NOT an existing issue, consider creating one.
- In general, issues describe wanted change from an end-user perspective and PRs describe the technical change.
- If this change is very small and not worth splitting off an issue, include `Steps To Reproduce`, `Expected Behavior`, and `Actual Behavior` sections in this PR as you would have in the issue.
- Describe what users need and how the fix will affect them
- Describe how the code change addresses the problem
- Ensure private information is redacted.

## Steps To Reproduce

List the steps to reproduce the behavior.
- Please be precise and ensure private information is redacted
- Include things like
- Files used - sql scripts, changelog file(s), property file(s), config files, POM Files
- Exact commands used - CLI, maven, gradle, spring boot, servlet, etc.
## Things to be aware of

## Actual Behavior
A clear and concise description of what happens in the software **before** this pull request.
- Include console output if relevant
- Include log files if available.
- Describe the technical choices you made
- Describe impacts on the codebase

## Expected/Desired Behavior
A clear and concise description of what happens in the software **after** this pull request.
## Things to worry about

## Screenshots (if appropriate)
If applicable, add screenshots to help explain your problem.
- List any questions or concerns you have with the change
- List unknowns you have

## Additional Context
Add any other context about the problem here.

## Fast Track PR Acceptance Checklist:
<!--- Completing these speeds up the acceptance of your pull request -->
<!--- Put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, just ask us in a comment. We're here to help! -->
- [ ] Build is successful and all new and existing tests pass
- [ ] Added [Unit Test(s)](https://liquibase.jira.com/wiki/spaces/LB/pages/1274937609/How+to+Write+Liquibase+Core+Unit+Tests)
- [ ] Added [Integration Test(s)](https://liquibase.jira.com/wiki/spaces/LB/pages/1276608569/How+to+Write+Liquibase+Core+Integration+Tests)
- [ ] Added [Test Harness Test(s)](https://github.com/liquibase/liquibase-test-harness/pulls)
- [ ] Documentation Updated

## Need Help?
Come chat with us in the [Liquibase Forum](https://forum.liquibase.org/).
Add any other context about the problem here.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.event.after}}
- name: Built Code Cache
if: ${{ matrix.java == 8}}
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: built-code-${{ github.run_number }}-${{ github.run_attempt }}
path: ./**/target
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
distribution: 'adopt'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
distribution: 'temurin'
cache: 'maven'
- name: Restore Built Code Cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: built-code-${{ github.run_number }}-${{ github.run_attempt }}
path: ./**/target
Expand Down Expand Up @@ -297,14 +297,14 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.event.after}}

- name: Built Code Cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: built-code-${{ github.run_number }}-${{ github.run_attempt }}
path: ./**/target

##Cache based on install4j file, since changes to JVM is seen in there. If install4j version changes without changing the file, change the prefix letter before hashFiles to force a new cache
- name: Install4j Cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: install4j-A${{ hashFiles('liquibase-dist/src/main/install4j/liquibase.install4j') }}
path: ~/.install4j8/**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
mv re-version/out/liquibase-additional-${{ needs.setup.outputs.version }}.zip re-version/final
- name: Cache Completed Artifacts
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: completed-artifacts-${{ github.run_number }}-${{ github.run_attempt }}
path: re-version/final
Expand All @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v3

- name: Restore Completed Artifacts
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
key: completed-artifacts-${{ github.run_number }}-${{ github.run_attempt }}
path: re-version/final
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- liquibase-oracle
- liquibase-postgresql
- liquibase-redshift
- liquibase-snowflake
- liquibase-sqlfire
- liquibase-teradata
- liquibase-vertica
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,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://www.liquibase.com/contact)
[Get Support & Advanced Features](https://liquibase.com/pricing)
45 changes: 45 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
Liquibase Core Changelog
===========================================

Changes in version 4.12.0 (2022.06.16)

## Enhancements
* Changed value modifier to make StandardLockService extendable for future extension by @Cliftonz in https://github.com/liquibase/liquibase/pull/2785
* Added liquibase.showBanner global configuration setting by @nvoxland in https://github.com/liquibase/liquibase/pull/2871
* Quality Checks for Databases (DAT-9298) by @StevenMassaro in https://github.com/liquibase/liquibase/pull/2715
* Added configuration options for missing property handling by @dwieland in https://github.com/liquibase/liquibase/pull/2656
* Add ConfiguredValueModifier extension point for plugins by @mcred in https://github.com/liquibase/liquibase/pull/2252
* Added showBanner configuration to maven by @nvoxland in https://github.com/liquibase/liquibase/pull/2933
* Added new argument to preserve schema case DAT-10027 by @wwillard7800 in https://github.com/liquibase/liquibase/pull/2888
* Introduced "latest" xsd file path by @nvoxland in https://github.com/liquibase/liquibase/pull/2886
* Moved Snowflake support into standard liquibase [DAT-10294] by @KushnirykOleh in https://github.com/liquibase/liquibase/pull/2841

## JDBC Driver and Third-Party Library Updates
* Added connector-api.jar to internal/lib by @nvoxland in https://github.com/liquibase/liquibase/pull/2873
* Upgraded mysql-connector-java from 8.0.28 to 8.0.29 by @dependabot in https://github.com/liquibase/liquibase/pull/2798
* Move opencsv to be non-shaded by @nvoxland in https://github.com/liquibase/liquibase/pull/2903
* Added snowflake driver to CLI by @nvoxland in https://github.com/liquibase/liquibase/pull/2931
* Upgraded mssql-jdbc from 10.2.0.jre8 to 10.2.1.jre8 by @dependabot in https://github.com/liquibase/liquibase/pull/2846

## Fixes
* Fixed BLOBs in loadData for MySQL/MariaDB by @MichaelCkr in https://github.com/liquibase/liquibase/pull/2595
* Fixed getting ENUM column values from Mysql database having multiple schemas by @akatiyar in https://github.com/liquibase/liquibase/pull/2616
* Added logic to Derby.getDefaultDriver() to check for availability of different driver classes by @AlexanderSashchenko in https://github.com/liquibase/liquibase/pull/2571
* Fixed TableOutput spaces when using long words (DAT-10069) by @StevenMassaro in https://github.com/liquibase/liquibase/pull/2879
* Fixed addAutoIncrement startValue and incrementBy support on postgresql by @nvoxland in https://github.com/liquibase/liquibase/pull/2588
* Support non-classpath: protocols in Spring by @reallyinsane in https://github.com/liquibase/liquibase/pull/2524
* Fixed #2780: AddColumnChange with schema and NOT NULL constraint fails by @MartinRied in https://github.com/liquibase/liquibase/pull/2781
* Make extension matching for SQL parsers case-insensitve DAT-10265 by @wwillard7800 in https://github.com/liquibase/liquibase/pull/2884
* Restored outputDefaultSchema and outputDefaultCatalog command arguments by @nvoxland in https://github.com/liquibase/liquibase/pull/2834
* Quote liquibase.jar path in bash launcher by @nvoxland in https://github.com/liquibase/liquibase/pull/2885
* Fix for working with Firebird 2 and newer versions. Fixes nullables and boolean type. by @mngsgoncalves in https://github.com/liquibase/liquibase/pull/2277
* Fixed issue if change changelog object is null by @kamalnigam in https://github.com/liquibase/liquibase/pull/2837
* Filter out license key strings for Hub communication DAT-10522 by @wwillard7800 in https://github.com/liquibase/liquibase/pull/2926
* Specify which parameter is missing in the error message by @bendem in https://github.com/liquibase/liquibase/pull/2567
* Split license information into OSS vs. Pro directories by @nvoxland in https://github.com/liquibase/liquibase/pull/2868
* Use the method setBlob to insert blob data by @xjodoin in https://github.com/liquibase/liquibase/pull/605
* Smooth out differences in "./" paths by @nvoxland in https://github.com/liquibase/liquibase/pull/2915
* Include inherited labels in databasechangelog table by @nvoxland in https://github.com/liquibase/liquibase/pull/2870
* Restored OSGi headers by @nvoxland in https://github.com/liquibase/liquibase/pull/2924
* Working on better Git Bash console solution DAT-10230 by @wwillard7800 in https://github.com/liquibase/liquibase/pull/2882
* close InputStream in SQLFileChange (DAT-9855) by @StevenMassaro in https://github.com/liquibase/liquibase/pull/2920
* Support prepared statements for query by @fbiville in https://github.com/liquibase/liquibase/pull/2913
* Implement NOT VALID for Postgres databases by @coenvk in https://github.com/liquibase/liquibase/pull/2600

Changes in version 4.11.0 (2022.05.19)

## Enhancements
Expand Down
2 changes: 1 addition & 1 deletion liquibase-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0-SP4</version>
<version>2.0</version>
<scope>provided</scope>
</dependency>

Expand Down
17 changes: 17 additions & 0 deletions liquibase-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,21 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>liquibase.integration.commandline.LiquibaseLauncher</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import liquibase.configuration.core.DefaultsFileValueProvider;
import liquibase.exception.CommandLineParsingException;
import liquibase.exception.CommandValidationException;
import liquibase.exception.UnexpectedLiquibaseException;
import liquibase.hub.HubConfiguration;
import liquibase.license.LicenseService;
import liquibase.license.LicenseServiceFactory;
Expand All @@ -30,7 +29,6 @@
import picocli.CommandLine;

import java.io.*;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
Expand Down Expand Up @@ -233,7 +231,11 @@ private int handleException(Throwable exception) {
bestMessage = bestMessage.replace("Unexpected error running Liquibase: ", "");
}

Scope.getCurrentScope().getLog(getClass()).severe(bestMessage, exception);
if (cause instanceof CommandFailedException && ((CommandFailedException) cause).isExpected()) {
Scope.getCurrentScope().getLog(getClass()).severe(bestMessage);
} else {
Scope.getCurrentScope().getLog(getClass()).severe(bestMessage, exception);
}

boolean printUsage = false;
try (final StringWriter suggestionWriter = new StringWriter();
Expand Down Expand Up @@ -492,6 +494,24 @@ private List<ConfigurationValueProvider> registerValueProviders(String[] args) t
returnList.add(argumentProvider);

final ConfiguredValue<String> defaultsFileConfig = LiquibaseCommandLineConfiguration.DEFAULTS_FILE.getCurrentConfiguredValue();
/*
* The installed licenses are cleared from the license service. Clearing the licenses
* forces the license service to reinstall the licenses.
*
* The call to LiquibaseCommandLineConfiguration.DEFAULTS_FILE.getCurrentConfiguredValue() above will check
* the environment variables for a value, and that requires a valid license. Thus, if the user has a license
* key specified in both an environment variable and in their defaults file (using different property names),
* the value in the defaults file will not be seen, despite it possibly being more preferred than the value
* in the environment variable, because the DefaultsFileValueProvider hasn't been registered yet.
*/
LicenseServiceFactory licenseServiceFactory = Scope.getCurrentScope().getSingleton(LicenseServiceFactory.class);
if (licenseServiceFactory != null) {
LicenseService licenseService = licenseServiceFactory.getLicenseService();
if (licenseService != null) {
licenseService.reset();
}
}

final File defaultsFile = new File(defaultsFileConfig.getValue());
if (defaultsFile.exists()) {
final DefaultsFileValueProvider fileProvider = new DefaultsFileValueProvider(defaultsFile);
Expand Down Expand Up @@ -1150,7 +1170,12 @@ public String[] getVersion() throws Exception {
filePath = workingDirectory.relativize(info.file.toPath()).toString();
}

libraryDescription.append("- "). append(filePath).append(": ").append(info.name).append(" ").append(info.version).append("\n");
libraryDescription.append("- ")
.append(filePath).append(":")
.append(" ").append(info.name)
.append(" ").append(info.version == null ? "UNKNOWN" : info.version)
.append(info.vendor == null ? "" : " By " + info.vendor)
.append("\n");
}
}

Expand All @@ -1174,15 +1199,13 @@ private LibraryInfo getLibraryInfo(File pathEntryFile) throws IOException {
libraryInfo.file = pathEntryFile;

final Manifest manifest = jarFile.getManifest();
libraryInfo.name = getValue(manifest, "Bundle-Name", "Implementation-Title");
libraryInfo.version = getValue(manifest, "Bundle-Version", "Implementation-Version");
libraryInfo.name = getValue(manifest, "Bundle-Name", "Implementation-Title", "Specification-Title");
libraryInfo.version = getValue(manifest, "Bundle-Version", "Implementation-Version", "Specification-Version");
libraryInfo.vendor = getValue(manifest, "Bundle-Vendor", "Implementation-Vendor", "Specification-Vendor");

if (libraryInfo.name == null) {
libraryInfo.name = pathEntryFile.getName().replace(".jar", "");
}
if (libraryInfo.version == null) {
libraryInfo.version = "UNKNOWN";
}
return libraryInfo;
}
}
Expand All @@ -1199,6 +1222,7 @@ private String getValue(Manifest manifest, String... keys) {


private static class LibraryInfo implements Comparable<LibraryInfo> {
private String vendor;
private String name;
private File file;
private String version;
Expand Down

0 comments on commit e1de33c

Please sign in to comment.