Problem/Motivation

There are a couple unwritten rules around how to make a patch for the current minor version, for example use underscores for method names.

Proposed resolution

  • Use underscores in front on new method names to avoid conflicts ...
  • Try to always make the least amount of changes
  • meh

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

alexpott’s picture

Just dumping some things to think about too....

  • hook_update_N minimise them in patch versions?
  • post updates minimise too?
  • String changes / additions?
  • Bugs vs tasks
  • Experimental
  • Test system - allow additions but not change?
catch’s picture

Mark underscored things @internal in the backport patch and add a note that they'll be removed is another unwritten rule.

Strings a big part of it is whether they're visitor/content editor/admin/developer facing.

xjm’s picture

xjm’s picture

Strings are covered in:
https://www.drupal.org/core/d8-bc-policy#strings

The D7 policy has more specific (probably too much) detail:
https://www.drupal.org/node/1527558
https://www.drupal.org/core/d8-allowed-changes#patch
https://www.drupal.org/core/d8-allowed-changes#minor

So it would be good to know what the goal of this issue is, e.g., whether it's to add an explicit how-to for backporting etc. OTOH we also adopted the policy that we default to committing borderline things to the dev minor only and only backport things that are easy/safe or high priority. So I can also see a case for not adding a whole section about how to backport things when we want it to be the exception rather than the rule for things that are not major/critical bugs etc.

catch’s picture

@xjm I think Daniel opened it for a 'howto for backporting'. If we did add a section we could say it's only for major/critical bugs.

dawehner’s picture

Yeah someone actually literally asked me how to backport a specific patch to 8.1.x, so I assumed there is documentation how to do that. Turns out, there is not too much.

hook_update_N minimise them in patch versions?

Regarding hook_update_N, I think we should specially try to limit those who change existing data structures, like config, and favour the ones which just adds data.

post updates minimise too?

They are much less of a problem IMHO, but still the same (edit vs. add) applies.

String changes / additions?

So IMHO we should remove string changes. IMHO string additions are fine, maybe not in super common UIs. Of course they should be avoided as much as possible

Bugs vs tasks

There has to be a really compelling argument for tasks. Not sure though how tasks are backported different than bugs.

Test system - allow additions but not change?

Ideally existing tests shouldn't have to be touched.

catch’s picture

Updates are more problematic than that, per #2743297-8: Mis-named update function in views.

We add views_update_8102() for issue 123456 - this is added to 8.2.x then backported to 8.1.x

Then we add views_update_8200() for issue 654321 - this is added to 8.2.x, then never gets backported.

Then we add views_update_8103() for issue 321654, this is added to 8.2.x then backported to 8.1.x

If you are running 8.2.x-dev (or if we're in beta/rc), then views_update_8103() will never run on your site, because your schema version is 8203(), despite being in both branches and with no conflict between patches.

So within the constraints of the current update system, we'd have to have views_update_8103() set a state entry like views_update_8103_has_run, then in views_update_8203() we check that state entry, and if it's not there make the same changes again (otherwise it could run twice instead of never, which can have its own problems).

This is both hard to explain, and also hard to spot when it happens, so just not backporting hook_update_N() unless it's a very, very critical issue would be best. Of course we could also add centralised docs explaining why it's such a bad idea and hard to do properly.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Title: Clarify the policy around backporting changes with potential issues » [policy, no patch] Clarify the policy around backporting changes with potential issues

Adding to my policy review list.

catch’s picture

I think @xjm's sentence here still describes the status quo several years later

OTOH we also adopted the policy that we default to committing borderline things to the dev minor only and only backport things that are easy/safe or high priority.

I still see quite a few cases where people ask why x somewhat tricky bugfix hasn't been backported, was going to say we should add a note about it to https://www.drupal.org/about/core/policies/core-change-policies/allowed-..., but it's already on there. We should probably update that issue for the 'main' branch though now we're always targeting issues at that branch and moving the issue to an older branch only if we commit the backport there.

quietone’s picture

Status: Active » Closed (outdated)

I agree the docs need updating and have made a note on #3294814: [Policy] Branch Naming: Use an 11.x branch for HEAD, then use 'main' when d.o can support it as well as adding to my to do list.

Since current practice is documented and the policies have been updated since 2016 I am closing this as outdated.

quietone’s picture

Version: 11.x-dev » 10.2.x-dev

Changing to latest version when this was closed.

xjm’s picture

Crediting discussion participants.