Suggested commit message
git commit -m 'Issue #2487592 by Schnitzel, alexpott, cilefen, joshi.rohit100: CMI: don'\''t ship with a default "active" directory that is empty in most Drupal installations'
Problem/Motivation
We used to have an active CMI config directory which actually contained configuration, but with #2161591: Change default active config from file storage to DB storage we have the active configuration in the DB.
But still we ship with an active directory, which is empty all the time, unless you install a contrib module like https://www.drupal.org/project/config_devel that saves the configuration again in a directory.
But not a lot of Sites will have that installed.
And also I've seen a lot of developers being confused about an empty active configuration directory and wondering that something is broken or so.
Proposed resolution
Don't create an active directory per default, let contrib modules that need that work via the requirements system to tell the users that they should create a new config directory
Remaining tasks
- Agree (done)
- Write Patch (done)
User interface changes
-
API changes
-
Beta phase evaluation
Issue category | Task because it is not an actual programming Bug. More a DX Bug. We create an active directory but never use it by default, which can be confusing and misleading for Developers. Actually this already happened to Amazee Labs and our environments. |
---|---|
Issue priority | Major because CMI is a new system that nobody really knows yet, the less confusion be bring with it, the better. |
Disruption | This will break some contrib modules that expect an active config, like config_devel or drush. But both maintainers of these contrib modules already agreed to the change and will update their modules. |
Change Notice
Comment | File | Size | Author |
---|---|---|---|
#40 | cmi_don_t_ship_with_a-2487592-40.patch | 21.23 KB | cilefen |
#37 | interdiff-35-37.txt | 448 bytes | JeroenT |
#37 | cmi_don_t_ship_with_a-2487592-37.patch | 21.23 KB | JeroenT |
#35 | interdiff-34-35.txt | 5.36 KB | JeroenT |
#35 | cmi_don_t_ship_with_a-2487592-35.patch | 20.67 KB | JeroenT |
Comments
Comment #1
alexpottWe need an beta evaluation. I've tried to do this is a bc compatible way that ensures that config_devel should still work.
Comment #3
alexpottVery odd file.
Comment #6
chx CreditAttribution: chx commentedEh, you can break config_devel. We will figure it out. We can write the name of the directory into state and create a dir in sites/default/files. Leave me an IRC tell when this happens, thanks!
Comment #8
moshe weitzman CreditAttribution: moshe weitzman at Acquia commented+1 to this. I will update Drush status accordingly.
Comment #9
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedso we are green and the maintainers of config_devel @chx and drush @moshe both agreed to do this change, which will be most disruptive for them. Added Beta Evaluation.
One question though, not for the patch itself, more for the process of changes during Beta:
so we leave that in?
Because the beta evaluation has a line which states "code already marked for removal by 8.0.0" are marked as prioritized and should happen during beta.
If I understand that correct, should we remove that then completely?
Comment #10
alexpott@Schnitzel it's a new deprecation (i.e. it is not already marked for removal) so we should leave it in and say we'll remove in 9.x which is exactly what the patch does.
Comment #11
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedah! allright @alexpott thanks for clarification.
Well then I think we are ready with that.
I'm happy to write the ChangeNotice for that after it is committed.
Comment #12
alexpott@Schnitzel good point re change notice. Actually the draft should be written before - be my guest :)
Comment #15
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedComment #16
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedreroll.
Also created Change Notice Draft
https://www.drupal.org/node/2501187
Comment #18
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedwrong patch *g*
Comment #19
moshe weitzman CreditAttribution: moshe weitzman at Acquia commentedHurray, it's green ... I reviewed the patch and it like a sane place to leave D8.
Comment #22
alexpottRerolled - also include the change from #2503015: Remove usages of conf_path() in InstallerExistingSettingsNoProfileTest so we don't get any more rerolling fun - adding contributors to that patch to the suggested commit message.
Suggested commit message
Comment #23
Fabianx CreditAttribution: Fabianx as a volunteer commentedEdited change record to point to this issue :).
Comment #24
xjmNice! A big +1 for this change.
I'd use the more standard/specific form:
Also make sure to put the final period on the last sentence. :)
This is confusing now. We say that core only provides staging but then that it defaults to active? Is that to avoid a BC break? I think we need to at least explain this a little better, but if core is no longer providing an active directory, would it really be that much more disruptive to stop defaulting to something we don't provide?
Comment #25
alexpott@xjm thanks for the review.
I've also added some missing explicit test coverage of
config_get_config_directory()
and the exception behaviour.Comment #26
Mile23I can't speak to the architectural changes, but I want to run the testbot again, since it's blocking #2457469: Remove usages of conf_path()
Here's a superficial review:
Should say @throws \Exception
Since it mentions an error, it should say @throws \Exception
Comment #28
Fabianx CreditAttribution: Fabianx as a volunteer commentedBack to RTBC, both issues seem pre-existing normal documentation bugs to me and should not affect RTBC status as this just moves the code.
Could be fixed on commit though.
Comment #32
JeroenTRTBC as per #28.
Comment #33
xjmThanks @alexpott, @Mile23, and @Fabianx.
I've found a few more things in my latest review, mostly minor:
One of these got fixed but not the others. :P
This comment still refers to plural config directories.
Is the error an exception? If so there should be an
@throws
as @Mile23 says. Regarding #28, the behavior that it's not expected to have an active directory is new, so it's not as simple as moved docs.This is a bit odd as a test. Is the idea to ensure that callers get a clear BC break?
Comment #34
JeroenTPatch no longer applied cleanly. Created straight reroll.
Comment #35
JeroenTRegarding #33.
Patch attached.
Comment #37
JeroenTFixed failing test.
Comment #40
cilefen CreditAttribution: cilefen commentedI needed a reroll.
Comment #41
moshe weitzman CreditAttribution: moshe weitzman at Acquia commentedThanks for the reroll.
Comment #42
ianthomas_uk@deprecated because this is blocking removal of conf_path (because that would cause a reroll for this patch). If there are concerns that make this unlikely to make RC1 then we can just remove conf_path, but I didn't want to disrupt this issue.
Comment #43
catchCommitted/pushed to 8.0.x, thanks!
Comment #45
alexpottRe #33.4 Yes it was - and it is also testing calling the code with a config directory key that does not exist.
Comment #47
cweagansThe installer is still checking for an active directory as a condition for skipping the db configuration page:
```
$install_state['config_verified'] = install_ensure_config_directory(CONFIG_ACTIVE_DIRECTORY) && install_ensure_config_directory(CONFIG_STAGING_DIRECTORY);
```
Should this be fixed here? Or in a follow up issue? Or was that intentional?
As it is right now, we have lost the ability to pre-configure db and config dir information in settings.php and have the installer skip the database configuration page.
Comment #48
Fabianx CreditAttribution: Fabianx as a volunteer commented#47: Follow-up I think, lets open one?
Comment #49
Schnitzel CreditAttribution: Schnitzel at Amazee Labs commentedmhh, I don't see that in HEAD:
http://cgit.drupalcode.org/drupal/tree/core/includes/install.core.inc#n365
Comment #50
cweagansWell wtf was I looking at. Disregard. Sorry for the noise everyone.