Git Product home page Git Product logo

liquipy's Issues

Implement Integration Tests for liquipy

Need to test:

  • ChangeSets are executed in the expected order
  • Previously-executed changesets are not re-executed
  • Newly-added, previously un-executed ChangeSets are executed
  • Duplicate ChangeSet identifier numbers are detected and the expected exception is raised (this can be a unit test instead of integration test)
  • Rollback works as expected
  • User-passed tempDir in LiquipyDatabase versus default tempDir handling
  • Failures in liquibase are propagated as approprirate exceptions.
  • etc.

liquipy update executes the same changesets over and over

When I run update multiple times, liquibase complains that those tables already exist: "Table 'metric_template' already exists", etc. and exits with non-zero code. I would have hoped that since liquibase records the tags, it wouldn't execute the same changeset again.

I came across a liquibase discussion http://forum.liquibase.org/topic/why-does-the-change-log-contain-the-file-name that most likely points to a serious bug in liquipy and explains the reason that my changeset is getting executed over and over: it's because liquibase saves the changelog xml file path in the FILENAME column of the DATABASECHANGELOG table and uses that FILENAME value (in addition to ID and MD5SUM) to uniquily identify the changeset. Liquibase assumes that this path never changes. However, liquipy's behavior conflicts with that assumption: liquipy generates the changelog xml file from YML files and the generated XML file is placed in a temporary directory (in any case, those generated files cannot be preserved indefinitely) e.g., /var/folders/kn/xpy4z9wx001_zwmfyzcgxcg40000gp/T/tmpZn5NU_/liquipy_changelog.xml. Thus, the file path is different each time liquipy-based update is exected, so liquibase keeps re-executing the changesets over and over again.

From the discussion at http://forum.liquibase.org/topic/why-does-the-change-log-contain-the-file-name, it seems that logicalFilePath may be used by liquipy to solve this problem. liquipy could hard-code logicalFilePath to something like liquipy_changelog.xml in the generated XML file and never change it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.