OCA / oca-github-bot

The GitHub Bot of the Odoo Community Association (OCA)
MIT License
41 stars 60 forks source link

[RFC] rename migration folder #129

Open legalsylvain opened 3 years ago

legalsylvain commented 3 years ago

When making a patch on a migration script, we have to rename the migration folder with the same name as the bumped revision. It could be automated.

I think that it could be an option of the ocabot. like bump-migration. the patch / minor / nobump / major is a choice of the people that are merging. (maintainers) not a choice of the developper.

CC : @sbidoul : what do you think ?

Ref : https://github.com/OCA/server-ux/pull/213/

sbidoul commented 3 years ago

Sounds interesting.

hparfr commented 5 months ago

Hi,

I think we can achieve it if in the merge requests we:

1) should be possible according to odoo

        A special folder named ``0.0.0`` can contain scripts that will be run on any version change.

2) with a temporary / throw-away version number like major.minor.patch+1

hparfr commented 5 months ago

FYI @sebastienbeau

legalsylvain commented 5 months ago

tell the developper puts the migrations scripts in the directory 0.0.0/

That can not be asked to developpers. Sometimes, it is not possible to write idempotens scripts.

hparfr commented 5 months ago

I don't think migrations scripts have to be idempotants.

It should allow to run migration scripts and do not generate conflicts on github/oca pull requests.

With my proposal we may break the workflow when someone checkout pr - branches instead of stable.

One should adapt his tooling to manage modules containing a migrations/0.0.0 by doing the kind of steps (increment manifest and name the migration directory with the good version) to apply after the checkout instead of in the PR.

legalsylvain commented 5 months ago

I didn't understood your proposal i think. On the meantime, i'm not sure to be agree with what i wrote 3 years ago. Let's talk about that topic in the next oca days.