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

OpenUpgrade and Travis #113

Closed
legalsylvain opened this issue Oct 23, 2014 · 8 comments
Closed

OpenUpgrade and Travis #113

legalsylvain opened this issue Oct 23, 2014 · 8 comments
Labels

Comments

@legalsylvain
Copy link
Contributor

Hi all,

I had an idea some weeks ago, when I discovered Travis System and I'd like to have your point of view.

I imagined to realize a Travis script that will realize the following things (for a migration to 7 -> 8):

  • clone odoo 7.0 branch;
  • get openupgrade 8.0 branch;
  • for each module with migration analyzed and done;
    • create a 7.0 database and install the module with demo data;
    • launch openupgrade 8.0 and so run the migration script of the module (and all dependencies);

Once the system done, it can be easily ported for next migration (8 -> 9);

  • The system can prevent some bug; (for exemple the recent bug we had about views);
  • If demo data are present, the coverage will be bigger and we can detect some problems automatically;
  • The system can so detect a problem when a people propose some PR about a new module;

@StefanRijnhart, @ all What do you think about that idea ?

Regards.

@rvalyi
Copy link
Member

rvalyi commented Oct 23, 2014

Hello @legalsylvain

That sounds all the rage. However I believe Travis free plans have a max execution time of ~12 minutes and my feeling is that it will not fit. Worth a double check. Also some OCA people are setting up a dedicated runbot system, may be it could be hacked into doing what you want (not on Travis infrastructure then).

Well this is just my hot feeling, it's probably worth a try or more investigation.

@legalsylvain
Copy link
Contributor Author

Hi @rvalyi,
Ok thanks about the information about max execution time. I think that it can fit at the beginning, but maybe not if all modules are done. (That was not the case for 7.0). We have to check that.
And without talking about the infrastructure, what is your point of view about the idea as such ?

thanks.

@rvalyi
Copy link
Member

rvalyi commented Oct 23, 2014

@legalsylvain yes, that may be possible with just a few module, not sure. Well the idea itself is great as I said.

@bwrsandman
Copy link

This completely depends on demo data migration and if these datas are complete and non-iterferal with migration scripts.

It shouldn't be too difficult to do for version 8.0 of OpenUpgrade:

language: python

python:
  - "2.7"

env:
  - VERSION="7.0" ODOO_REPO="odoo/odoo"
  - VERSION="7.0" ODOO_REPO="OCA/OCB"

virtualenv:
  system_site_packages: true

install:
  - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
  - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
  - travis_install_nightly
  - git clone https://github.com/${ODOO_REPO}.git ${HOME}/new-version -b ${VERSION} --depth=1

script:
  - ${HOME}/Odoo/openerp_server -d OpenUpgrade -i all --without-demo=False --stop-after-init
  - coverage run ./scripts/migrate.py -d OpenUpgrade
  - ${HOME}/new-version/openerp_server -d OpenUpgrade --stop-after-init | grep ERROR

after_success:
  coveralls

Not tested, just quickly typed, the commands and paths are probably different.

@legalsylvain
Copy link
Contributor Author

Hi @bwrsandman (or other) I tried few days ago to realize this script.
I don't know exactly how to realize that and I'm limited by my level in shell script.
(https://github.com/grap-openupgrade/OpenUpgrade/blob/8.0-Travis/.travis.yml)

I would like to install on V7 only modules marked as done in modules70-80.rst file.

I tried:

- ADDONS_LIST =""
- for module in `cat openerp/openupgrade/doc/source/modules70-80.rst  | grep -i "|.*Done" | cut -d"|" -f2` ; do if [ -z "$ADDONS_LIST" ] ; then ADDONS_LIST=$module; else ADDONS_LIST=$ADDONS_LIST,$module; fi; done

But I don't know how to use it after.
Any help is welcome.

@dreispt
Copy link
Member

dreispt commented Oct 30, 2014

It's reasonable to add OCB specific support into current MQT scripts, or at worse, add there additional scripts for OCB.
The question is: what would be the test strategy? @bwrsandman script above on only a specific list of modules?

@bwrsandman
Copy link

@legalsylvain try this:

ADDONS_LIST=`grep -i "^|.*|\s*Done" openerp/openupgrade/doc/source/modules70-80.rst |\
    cut -d"|" -f2  |\
    xargs echo |\
    sed 's/ /,/g'`

@pedrobaeza
Copy link
Member

Done. Closing...

GuillemCForgeFlow pushed a commit to ForgeFlow/OpenUpgrade that referenced this issue Oct 10, 2024
…serve_state

[IMP] keep old module's state when merging modules and the target is …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants