Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Maintenance #13

Merged
merged 29 commits into from
Jun 14, 2020
Merged

Maintenance #13

merged 29 commits into from
Jun 14, 2020

Conversation

ursjoss
Copy link
Contributor

@ursjoss ursjoss commented Jun 13, 2020

This PR does some maintenance tasks:

  • bump many dependencies to the latest versions
  • refactor IntegrationTest
  • add simple github actions configuration and two badges to the Readme

Obviously, especially the refactoring is opinionated. Please feel free to pick - or revert parts of the commits - as you like.

A few things to consider:

  • In order to bump gradle-wrapper to 6.5 I had to adapt JooqModelatorTask by annotating migrationPaths with @InputFiles
  • I intentionally left out bumping the docker image for mariadb and therefore left it on 10.2. See the error description below.
  • The badge for the build status requires a successful build to retrieve the picture. I was therefore not able to test it.
  • Before changing anything, I noticed the IntegrationTests were failing on my machine. It turns out table tabTwo results in a capitalized java file name Tabtwo.java. I presume you're using MacOS with a file system that is case-insensitive. On Linux, these tests did not pass. I adjusted the IntegrationTest to look for "Tabtwo". Hopefully this does not break anything on your machine.

As to the issues with bumping mariadb. Bumping from 10.2 to 10.3 resulted in a failing test liquibaseMariaDd(), with the following error:

* What went wrong:
Execution failed for task ':generateJooqMetamodel'.
> liquibase.exception.DatabaseException: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: Don't know how to query for sequences on root @ jdbc:mariadb://localhost:3306/maria (Default Schema: maria)

Looks like this ticket describes the cause: https://liquibase.jira.com/browse/CORE-3457?oldIssueView=true

And MariaDB 10.4 seems to change the way how to authenticate. I did not bother digging into that.

jooqModelatorRuntime('org.postgresql:postgresql:42.2.14')
jooqModelatorRuntime('org.mariadb.jdbc:mariadb-java-client:2.6.0')
jooqModelatorRuntime('org.postgresql:postgresql:$PG_DRIVER_VERSION')
jooqModelatorRuntime('org.mariadb.jdbc:mariadb-java-client:$MARIADB_DRIVER_VERSION')
}

""".trimIndent()

private fun File.asConfig(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool - never occurred to me one could use extension functions for this.


class IntegrationTest {

private enum class Database(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cleaner. 👍

@ayedo
Copy link
Owner

ayedo commented Jun 14, 2020

Thank you very much for your contribution.

The code looks good to me :) The tests pass on my machine. I'm looking forward to the cool badges.

I will keep an eye on the MariaDb problem. I have one or two things I want to fix in an upcoming release, and I will also look into that problem then.

@ayedo ayedo merged commit c69debc into ayedo:master Jun 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants