Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
update.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Apr 2025 at 18:45 UTC
Updated:
21 May 2025 at 18:29 UTC
Jump to comment: Most recent
Comments
Comment #3
dwwComment #4
nicxvan commentedMinor comments.
Comment #5
dwwThanks! Applied suggestions. Leaving the thread about moving the test into a new class open to see if anyone else has a strong opinion.
Comment #6
smustgrave commentedThanks to our new gitlab bug I can't drill down into the test failures.
Comment #7
dwwThere are no failures. The failure was the pipeline never started. Longwave and Drumm seem to have sorted it out.
I’ll push a no-op commit to hopefully trigger a new pipeline.
Comment #8
dwwYay, the pipeline really ran. However, there seem to be failures, after all. 😂 I’ll look more closely when I’m at my laptop.
Comment #9
dwwWas calling the deprecated method from hook cron, which caused any tests that enable update.module and invoke cron to trigger deprecation notices. Removed that from cron, and now the pipeline is all green. Back to NR.
Comment #10
nicxvan commentedWhat is the full status of this initiative? Does this change need a CR?
If this piece is just clean up then I think we're ok, however, since we're deprecating things I think we need to notify people that disk cleanup won't happen anymore, and they are using anything they may want to add it to their own hook_cron in the interim.
Comment #11
dwwAll the new deprecations reference the CR from the parent issue. If we’re happy and this lands, I’ll update that CR to mention these other deprecations. Assuming this ships in 11.2, seemed silly to use a separate CR for it. See the parent issue and linked CR for more.
Thanks!
-Derek
Comment #12
dwwp.s. This specific disk cache cleanup method is only cleaning up a cache of tarballs downloaded for the deprecated and removed “Update Manager” stuff. So nothing would be populating this cache, so no need to garbage collect it.
Comment #13
nicxvan commented12 answers my question, I thought that was true, but wanted confirmation.
Comment #14
dwwTo make #11 explicit, adding the tag. I hereby solemnly swear to make the updates once this is committed...
Comment #15
dwwAdded a remaining task, probably for release managers:
Decide if we should explicitly mark the
allow_authorize_operationssetting itself deprecated insites/default/default.settings.phpandcore/assets/scaffold/files/default.settings.phpComment #16
nicxvan commentedDo you want to just do it to be safe? Or open a follow up? I'm hesitant to mark this as ready until then.
Comment #17
dwwAdded a few more remaining tasks for decisions, and tagging for release manager review.
Comment #18
dwwPer @berdir in Slack, #3518822: Convert template preprocess hooks in core/includes/theme.inc is related. We also forgot the
authorize-reporttemplate and preprocess. I pushed 2 commits for those, 1 to properly deprecate the template and preprocess, and another to add@deprecatedcomments toauthorize-report.twig.htmlfiles (both system and stable9). Can revert the last one if that's not desirable for some reason.Comment #19
dwwAdd authorize-report to summary, and move the list of deprecations to the API changes section.
Comment #20
andypostI find it better to file specific CR as all this changes make sense and disruptive enough to reference for developers, moreover summary is perfect!
Comment #21
quietone commentedRegarding point #2. Having a change record associated with the single issue where the change was made makes sense. It is then easier for anyone who wants to know more to read that one issue instead of searching several issues. The text of the change record can always add a reference to other issues.
Comment #22
dwwThat's 2 votes in favor of a new CR for this issue. Created https://www.drupal.org/node/3522119 and moved all the deprecations to point there. Removing the tag.
Noticed I also missed
_update_manager_unique_identifier(). That's not used for the fetch URL to be able to aggregate anonymous usage stats per site. It's only used for the name of the disk cache subdirectories.Comment #23
nicxvan commented_update_manager_unique_identifierdoesn't need to be deprecated though, it starts with an underscore.It never hurts to be extra safe.
Maybe we need an issue to track everything that should be deleted outside the deprecations?Re-read the comment and realized you already deprecated, the normal processes will take care of it for drupal 12 removal.
Comment #24
nicxvan commentedFor the final point 3. I think we do want a post update hook but that would be part of drupal 12, so maybe a follow up for that, you want it to run after you cannot possibly add new files there.
Comment #25
dwwRe #23: see #3502975: Remove all legacy code related to authorize.php and FileTransfer from 2 parent issues up. Yeah, we probably don’t *need* to deprecate all of this, but it seems safer to be complete at this point.
Comment #26
catchYes a follow-up for #24 for once Drupal 12 is open sounds good.
Comment #27
dwwI'm not convinced the
post_update()needs to be in 12.0. We've already removed all the UI that could trigger any of the code paths that put files in these temp directories. Some of that shipped in a previous release, the rest will be in 11.2.0. Can't we have apost_update()in 11.2 itself that removes these directories? Why leave them around for years? We mention cleaning them out at the CR. Probably also would in release notes. Why wait another major release for apost_update()to automate that? Once a site is running 11.2.0 or higher, nothing could be populating these directories unless we now believe there are contribs or custom code out there using any of this plumbing. Seems like those folks are on their own, and can be responsible for removing the directories again when they're really done.But core will already be done the moment we're on 11.2.0. So if we're going to do a
post_update()at all, seems best to do it right here in this issue.Meanwhile, any release manager thoughts on remaining task #1:
allow_authorize_operationssetting?Thanks!
-Derek
Comment #28
dwwRe point #1:
allow_authorize_operationssetting:My proposal would be to remove it from the
default.settings.phpfiles for new sites, but not formally "deprecate" the setting and generate warnings if sites have used it to opt-out of the Update Manager already. No real harm in leaving it insettings.phpfiles, even if it's being ignored, right?Maybe that is worth a D12 follow-up to formally deprecate the setting and trigger warnings about still having it defined?
Comment #29
dwwPer Slack discussion with @nicxvan, decided to:
update_post_update_clear_disk_cache()here to clean out the cache already. Then we don't have to mention that in any release notes. Updated the CR accordingly.allow_authorize_operationsfromdefault.settings.php.I'm reluctant to already deprecate the setting. In theory, if any contrib or custom code is still using any of the deprecated code paths, the
allow_authorize_operationskillswitch still might be validly preventing weirdness. So we don't want people to remove that from theirsettings.phpfiles until all the code that it kills is already dead and gone. Wearing my former security team hat, any site that already used$settings['allow_authorize_operations'] = FALSE;gets a gold star for wanting to manage their site code in a better way. I don't want to nag them to remove that killswitch until we're absolutely sure nothing is relying on it.Comment #30
catchI think it's OK to do #3522327: Deprecate the 'allow_authorize_operations' setting, the point about waiting to bother people who already opted out makes sense.
#27 is a good point, if we don't think anything can populate those directories, might as well remove in 11.2
Comment #31
dwwGreat, thanks! Crossed 1 off the remaining tasks.
Last point that needs a decision is remaining task 4:
Then I think a release manager can remove the “ Needs release manager review” tag and this could be RTBC.
Thanks!
-Derek
Comment #32
catchI don't think we need explicit test coverage for that - we have implicit test coverage in that the update will run during update tests. Removing the RM review tag.
Comment #33
dwwGreat, thanks again!
Comment #34
nicxvan commentedThis looks great, I confirmed it deprecates what it claims, all messages look right.
Confirmed the CR outlines all deprecations.
All deprecation messages look correct.
All remaining tasks have been completed and the correct signoffs have been given I believe.
Comment #36
catchSome of the methods here probably don't really need deprecating, like underscored functions, but also deprecating them means we don't need to find them all again to remove in 12.0.0 and it doesn't do any harm.
Committed/pushed to 11.x, thanks!
Comment #38
dwwFantastic, thanks!
I published the CR. I also added a note to the 1st Update Manager deprecation CR to link to this CR.
Glad this landed so we can cleanly remove all this stuff once 12.x is open. 🎉
Thanks again!
-Derek