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

Script to compare list of installed modules with OCA upgrade module status #2917

Closed
pjrobertson opened this issue Sep 23, 2021 · 7 comments
Closed

Comments

@pjrobertson
Copy link

Right now it appears that all information on a given version upgrade (e.g. Odoo 12.0 to 13.0 or Odoo 13.0 to 14.0) is stored in a pinned issue.

E.g.:
12.0 to 13.0: #1733
13.0 to 14.0: #2190

Is there:

  1. A more code-friendly list of modules that could be run through a python script?
  2. An existing script available that would automatically run through the list of installed modules on my given system (exported via the 'Export' function in Odoo) and then compare that list with the module status of the OCA scripts?

My goal would be to export my list of modules, then run a script that would tell me which modules are marked as 'complete' and which aren't. Then I could work on updating those modules (it may also help more people get involved in the project, as they can see the 'finish line' for their own specific installation).

If this script already exists, forgive me for not finding it. If not, I am happy to work on developing it assuming it's something this OCA repo would want and would be merged in?

@legalsylvain
Copy link
Contributor

Hi @pjrobertson.

Thanks a lot for your interest about that topic !

I worked some years ago for a tool to analyse the work to do in an openupgrade context.

here was the result of the coverage GRAP_Migration_Analysis_(8 - 12)(2).pdf

is such analyse you want to have ?

FYI, it was based

If you're interested to work on that topic, please let me know !
I'm totally busy for the next 3 weeks, but it can be a topic for a code sprint for the next OCA Days. (end of October)

CC : @StefanRijnhart I talked to you regarding that topic in a old 2018 mail. ("Migration Coverage Tools (PoC)")

CC : @pedrobaeza, @MiquelRForgeFlow, @RaulOForgeFlow. Feel free to give your PoV.

kind regards.

@pjrobertson
Copy link
Author

Appreciate the thoughts and feedback, @legalsylvain !

That PDF you linked to isn't exactly what I was thinking of. As you say, that's more in the openupgrade context, for maintainers to see 'what still needs doing'.

I was thinking more from the point of view of people hoping to use openupgrade, like "Does openupgrade have upgrade scripts for v13.0 for all the modules I have installed?". I see this as a big plus for the openupgrade project itself. It would mean project 'outsiders' (like myself) will be able to quickly see whether or not openupgrade will work for them, or which modules still need converting - it could encourage participation as people will see "I only need scripts for this one module then I'll be able to upgrade!"

Your script is still relevant: for compiling the status of all modules in the openupgrade project.

After a bit more thought, here's what I have in mind:

  1. Script to create/compile status of all modules per version: produces a csv/json file - this could be integrated with CI (Continuous integration) to update every time there's a commit - Based on @legalsylvain 's existing work
  2. A readme with instructions on how to export the list of modules one has installed in Odoo (very simple: go to Settings > Browse Apps > View List > Filter by 'Installed' > Tick all > Action > Export)
  3. A python script which would compare 1 and 2 to give a graphic display of which modules I have installed (step 2) aren't covered by openupgrade (step 1)
  4. Convert script from step 3 into a javascript that can be hosted in the Openupgrade docs - people can then just do step 2 and visit a certain page in the docs, load in the file and instantly see a graphical display of the coverage of openupgrade for them.

Let me know our thoughts!

@legalsylvain
Copy link
Contributor

Script to create/compile status of all modules per version: produces a csv/json file - this could be integrated with CI (Continuous integration) to update every time there's a commit - Based on @legalsylvain 's existing work

This file exist : https://github.com/OCA/OpenUpgrade/blob/14.0/docsource/modules130-140.rst

  • the generation is automatised (manual script, when creating new branch)
  • I don't think the update can be automatised.

I was thinking more from the point of view of people hoping to use openupgrade, like "Does openupgrade have upgrade scripts for v13.0 for all the modules I have installed?"

I don't get it. The generated pdf file exactly answer to that question. (module and versions are configurable).

kind regards.

@pjrobertson
Copy link
Author

Apologies for the delayed response here.

I suppose the two resources you referred to (docsource file + your PDF) can technically solve this, but the issues they have are:

Docsource file: unclear, difficult to read. More developer-oriented (with stuff like 'Nothing to do' and 'deleted' and 'new'). It doesn't directly answer the question of "can my module A be upgraded from Odoo version X to Y".

PDF: you are right, this is actually pretty much what I had in mind. But what's missing is a) the script I can run and b) documentation.

I'd be happy to work on a sprint with you to get these completed @legalsylvain !

I guess the first step would be to share the script you have right now. I can start on the documentation now, so we can fix exactly how this will work for the end-user.

@pjrobertson
Copy link
Author

One task that I think needs doing first is formalising the 'statuses' in the docsource file and potentially updating the start of https://oca.github.io/OpenUpgrade/modules130-140.html

Right now, it states there are 3 statuses:

  • Nothing to do
  • Done

But in reality more are used:

  • Merged into XXX
  • Adopted in OCA as XXX
  • Renamed from XXX
  • Recovered the module in OCA/XXXX

Should these be added to the status list, or should they be fixe in the module coverage table. My vote would be to add a 3rd column in the module coverage table for 'comments', to include stuff like 'merged into XXX'. Then use just the 2nd column for either 'Nothing to do' or 'Done'.

@pedrobaeza
Copy link
Member

#2797

@legalsylvain
Copy link
Contributor

@pjrobertson :
here is the pending WIP work : https://github.com/grap/infra_OCA/tree/11.0/odoo/local-src/migration_analysis
unfortunately, I have no time to work on that topic, but if you do, please ping me, I'll review.

kind regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants