Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway error migrating from SCDF 2.9.5 to 2.10.0 #5188

Closed
fgapito opened this issue Jan 19, 2023 · 6 comments · Fixed by spring-cloud/spring-cloud-dataflow-common#25
Closed
Assignees
Milestone

Comments

@fgapito
Copy link

fgapito commented Jan 19, 2023

Hi,

I'm migrating from SCDF 2.9.5 to 2.10.0.

  • Environment: Kubernetes (Openshift)

  • DB: MS SqlServer 2019 (version 15.0.42.61.1)

After the docker image version change, I'm receving this error on flywayInitializer:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unsupported Database: Microsoft SQL Server 15.0

Thank You

f.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Jan 19, 2023
@fgapito fgapito changed the title Flyway error migrating from SCDF 2.9.4 to 2.10.0 Flyway error migrating from SCDF 2.9.5 to 2.10.0 Jan 19, 2023
@onobc
Copy link
Contributor

onobc commented Jan 19, 2023

Hi @fgapito

In the version of Flyway that Boot and Dataflow use, Flyway split out their jars into separate ones for each DB (eg. flyway-sqlserver).

We accounted for this fact w/ MySQL (here), but we missed it for SQLServer.

We will get it added in for 2.10.1.

In the meantime, you can follow one of these guides to add the dependency in:

@onobc onobc added this to the 2.10.1 milestone Jan 19, 2023
@onobc onobc removed the status/need-triage Team needs to triage and take a first look label Jan 19, 2023
@onobc onobc self-assigned this Jan 19, 2023
@fgapito
Copy link
Author

fgapito commented Jan 19, 2023

Is there a way to inject the missing dep without doing a maven rebuild? I would prefer to rebuild my own docker image. It could be feasible?

@onobc
Copy link
Contributor

onobc commented Jan 19, 2023

See the 2nd link above (https://docs.spring.io/spring-cloud-dataflow/docs/2.10.0/reference/htmlsingle/#_containers)

@fgapito
Copy link
Author

fgapito commented Jan 20, 2023

See the 2nd link above (https://docs.spring.io/spring-cloud-dataflow/docs/2.10.0/reference/htmlsingle/#_containers)

Hi,

I still didn't get how to rebuild the image starting from the already existing official image. Can you provide the official Dockerfile in order to add the missing jar?

Thank you.

@onobc
Copy link
Contributor

onobc commented Jan 20, 2023

@fgapito
I see where the disconnect is. That section of the ref docs is taken from the README in the source tree, and it does not mention that the example script is to be executed from /spring-cloud-dataflow/src/templates/add-deps directory - as that directory contains the missing Dockerfile. Sorry for the confusion and back and forth.

We will get the docs update, but in the meantime, you can download https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/src/templates/add-deps/Dockerfile and put it in directory <YOUR_WORK_DIR>.

Then from <YOUR_WORK_DIR> you should be able to do the following:

export CONTAINER_REPO="springcloud/spring-cloud-dataflow-server"
export CONTAINER_TAG="2.10.0-jdk17"
export PRIVATE_REGISTRY="our.private.registry"
export DEPS_FOLDER="./extra-libs/"
docker build -t "$PRIVATE_REGISTRY/$CONTAINER_REPO:$CONTAINER_TAG"
docker push "$PRIVATE_REGISTRY/$CONTAINER_REPO:$CONTAINER_TAG"

Update the above container tag and other env vars to match your reality.

The JAR Info

Not that you are interested in the "update the jar" approach, but If you end up looking at the "JAR" section of the https://docs.spring.io/spring-cloud-dataflow/docs/2.10.0/reference/htmlsingle/#_jar_file - it will be a bit confusing too as it also expects you reader to be in the /spring-cloud-dataflow/src/templates/add-deps directory. It has the build.gradle that does the magic etc..

@fgapito
Copy link
Author

fgapito commented Jan 22, 2023

Thank you!

At the end I got that the thing to do is to copy missing jars here:

image

Bye

f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants