Problem/Motivation

At DrupalCon Barcelona we discussed possible ways to have package_manager and automatic updates (update manager) as alpha in tagged releases of core.

Usually, alpha-stability experimental modules are removed from release branches (e.g. they stay in 11.x but would be removed from 11.1.x). However, to update a site between releases, you need.... releases to update to/from, which creates a catch-22 (sorry) situation for a module that is all about updating sites.

The solution we came up with was to prevent package_manager and update_manager from doing anything unless a dev toggle is enabled, via #1537198: Add a Production/Development toggle.

This will ensure that it can't do anything on production then, but allow it to be tested on development environments including updating from release to release.

I can't remember the details of what we came up with for messaging/interface text for this, hopefully someone else can.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3483481

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Issue summary: View changes

Changing the release branch version to 11.1.x since 11.0.x is already out with releases to make things less confusing.

catch’s picture

Title: Restrict package_manager (and update_manager) behind a dev/prod toggle » Hide and restrict package_manager (and update_manager) behind a dev/prod toggle so that they can be alpha stability in tagged releases
Issue tags: +beta target

To support #3485006: Figure out testing process for package_manager in core (from contrib) we need to have package_manager in 11.1, or release very, very early 11.2 alphas. Very early 11.2 alphas affects the entire release process, so I think we should do this issue instead.

This means not removing package_manager from the 11.1.x branch which is what we'd normally do for an alpha-stability experimental module, and instead hiding package_manger via hidden.true in package_manager.info.yml.

We also said we'd put package_manager behind a dev/prod toggle but unfortunately #1537198: Add a Production/Development toggle isn't done yet.

But.. for package_manager specifically, any arbitrary $settings key will do because it's going to be a temporary situation anyway until it's stable. So we can just do $settings['testing_package_manager'] = TRUE or whatever without worrying too much hopefully.

Then we need a hook_requirements('install') to prevent installation unless the setting is on, and a change record, and hopefully that's enough?

larowlan’s picture

I think any arbitrary settings key is fine

quietone made their first commit to this issue’s fork.

catch’s picture

Status: Active » Needs work

One comment on the MR but otherwise looks great.

quietone’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Tests are failing but I like this idea and the proposed approach. So consider this a soft RTBC when tests pass.

catch’s picture

Status: Needs review » Needs work

dww made their first commit to this issue’s fork.

dww’s picture

Status: Needs work » Needs review

I think I fixed the tests. Let's see what the bot thinks.

Meanwhile, crediting @quietone for the initial work, @catch for the detailed reviews + input, and myself for trying to fix the tests...

catch’s picture

Status: Needs review » Reviewed & tested by the community

Two very common random test failures but otherwise green. Moving to RTBC.

  • larowlan committed f4f4c8c7 on 11.1.x
    Issue #3483481 by quietone, dww, catch: Hide and restrict...

  • larowlan committed 69df78a3 on 11.x
    Issue #3483481 by quietone, dww, catch: Hide and restrict...

larowlan’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 11.x and backported to 11.1.x

dww’s picture

Sweet, thanks!

I just published the CR (https://www.drupal.org/node/3486019) and set the "Introduced in version" to 11.1.0-beta1. Hope that's correct. Please edit if needed.

Thanks again,
-Derek

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.