You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many/most situations ddev wants to manage the settings.php file. It generally will create one if there isn't one during an import-db. However, that settings.php sticks around and can cause no end of confusion.
What you expected to happen:
I would expect
the settings.php (if we generated it) to be managed, meaning that we should delete it before ddev rm and recreate it before ddev import-db
Our settings.php should not import settings.local.php, because that can only lead to pain, when we bring in a settings.local.php that's intended for another purpose. People can use their own crafted (unmanaged) settings.php + settings.local.php if they want that.
I recommend that we put text in the settings.php that identifies it easily as ddev-generated, for example a comment that says
// ddev-generated by ddev <version> on <date>. Do not edit; you can replace this with your own
// and remove this comment.
Also I recommend that our generated settings.php not include settings.local.php.
How to reproduce it (as minimally and precisely as possible):
I was testing a PR but my repo had a settings.php from an earlier version of our containers (with different db and mysql username). So simple testing failed. This could happen to all our users really easily.
If the settings file has "#ddev-created" in it (or if there is no settings file) we overwrite it on every import (which is currently the only time we do settings creation)
If the settings.php does not have that signature, we do not touch it.
Updated the labels to indicate that there is no issue with the approach and therefore no decision needed. It sounds like we have valid acceptance criteria for Drupal. Need to expand that to include WordPress.
Activity
Always generate settings file unless it's custom, fixes ddev#308
rickmanelius commentedon Jun 15, 2017
Adding the needs decision label. I know work is already in flight here, but I know we need to think through the scenarios to see what could break.
rfay commentedon Jun 15, 2017
The current strategy in #325 is:
rickmanelius commentedon Jun 15, 2017
Hi @rfay. Thanks for the summary. I'm tracking and overall like the idea/strategy. A few comments:
ddev rm". I thoughtddev rmwould be the trigger to delete it. Am I overthinking the order of operations?rickmanelius commentedon Jun 15, 2017
Updated the labels to indicate that there is no issue with the approach and therefore no decision needed. It sounds like we have valid acceptance criteria for Drupal. Need to expand that to include WordPress.
rfay commentedon Jun 15, 2017
@rickmanelius yes, I had originally thought we'd want to delete in some situations, but since we always recreate it seemed silly to add more code.
Wordpress configs already do all this in #325, there's no difference in the approach.
rickmanelius commentedon Jun 15, 2017
Ah. Helps to read the entire PR first :) Thank you!