-
Notifications
You must be signed in to change notification settings - Fork 15
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
0010 - Module Versions bump convention following PS core min version #14
Conversation
4b338d5
to
e356f33
Compare
Isn't it exactly the definition of SemVer 😅 ?
|
|
||
_I think many merchants would be surprised to see we accept that a patch version for module A requires an upgrade from the Core._ | ||
|
||
I believe that, beyond SemVer, people attach "meaning" to patch/minor/major versions bump. They expect patch versions to have some continuity and to not require a different environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we consider this dependency in a wrong way, we are not talking about a dependency that is used by the module, which is bundled in the module and which the module updates itself
PrestaShop is not just any dependency for a module, it's the WHOLE system in which the module can work. As such I'm more referring to the initial definition in semver:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
When we make a change in the module that rely on a feature that is only available in a new version of PS (let's say 1.7.7), then we change the module API which can not work on previous versions, it is a BC break. Just like when we change something in the core API we create BC change.
So in my opinion creating a BC implies bump to the next major version, it's as simple as that. It's not a semantic question about dependency or what not. It does not work any more!!
So if we need a more recent version of PrestaShop => bump to major
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However if we handled the modification depending on the core version (by comparing versions), which much more complicated to do but some core modules do it, and many external developers handle such backward compatibilities in their module with compatibility ranges sometimes from 1.5 to 1.7.7!!! In this case since the backward compatibility is respected it's bump to minor.
|
||
WHEN a new module version requires to bump the PrestaShop minimum version, | ||
|
||
IF the bump is patch (ex: PS 1.7.6.2 => 1.7.6.4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we ever have such precise dependencies, we usually only set dependencies based on minor at best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to mention this usecase, I know some of our colleagues are all about details 😏
IF the bump is patch (ex: PS 1.7.6.2 => 1.7.6.4) | ||
THEN the module version must be bumped to at least the next patch version | ||
|
||
IF the bump is minor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like such behaviour, but I'd say it is a bit biased by our way of handling semver.. Based on semver we only perform "patch" versions 😅 (third digits) But let's not stop on this and consider that 1.7.6 to 1.7.7 is indeed a minor update (as we consider it).
We only perform "minor updates" since the beginning of 1.7 but it's barely a minor update.. We limit the BC changes as much as possible but we do introduce some. We also integrate new tools, APIs and features which may be mandatory for modules when they start using it (Doctrine entities, _legacy_link, modern controllers, symfony services, ...)
These are big (major?) changes in the architecture, and module can't afford to be backward compatible without some of these features, nor can they integrate libraries as fallback to handle them. So I'd still say it's a major change in the module API which implies a major bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like such behaviour, but I'd say it is a bit biased by our way of handling semver.. Based on semver we only perform "patch" versions 😅 (third digits)
But... why? 🤔 Maybe I'm missing something, but why do we need to bump module (plugin) version only because there's a path version of the core software?
@jolelievre To clarify: when I mention PS Core minor or major updates, I'm talking about the numbers after the 1. So 1.7.3.4 is 7.3.4 for me. I ignore the 1 which has no meaning. So if I mention a minor bump, it's like 1.7.5 to 1.7.6 for me |
@jolelievre @kpodemski @PierreRambaud ADR updated to be more clear, and added a candidate suggested by @PierreRambaud a82854d |
So if I'm this understanding this correctly, if we release v1.7.8, and... we have
yes? |
If we exclude the "new module version bumps minimum PS version" usecases, @PierreRambaud is even simpler:
@PierreRambaud suggests to completely forget about BC breaks for modules because they are not useful for modules. Just use "patch", "minor" and "major" to refer to the size/impact of the changes. So improvements with BC breaks could be done in a minor version. |
@PrestaShop/prestashop-maintainers Can we host a vote or do we wait for January? |
Since everyone is on vacation, we can wait for January 😅 |
IMO the minor/major question is mostly about compatibility with PrestaShop so that we can update modules in patch versions. PrestaShop version 1.7.7.0 imports |
So if I get it you are in favor of my initial architecture change suggestion? 😉 (before the change suggested by @PierreRambaud ) |
I'm in favor of this (and only this) decision:
This part has never happened before AFAIK:
Let's keep the consensual part only to move the decision forward. BTW I have the feeling that this ADR is too argumentative. I think ADRs should be simple and objective for readability's sake: describe the problem (context) -> record decision, that's all. Keep it objective, leave the use of "I", opinions and discussion for review / issue. |
as a side note, modules also have a ps_versions_compliancy for telling which versions it works, but even core modules do not respect it but default for the max_version being the currently installed version: https://github.com/PrestaShop/ps_checkpayment/blob/dev/ps_checkpayment.php#L67 |
ADR process is onerous to follow and I will not have the time to bring this ADR to approval point. I close it as the topic was not a critical aspect. If anybody is interested in the topic, feel free to use my work to submit a contribution. |
No description provided.