Skip to main content

Migration tool for Odoo

Project description

https://travis-ci.org/camptocamp/marabunta.svg?branch=master

Marabunta is a name given to the migration of the legionary ants or to the ants themselves. Restless, they eat and digest everything in their way.

This tool aims to run migrations for Odoo versions as efficiently as a Marabunta migration.

It loads migration instructions from a YAML file and run the operations if required.

Run the tests

To run marabunta tests, it is a good idea to do an editable install of it in a virtualenv, and then intall and run pytest as follows:

$ git clone https://github.com/camptocamp/marabunta.git
Cloning into 'marabunta'...
$ cd marabunta
$ python2 -m virtualenv env
$ source env/bin/activate
$ pip install -e .
$ pip install pytest
$ py.test tests

Release History

Unreleased

Features

Bugfixes

Improvements

Documentation

Build

0.6.3 (2016-12-12)

Bugfixes

  • The new connection opened in 0.6.2 might suffer from the same issue of timeout than before 0.6.0: the connection is long-lived but there is no keep-alive for this connection. Open a new connection for each update in marabunta_version, which might be spaced between long subprocess operations

0.6.2 (2016-12-12)

Bugfixes

  • Autocommit the operations done in the marabunta_version table. Previously, after an exception, the changes to marabunta_version were rollbacked, which is not the expected behavior (it makes the migration restart ceaseless). As a side effect, Marabunta now opens 2 connections. The connection opened for the adsivory lock cannot commit before the end because it would release the lock.

0.6.1 (2016-11-25)

Important bugfix! The changes in the marabunta_version were never committed, so migration would run again.

Bugfixes

  • Commit the connection so changes are not rollbacked.

0.6.0 (2016-11-21)

Improvements

  • Rework of the database connections:

    • The advisory lock is opened in a cursor in a thread, this cursor periodically executes a dummy ‘SELECT 1’ to be sure that the connection stay alive (not killed with a timeout) when a long-running subprocess is run.

    • The operations in database are executed in short-lived cursors. This prevents an issue we had when the open cursor was locking ‘ir_module_module’, preventing odoo to install/update properly.

  • Try to disable colors in output if the term does not support colors

0.5.1 (2016-10-26)

  • Fix: marabunta processes run concurrently all tried to run the migration, this is better handled with a PostgreSQL advisory lock now

0.5.0 (2016-10-12)

Odoo 10 Support

Features

  • Switch the default command line for running odoo to odoo instead of odoo.py (renamed in Odoo 10). For usage with previous version, you must specify the install_command in the migration.yml file.

0.4.2 (2016-08-17)

Bugfixes

  • Prevent error (25, ‘Inappropriate ioctl for device’) when stdout is not a tty by disabling the interactive mode.

0.4.1 (2016-07-27)

Bugfixes

  • Do not print on stdout the result of operations twice

0.4.0 (2016-07-26)

Improvements

  • New dependency on pexpect. Used to create a pseudo-tty to execute the operations. It enables line buffering and interactivity for pdb in the children processes.

Fixes

  • Noop operations are really considered as such

0.3.3 (2016-07-12)

Fixes

  • Encode print’s outputs to the stdout’s encoding or to utf8 by default

0.3.2 (2016-07-08)

Fixes

  • Failure when there are no version to process

0.3.1 (2016-07-07)

Fixes

  • Fix decoding issues with output of subprocesses

0.3.0 (2016-07-06)

Introducing modes.

Backward incompatible changes

  • --demo is replaced by a more general --mode argument, the equivalent being --mode=demo

  • MARABUNTA_DEMO is replaced by MARABUNTA_MODE

  • the configuration file has now operations and addons by “modes”, allowing to load some different scripts or install different addons for different modes (the addons list are merged and the operations of the modes are executed after the main ones):

    - version: 0.0.1
      operations:
        pre:  # executed before 'addons'
          - echo 'pre-operation'
        post:  # executed after 'addons'
          - anthem songs::install
      addons:
        upgrade:
          - base
      modes:
        prod:
          operations:
            pre:
              - echo 'pre-operation executed only when the mode is prod'
            post:
              - anthem songs::load_production_data
        demo:
          operations:
            post:
              - anthem songs::load_demo_data
          addons:
            upgrade:
              - demo_addon
  • --force renamed to --allow-serie

  • MARABUNTA_FORCE renamed to MARABUNTA_ALLOW_SERIE

  • --project-file renamed to --migration-file

  • MARABUNTA_PROJECT_FILE renamed to MARABUNTA_MIGRATION_FILE

Improvements

  • When ‘allow_serie’ is used, the same Odoo addon will not be upgraded more than one time when it is in the ‘upgrade’ section of more than one version

Fixes

  • Fix error when there is no db version in the database

  • Fix error AttributeError: 'bool' object has no attribute 'number' when there is an unfinished version

  • Fix error when the db version is above the unprocessed version

0.2.2 (2016-06-23)

Improvements

  • Adapted the README so that it is rendered as ReST on pypi.

0.2.1 (2016-06-23)

Bugfixes

  • Fixed the version information of the package and release date.

0.2.0 (2016-06-23)

Features

  • Added support for Python 3.4 and 3.5 in addition to 2.7.

Bugfixes

  • Fixed a crash with empty install args

Improvements

  • Use YAML safe_load for added security.

Documentation

  • Bootstrapped the Sphinx documentation.

Build

  • Switched to tox for the build. This allow to run the same tests in all environment locally like in travis. The travis configuration just calls tox now.

  • Added runtime dependencies to the package, kept separate from the build and test dependencies (installed separately by tox).

0.1.1 (2016-06-08)

  • Fixed problems with packaging so that now marabunta can be installable from pypi.

0.1.0 (2016-06-08)

Initial release. This corresponds to the initial work of Guewen Baconnier.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marabunta-0.6.3.tar.gz (29.0 kB view details)

Uploaded Source

Built Distributions

marabunta-0.6.3-py2.py3-none-any.whl (21.4 kB view details)

Uploaded Python 2 Python 3

marabunta-0.6.3-py2.7.egg (35.0 kB view details)

Uploaded Source

File details

Details for the file marabunta-0.6.3.tar.gz.

File metadata

  • Download URL: marabunta-0.6.3.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for marabunta-0.6.3.tar.gz
Algorithm Hash digest
SHA256 31f3978bd65ff9da2a1c0aba9836676eea34aed03ab02decea1ef8a360c6c3fe
MD5 8615556352c4131e88d388398c513e0a
BLAKE2b-256 a78dce13f259207bbed45e8847691a3ab9f763c3115b1433185e1975e75818f8

See more details on using hashes here.

File details

Details for the file marabunta-0.6.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for marabunta-0.6.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 16e673fc84bd1ae76e772c9aef80f7f01861af76340db9ee702af660c365c638
MD5 ad5b5e5851ea9216bec1c48be168b3a6
BLAKE2b-256 b20212fdfca0bed916856f4a83e25f7bb61936dea54e4678ea66ddd3b6bdc4b2

See more details on using hashes here.

File details

Details for the file marabunta-0.6.3-py2.7.egg.

File metadata

File hashes

Hashes for marabunta-0.6.3-py2.7.egg
Algorithm Hash digest
SHA256 47aafb6ce4a3d56cc3756967c52646a35a9b261190e2b5ac272d361fa85cec49
MD5 fa90d5f1cfdc532fbe24c3b942cc2fc3
BLAKE2b-256 10d598143ed06bcb3acd5cb2c822866e8b1a661b84c4b9a8fdaff5554e5f9ece

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page