OCA / server-auth

https://odoo-community.org/psc-teams/tools-30
GNU Affero General Public License v3.0
150 stars 403 forks source link

[16.0][MIG] auth_oauth_multi_token: Migration to 16.0 #584

Closed ChrisOForgeFlow closed 6 months ago

ChrisOForgeFlow commented 9 months ago

Reopen from https://github.com/OCA/server-auth/pull/513

@ForgeFlow

ramiadavid commented 6 months ago

@ChrisOForgeFlow Please, can you make the changes that @pedrobaeza requires in this comment? https://github.com/OCA/server-auth/pull/513#discussion_r1193171200

mlaitinen commented 6 months ago

@ChrisOForgeFlow Please, can you make the changes that @pedrobaeza requires in this comment? #513 (comment)

There's a surprising eagerness to enforce a rule that doesn't seem exist in the OCA guidelines.

ramiadavid commented 6 months ago

It's simply being practical, if whoever can do the merge tells me to change it, I change it so as not to delay it.

On the other hand, from a personal point of view, I consider that there is no reason in a migration to make changes that in no way affect its operation, simply because I like it more one way or another, but rather to do the minimum. possible changes, so that future fixes are easier to apply across different versions.

And getting into unnecessary discussions, the only thing that usually results in is delaying the availability of the module, meaning that practically after 1 year this module is still in process. I prefer to migrate the module as it is and in any case make another pull request afterwards to apply those changes, in which case if it is delayed we can use the module normally.

pedrobaeza commented 6 months ago

@mlaitinen @ramiadavid the principles to ask for my change are:

Do you still see my comment as irrelevant?

mlaitinen commented 6 months ago

Reduce the diff at maximum. This way, any query to debug a problem is not distorted with changes that don't impact in the migration. We are all impulsed to do some "refactoring" sometimes to match a style or preference at the same time we do other task, like migrations, I know that, but the way to do it if we want this is to isolate these changes in a specific commit. And in the end, it doesn't worth the change most of the times. I have touched modules that are not mine, and ending up simply going to the specific patch.

Having reviewed plenty of PRs, I generally agree on minimizing the diff, but mostly when the changes don't have any effect at all (e.g., unnecessary code style changes), or when the commit gets bloated to the point where it actually makes the review unnecessarily difficult. My commit had 11 changes directly attributable to the corrections in capitalization, which I don't think is too much to make the review difficult, and I also don't think the changes were unnecessary.

You have a good point about isolating these kind of changes to a separate commit, but I wasn't sure if migration PRs with more than one [MIG] commit would've been accepted, let alone a separate commit before or after merging the PR, since it's unlikely that anyone would use their precious time to review a PR with format changes only.

I haven't found a clear reference from an official institution about the capitalization you mention.

I realize now I should have explained my change as "making the capitalization consistent with Odoo's other titles", rather than following English capitalization rules. If all other field names and captions in Odoo wouldn't follow the capitalization rules, of course I would adapt to that, to maintain the consistency of the user interface. In the screenshot below, I marked all of the captions of this module in red, and all Odoo captions with blue: consistency

Odoo, by default, capitalizes the words in the titles in cases where the explicit field string is omitted.

Finally, and the most important one, changing the texts, you are leading to lose all the existing translations, which are very valuable, and shouldn't be discarded by no strong reason.

While it's a valid argument in general, it would only apply to this particular case if any translations existed when I submitted the PR. There were none in May 2023.

Do you still see my comment as irrelevant?

Absolutely not, and never did. We can all see your valuable work that you do for OCA and Odoo. Thank you for that, and for addressing this question.

OCA-git-bot commented 6 months ago

This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-584-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot commented 6 months ago

Congratulations, your PR was merged at efac732457f34f9091066cd71fbec35033873d91. Thanks a lot for contributing to OCA. ❤️