Skip to content

0017 - Add our backward compatibility promise#25

Merged
eternoendless merged 9 commits intoPrestaShop:masterfrom
PierreRambaud:backward-compatibility
Jul 25, 2022
Merged

0017 - Add our backward compatibility promise#25
eternoendless merged 9 commits intoPrestaShop:masterfrom
PierreRambaud:backward-compatibility

Conversation

@PierreRambaud
Copy link
Copy Markdown
Contributor

@PierreRambaud PierreRambaud commented Mar 24, 2022

Questions Answers
Description? Try to explain our backward compatibility promise

Votes

Vote

Maintainer Vote (✅ or ❌)
@atomiix
@eternoendless
@jolelievre
@kpodemski
@matks
@matthieu-rolland
@NeOMakinG
@PululuK
@sowbiba

@PierreRambaud PierreRambaud changed the title Add our backward compatibility promise 0017 - Add our backward compatibility promise Mar 24, 2022
@PierreRambaud PierreRambaud marked this pull request as ready for review March 24, 2022 13:47
Copy link
Copy Markdown
Contributor

@matks matks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some first comments :) but nice job

Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Copy link
Copy Markdown
Contributor

@jolelievre jolelievre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm this is interesting ^^

I commented most of my worries, the biggest one being the possibility of changing services constructor parameters. That said if we formalize the use of the @internal tag and use it extensively (meaning we would need to go through all our services before releasing the v8 to clearly state which are public and which are not) then it might limit my worries

If we do so I would add a breaking change: Turn "public" code into "internal" one

Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Copy link
Copy Markdown
Contributor

@matks matks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PierreRambaud there is some things confusing between sections 😅 is this because you are right now re-writing the ADR?

Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
| Queries | No |
| QueryResult (constructor) | yes |
| QueryResult (getters) | No |
| | |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, IMO CQRS philosophy asks more attentions to command than queries. Queries can easily be duplicated cause they don't impact data and application as deep as commands.

Comment thread 0017-backward-compatibility-promise.md Outdated
@matks
Copy link
Copy Markdown
Contributor

matks commented May 3, 2022

@PierreRambaud Would you like that I continue applying feedbacks on this ADR?

@PierreRambaud
Copy link
Copy Markdown
Contributor Author

@matks Of course! Do whatever you want with this :)

Comment thread 0017-backward-compatibility-promise.md
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Copy link
Copy Markdown
Member

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedbacks

@matks
Copy link
Copy Markdown
Contributor

matks commented May 22, 2022

@eternoendless @Progi1984 @atomiix @jolelievre I updated the ADR please read again

Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Copy link
Copy Markdown
Member

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some feedbacks.

PierreRambaud and others added 5 commits May 30, 2022 10:35
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: Jonathan Lelievre <jo.lelievre@gmail.com>
Co-authored-by: Pablo Borowicz <pablo.borowicz@prestashop.com>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: Pablo Borowicz <pablo.borowicz@prestashop.com>
Copy link
Copy Markdown
Contributor

@matks matks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good first version, enough for our current needs. We can update it as we find new usecases.

Copy link
Copy Markdown
Member

@eternoendless eternoendless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @matks

I think we can adopt this first version and add (or remove) stuff as needed in the future.

Copy link
Copy Markdown
Contributor

@jolelievre jolelievre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few suggestions, but basically agree to the ADR I don't know if this should be fixed before merging?

Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md Outdated
Comment thread 0017-backward-compatibility-promise.md

#### Experimental Features

Experimental Features and code should be marked with the tags `@internal` or `@experimental` .
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both tags have a different meaning even if they imply the same concept that we don't promise anything:

  • @experimental is some code still under development that may change until it's officially released
  • @internal is a released production code, that is technically extendable (no final) because we may need it internally, but is used for internal purposes and can be modified at will

I think we should detail the difference somewhere, probably a dedicated paragraph for internal

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think internal components could (and probably should) be described in a new ADR. Why don't you submit a proposal?

Comment thread 0017-backward-compatibility-promise.md
Comment thread 0017-backward-compatibility-promise.md
Co-authored-by: Jonathan Lelievre <jo.lelievre@gmail.com>
@matthieu-rolland
Copy link
Copy Markdown

