branch feature/657_update_to_flyway_5 updated (cf32b452 -> 3975b75d)
This is an automated email from the git hooks/post-receive script. New change to branch feature/657_update_to_flyway_5 in repository topia. See https://gitlab.nuiton.org/nuiton/topia.git omits cf32b452 Passes use of deprecated configuration directive from warn to error new 3975b75d Passes use of deprecated configuration directive from warn to error This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (cf32b452) \ N -- N -- N refs/heads/feature/657_update_to_flyway_5 (3975b75d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 3975b75d2a9f96e1143423016d3d7a722b505560 Author: Brendan Le Ny <bleny@codelutin.com> Date: Mon Jan 8 15:26:03 2018 +0100 Passes use of deprecated configuration directive from warn to error Summary of changes: .../nuiton/topia/flyway/TopiaServiceFlywayInitOnCreateSchemaTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/657_update_to_flyway_5 in repository topia. See https://gitlab.nuiton.org/nuiton/topia.git commit 3975b75d2a9f96e1143423016d3d7a722b505560 Author: Brendan Le Ny <bleny@codelutin.com> Date: Mon Jan 8 15:26:03 2018 +0100 Passes use of deprecated configuration directive from warn to error --- .../nuiton/topia/flyway/TopiaFlywayServiceImpl.java | 18 +++++++++--------- .../TopiaServiceFlywayInitOnCreateSchemaTest.java | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java b/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java index a0c268b3..dab436eb 100644 --- a/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java +++ b/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java @@ -40,6 +40,7 @@ import org.flywaydb.core.internal.util.Location; import org.nuiton.topia.persistence.TopiaApplicationContext; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaMigrationServiceException; +import org.nuiton.topia.persistence.TopiaMisconfigurationException; import org.nuiton.topia.persistence.jdbc.JdbcConfiguration; import java.io.IOException; @@ -77,6 +78,13 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { @Override public void initTopiaService(TopiaApplicationContext topiaApplicationContext, Map<String, String> serviceConfiguration) { + if (serviceConfiguration.containsKey(FLYWAY_INIT_VERSION)) { + if (log.isErrorEnabled()) { + log.error(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead"); + } + throw new TopiaMisconfigurationException(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead", topiaApplicationContext.getConfiguration()); + } + modelVersion = topiaApplicationContext.getModelVersion(); // set flywayBaselineVersion if provided @@ -85,14 +93,6 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { if (StringUtils.isBlank(flywayBaselineVersion)) { throw new IllegalArgumentException("'" + FLYWAY_BASELINE_VERSION + "' must not be empty"); } - } else if (serviceConfiguration.containsKey(FLYWAY_INIT_VERSION)) { - if (log.isWarnEnabled()) { - log.warn(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead"); - } - flywayBaselineVersion = serviceConfiguration.get(FLYWAY_INIT_VERSION); - if (StringUtils.isBlank(flywayBaselineVersion)) { - throw new IllegalArgumentException("'" + FLYWAY_INIT_VERSION + "' must not be empty"); - } } // set useModelVersion if provided @@ -207,7 +207,7 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { // Use model version, flywayInitVersion should not be specified Preconditions.checkState(Strings.isNullOrEmpty(flywayBaselineVersion), - FLYWAY_INIT_VERSION + " is not not compatible with " + USE_MODEL_VERSION + "=true"); + FLYWAY_BASELINE_VERSION + " is not not compatible with " + USE_MODEL_VERSION + "=true"); if (log.isInfoEnabled()) { log.info("Using model version: " + modelVersion); diff --git a/topia-service-flyway/src/test/java/org/nuiton/topia/flyway/TopiaServiceFlywayInitOnCreateSchemaTest.java b/topia-service-flyway/src/test/java/org/nuiton/topia/flyway/TopiaServiceFlywayInitOnCreateSchemaTest.java index 1115aa83..5fd7c44b 100644 --- a/topia-service-flyway/src/test/java/org/nuiton/topia/flyway/TopiaServiceFlywayInitOnCreateSchemaTest.java +++ b/topia-service-flyway/src/test/java/org/nuiton/topia/flyway/TopiaServiceFlywayInitOnCreateSchemaTest.java @@ -107,7 +107,7 @@ public class TopiaServiceFlywayInitOnCreateSchemaTest { TopiaFlywayServiceImpl.class.getName(), ImmutableMap.of( TopiaFlywayService.USE_MODEL_VERSION, "false", - TopiaFlywayService.FLYWAY_INIT_VERSION, "1.2.42" + TopiaFlywayService.FLYWAY_BASELINE_VERSION, "1.2.42" )); JdbcH2Helper jdbcH2Helper = new JdbcH2Helper(config); @@ -138,7 +138,7 @@ public class TopiaServiceFlywayInitOnCreateSchemaTest { TopiaFlywayServiceImpl.class.getName(), ImmutableMap.of( TopiaFlywayService.USE_MODEL_VERSION, "true", - TopiaFlywayService.FLYWAY_INIT_VERSION, "1.2.42" + TopiaFlywayService.FLYWAY_BASELINE_VERSION, "1.2.42" )); // new application context will init database schema because of topia.persistence.initSchema=true -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm