-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Guideline to prohibit or allow the addition of dependencies on stable modules #193
Comments
additional considerations:
|
In my book: stable mature |
I was meaning to support your position: No new dependencies on mature addons, don't we agree there? |
Yes, first of all, I wanted to put the comment on the other thread (just done). Sorry for mixing. And thanks for your support :) About your statement, indeed, that's something assumed, but we can clearly put it on the guidelines. Anyway, the system can be tricked, as some modules may not be yet consider mature (because also nobody has risen up the development status), and thus, people use it as a strict rule. That's why always PSC or core contributors may have the right for the final word. |
+1 @hbrunn
mature
no new python dependencies, no new Odoo dependencies (authors/maintainers should not override)
I would avoid any mayor changes in stable and mature modules on stable Odoo versions. It's a nightmare when tracebacks starts happening in production instances due to an OCA module mayor change. It can cause a lot of headaches.
I would allow changes on PRs on module migrations accross Odoo's versions since migrating a customer's instance means reviewing almost everything in test environments so it's easier to fight with it.
My2cents
|
sure, migrations should be free game (for as far as it makes sense technically of course), if that's not implied, let's add an explicit sentence about that |
Hi all. Thanks for your contribution ! The objective of this issue is to define a general rule. (of course, exceptions happen).
If we apply the current interpretation, this means that 91% of the modules are intended for testing and pre-production and 9% for production. this is simply not true. My fear is that defined a rule based on the concept of maturity (which is itself not mature!), we're not solving much.
Thanks @anajuaristi. Could you elaborate that point ? As said in my first message, I don't understand how production instances can be broken. The deployment workflow has to be stopped at pre-production / test stage. Thank you for clarifying things for me (we don't all have the same way of working). |
It is true that it fails in pre-production if you have defined several stages but:
I have suffered several headaches for change decisions on base modules defined as Beta but used in a lot of places that are modified and a lot of other modules start to fail. Even in modules where I am maintainer and original author. Then someone needs to apply patches to fix this kind of changes. For example: OCA/edi#540 (comment) For that reason, it is recommended to avoid this kind of changes. I have done it in modules that have low repercussion just to avoid this kind of issues (For example: OCA/sign#14 ) I don't understand the real problem on doing this kind of patch if so many people from several companies and environments have asked for it. |
Elsewhere, we have established that OCA follows a SemVer approach to versioning. So breaking changes of any kind are allowed under certain conditions, such as:
In that framework, to me, adding or changing dependencies should be considered as any other breaking change. So not forbidden, but also not to be done lightly. |
I find the 3rd point of your answer rather off-topic.
If I didn't understood correctly, could you reword ? If I understood correctly, could you provide a PR in the current guidelines repo to explicit that point. @etobella : Thanks for your clarification. A last point that is not clear for me.
I don't get how update is "applied automatically" in production, if test / pre-production fails. Or did I misunderstood your sentence ? |
I'm getting tired of expending a lot of time contributing, and a lot of time trying to justify some actions and not being heard about some changes petitions that don't cost too much, so I'm on the edge of abandoning both things and go on my way. |
To be clear my #193 (comment) above is a general point of view on the matter of dependencies and breaking changes, and not an opinion on the discussion on the PR that apparently triggered this particular thread (which I don't have time to delve in now). For what it's worth, I do sincerely appreciate the work you do for OCA, Pedro. Negotiating solutions to diverse requirements is sometimes complex but normal in open source, and especially exacerbated in OCA where often ownership of modules if diffuse or shared among many people and companies. |
@legalsylvain this message from @pedrobaeza in perspective with this perfectly illustrates what I mean. One may not like it but this is my experience and IMHO we should avoid at all cost draining main contributors energy. |
Hi all,
Sometimes, contributors proposes a PR that changes the dependency of a module. A recent case is here : OCA/server-ux#963, that propose to make
server_action_mass_edit
16.0 depends ononchange_helper
. For the time being, AFAIK, there is no OCA rules that forbid such changes. Some sentences in the guidelines might suggest that this has been authorised. Exemple:When introducing breaking changes, it is expected that you include instructions or scripts to facilitate migration on current installations. Ref
However, if I understood correctly, some people says it is forbidden because it can break production instance when updating module.
Here is the place to debate this subject !
My point of view on that topic:
it should be allowed when it is interesting. (if it adds new interesting feature, if it generates a more robust and complete module, if it fixes a bug, etc.) at the condition that it doesn't force to install many modules by dependency. So add a new dependency to a module that depends on
base
orweb
only is OK for me, because all instances are using it. It so should be forbidden if it forces to install main application that we don't want. Theoritical exemple: Insale_triple_discount
(OCA/sale-workflow), add a dependency topurchase_triple_discount
will force to install the mainpurchase
module. In that case, a glue module is the solution.it should be allowed when it allows to mutualize substantial amounts of code. A very recent case occured in OCA/geospatial repo:
web_view_leaflet_map
provides a new view to see any model on a map. For that purpose, it was introducing the leaflet.js library. (See PR two years ago : [ADD] web_view_leaflet_map (use leaflet.js library to have map views) geospatial#310) Recently, a new OCA/web module has been proposed here that provides a new map widget, based also on the leaflet.js library. To avoid to have many modules introducing the same library (possibly different versions, conflict, etc...) I splittedweb_view_leaflet_map
intoweb_view_leaflet_map
andweb_leaflet_lib
and makeweb_view_leaflet_map
depends on the newweb_leaflet_lib
module. This addition of a new dependency has been accepted on a existing module here two weeks ago.For some UX feature, it is possible to make a lazy dependency. That's the case for exemple for the module
web_tree_dynamic_colored_field
. For exemple, the OCA/margin-analysis module namedproduct_pricelist_margin
(see installation documentation) does'nt force to installweb_tree_dynamic_colored_field
, but extra UX feature will be available if the module is installed. Similar situation occures with purchase_order_product_recommendation or sale_order_product_recommendation that have a better UX experience ifweb_widget_numeric_step
is installed. However, for python code, a lazy dependency generate codes that are fully untestable. Having parts of code that are completely untested and that are triggered if a module is installed seems risky and lowers code coverage, reducing the quality of the module.I don't really understand how it can break production deployement.
Let's leave aside deployments using pip (which I'm not very familiar with). In this case, I think there's no problem because pip update will install the new dependencies. (@sbidoul or other acsone members, can you confirm this point?).
Let's take the case of deployment using git pulls with several repos. Indeed, if we only have the OCA/server-ux repo with
server_action_mass_edit
installed and the module now depends on theonchange_helper
module which is in the OCA/server-tools repo which is not pulled, the deployment will fail.However, for the moment I've seen 2 types of deployment:
Yes, if a dependency is added the test will fail, and we'll have to correct it by adding the reference to the repo or the module, but the Odoo error message is explicit, and the solution takes 2 minutes.
I don't see how a production instance could break without anyone noticing.
After that, test instances exist because unexpected things can happen.
Could those who are against this type of change explain their fears?
CC : @grindtildeath, @pedrobaeza, @hbrunn, @rousseldenis, @ivantodorovich, @etobella, @ValentinVinagre, @dreispt, @mmequignon
Thanks a lot for your remarks !
The text was updated successfully, but these errors were encountered: