Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drush cc all and other non-web tools can't clear MTimeProtected directories because of file perms. See #1899842-8: MTimeProtected Directory Grief.
Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#1 | container_rebuild.patch | 2.27 KB | moshe weitzman |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedAs promised.
Comment #2
Fabianx CreditAttribution: Fabianx commentedI am not sure that the allowDumping is not only a flag that is set.
I would directly check the filesystem service like done in dumpContainer if things are writable. (as pasted in IRC - can't find the log atm.)
Comment #3
pounardDoes this mean one extra SQL query per page or did I misread the issue?
State API might be useful but for a so low level stuff it seems dangerous (framework not fully bootstrapped, how am I sure the k/v store is fully init yet?) and overkill.(once again one more SQL query, and there's already a lot of gratuitous k/v access during normal runtime).
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedFor default installs, it would be an extra query. Sites that want to optimize that can choose a key/value for state system. An alternate state driver might choose to do one DB query for all data in state. We don't use it too much so that seems feasible to me.
By definition this code only works once the container exists so I'm assuming that state() is available.
Can you suggest an alternate approach?
Comment #5
pounardNo, sadly I can't, I just wanted to point out that out. Using a service for rebuilding the service container seemed a bit wonky to me.
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedRunning command line tools under a different user then the web server is asking for trouble sooner rather then later.
I don't see how this is different then any other permission issues you are going to bump into in that case. It feels like we are trying to workaround a server/environment configuration issue here.
Comment #7
pounardI fully agree with #6, it's not really Drupal's code's cross to bear.
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedFor the moment, Drush is going to pursue a different strategy which is to write a patch to let folks optionally open up their MTime directories by making a settings.php modification. We'll open this back up if that effort is not fruitful. No issue to link to just yet.
Comment #9
chx CreditAttribution: chx commentedI always thought we will cache some of state... maybe.
Comment #10
pounard@#9 This would be a great thing to do indeed.
Comment #11
BerdirIt would be an even better thing if you'd all review my patch #1786490: Add caching to the state system :)
Comment #12
dawehnerThe original issue:
Is no longer an issue with using the cache subsystem for the container.
On top of that, I thought its always recommended to run drush with the webserver user.