I have a question regarding the form simplification PRs we have...

Is changing the template of a form using form_widget instead of rendering it field by field... considered a BC Break even if it doesn't change the HTML in the end (because all classes, wording etc are transcribed in the form type)

I would say no but I'd like some other dev's input here 🤔

@jolelievre
Copy link
Copy Markdown
Contributor

I have a question regarding the form simplification PRs we have...

Is changing the template of a form using form_widget instead of rendering it field by field... considered a BC Break even if it doesn't change the HTML in the end (because all classes, wording etc are transcribed in the form type)

I would say no but I'd like some other dev's input here 🤔

Since the layout doesn't change I don't think it's a BC break it's more like refacto: a different way to attain the same result

I also have one last question: so with this ADR we allow, for example, to change a service constructor's parameter when it's built by the Symfony DI. So our policy allows to do it (also we should try to limit such changes as much as possible), but does it mean we don't need to flag the PR as BC break and not document it? Even if the policy allows it it's probably a good thing to document and warn the community.

Similar question regarding the experimental code (tagged with @experimental) this time however I don't think it's relevant to flag PRs or to document such code modification since the code is by essence destined to be modified until it's still considered experimental.

Maybe those two questions could be answered in a dedicated ADR that comes as an appendix for this one? I'm not sure if the BCbreak documentation is really an architecture decision, it's more about the Project management but if it's not defined here I'm not sure where it should be? 🤷‍♂️ If not in this repo then maybe in this one?https://github.com/PrestaShop/open-source

@matthieu-rolland
Copy link
Copy Markdown

I also have one last question: so with this ADR we allow, for example, to change a service constructor's parameter when it's built by the Symfony DI. So our policy allows to do it (also we should try to limit such changes as much as possible), but does it mean we don't need to flag the PR as BC break and not document it? Even if the policy allows it it's probably a good thing to document and warn the community.

I think if people use the services definitions properly, they won't have to worry about the modifications made in the constructor. If it's a problem for them they are probably doing something wrong like instantiating it manually or doing an override manually... and marking it as a warning would validate this wrong behavior...

But maybe I didn't think of a legitimate use case ?

@matks
Copy link
Copy Markdown
Contributor

matks commented Jul 11, 2022

I also have one last question: so with this ADR we allow, for example, to change a service constructor's parameter when it's built by the Symfony DI. So our policy allows to do it (also we should try to limit such changes as much as possible), but does it mean we don't need to flag the PR as BC break and not document it? Even if the policy allows it it's probably a good thing to document and warn the community.

I think people do not care about labels on the PR. What they care about is the list of BC breaks in the devdocs. They will not check every single PR for each BC break.

I think we could mark these modifications in a dedicated section on devdocs 8.0.0 BC breaks page, we can call them 'things that look like BC breaks BUT actually they're not' 😆 . The idea is to provide the information and let users choose what to do with it.

Comment thread README.md
0017 | 2022-04-17 | [Pull Request][0017] | Backward compatibility promise | 💬 In discussion
0018 | 2022-05-16 | ~ | [Horizontal migration][0018] | ✅ Accepted


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless change :)

@PierreRambaud
Copy link
Copy Markdown
Contributor Author

PierreRambaud commented Jul 24, 2022

Could you please go a little bit faster with this one, I need to clean up my GitHub forks :)

@matks
Copy link
Copy Markdown
Contributor

matks commented Jul 25, 2022

@PierreRambaud Sorry about delay 😓 2 weeks ago we were close to be able to close the topic with a group agreement however we found some little funny thing and it got delayed

@PierreRambaud
Copy link
Copy Markdown
Contributor Author

I give you one more week, but maybe you can merge it and keep the ADR in discussion.

@eternoendless
Copy link
Copy Markdown
Member

We have 6 approvals, I think we agree on the basics, and I see no fundamental dissent in the discussion. Details can be ironed out in documentation, and any further decisions can be recorded in future ADRs. In the spirit of lazy consensus, I'm calling this ADR as accepted.

@eternoendless eternoendless merged commit c7a4753 into PrestaShop:master Jul 25, 2022
@PierreRambaud PierreRambaud deleted the backward-compatibility branch July 25, 2022 13:42
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

Successfully merging this pull request may close these issues.