Coder Social home page Coder Social logo

Comments (4)

behnam-zakeri avatar behnam-zakeri commented on June 3, 2024

@khaeru I added you here, I hope it's fine. I suggest if it's not possible to update the schema of local DB when upgrading to a newer version of ixmp, there should be a more instructive error message, e.g., suggesting the user to downgrade to the previous version or any solution to retrieve scenarios stored in the local DB with the older schema.

from ixmp.

khaeru avatar khaeru commented on June 3, 2024

Does it mean that after updating to a newer version of message_ix (and ixmp) the databases created by previous versions are obsolete?

It could also be the opposite. As far as I understand, the Java code under the JDBCBackend has a way of migrating from one version of the database schema to a newer version, but not the reverse. So if a user uses an old version of ixmp to connect to a database that has already been migrated, it cannot ‘rewind’ the schema of that database. This could occur:

  1. If the user uses a newer version of ixmp locally, and then downgrades their version.
  2. If they are connecting to a centralized database, like our IIASA Oracle database server.

Some other wrinkles:

  • As far as I know, that Java code is not being maintained by anyone, so there are not any likely schema changes that are going to happen. @peterkolp are there any manually-applied changes (i.e. not reflected in the ixmp_source migration code) to the Oracle database that might trigger the error message above? My guess is no, but asking just in case.
  • In case (1) above, we do not have any capacity to do follow-up maintenance releases for ixmp. For instance, if we wanted ixmp version 3.3.0 to give an error message when used with a database that is in a new schema corresponding to ixmp 3.6.0, we would need to release ixmp 3.3.1—but we have no “maintenance” branch or testing or release procedure to create 3.3.1 now that development has moved on.

I suggest if it's not possible to update the schema of local DB when upgrading to a newer version of ixmp, there should be a more instructive error message, e.g., suggesting the user to downgrade to the previous version or any solution to retrieve scenarios stored in the local DB with the older schema.

This would be difficult to create tests for; however I could add some code that tries to catch particular Java exceptions and re-raise them. However, I can only do this if I have a complete error traceback with the precise message and the code that raises it. Could you get this from the user in question?

from ixmp.

peterkolp avatar peterkolp commented on June 3, 2024

@behnam-zakeri - the problen happens with a local database?

from ixmp.

behnam-zakeri avatar behnam-zakeri commented on June 3, 2024

the problen happens with a local database?

Thanks @khaeru and @peterkolp. This experience was from a local database, and after updating to a higher version of ixmp and message_ix.

from ixmp.

Related Issues (20)

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.