data-protection
data-protection copied to clipboard
Migration to version 16.0
Todo
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0
Modules to migrate
- [x] privacy - By @tde-banana-odoo - #70
- [x] privacy_consent - By @tde-banana-odoo - #71
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
Hello,
I could try to give a hand, as it is hacktoberfest. Is someone working on it, or do you have some plans for it ? As I can't really say when I will dive into it, if you have better plans I can look for something else :) .
Hi, Thibault, that would be great! We are the main maintainers of the modules, and for now we are not migrating them to 16.0, so they are free to be caught. The migration procedure may be a bit convoluted/outsider for you, used to Odoo single repository approach. Let me know if you need help or a meeting for commenting about it.
Followed various steps found in the migration doc, landed with https://github.com/OCA/data-protection/pull/69 with just the init (aka applying patches), still nothing else done. Note that I don't understand anything about the configuration files where I had a lot of conflicts (copier-answers, eslintrc, prettierrc, ...), I always took the 16.0 version ^^ .
Note that in 14.0 there are two addons (privacy, privacy_consent), while in the 15.0 branch there is only one (privacy). Is it intended ?
Weird... following technical steps in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0#technical-method-to-migrate-a-module-from-150-to-160-branch you get only changes relative to the affected module, and then you can proceed with the migration itself. The reason why we have to catch the commit history is that the branches may evolve since the 16.0 branches creation.
Note that in 14.0 there are two addons (privacy, privacy_consent), while in the 15.0 branch there is only one (privacy). Is it intended ?
This is because the second module hasn't been migrated to 15.0 yet. You can proceed with the migration the same, but changing the command to point to 14.0 instead of 15.0.
Hello,
I applied the steps based on 14, and I also have a lot of conflicts in configuration files. I kept the 16.0 version beause I don't really understand how your repositories work (lot of boiler plate when coming from standard odoo addons ^^). Anyway, it seems the code itself is correct, just that all setup / configuration files are probably broken ^^ . What I did is to already work on that branch and make first migration commits, seems to be globally working when using it (completely not finished, just giving some time when I can :) ) .
Could be great if someone can have a look / help me with those initial commits and see what is required for files like copier-answers.yml
, eslintrc.yml
, ... Don't have much time to spend on those, prefer giving some hours to make the module works :) . It is also strange that a setup
directory appears containing a duplicate of the code, is it something standard on your side ?
Cheers and sorry for those noob-to-oca-setup-thingies questions :D !
And happy diwali.
Hi @tde-banana-odoo,
I just tried this and there are no conflicts. Are you sure you did not forget -- $module
in the format-patch command?
export module=privacy
git checkout -b 16.0-mig-$module origin/16.0
git format-patch --keep-subject --stdout origin/16.0..origin/14.0 -- $module | git am -3 --keep
Hem... I might have copy-pasted without seeing that $module was actually a variable. It's post OXP for everyone :roll_eyes: ... then ok, no conflicts since it applies only privacy and privacy_consent patches, thanks :) .
:) we probably need to clarify that wiki page too.
Having currently an error I don't really understand (see https://github.com/OCA/data-protection/actions/runs/3311887415/jobs/5467882622 ), what is the underlying issue ?
Run newfiles="$(git ls-files --others --exclude-from=.gitignore)"
Please check-in the following files:
setup/privacy/odoo/addons/privacy
setup/privacy/setup.py
setup/privacy_consent/odoo/addons/privacy_consent
setup/privacy_consent/setup.py
Error: Process completed with exit code 1.
The pre-commit step that runs the linters is finding a few missing files.
You need to
- install pre-commit (TL;DR
pipx install pre-commit
) - run
pre-commit run --all-files
- check the result and commit files it has generated
I fought against upgrade team to never use pre-commit ... but hey, sometimes you have to evolve.
pre-commit automates a lot of checks and auto-transformations that has allowed OCA to get a very high level of standardization, so I'm happy with it. I have create a wiki page for installing pre-commit
: https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit, plus added the reference in the migration guide.
Yep, I was the one who had to evolve :D I agree it can be necessary, anyway that's not the purpose of this issue to talk about tools :)
Indeed. If you want that we talk to your team/colleagues about pre-commit, just tell us and we arrange a meeting.