Move field configs out of the split and back to the sync directory#92
Move field configs out of the split and back to the sync directory#92
Conversation
…s possible during ci/cd testing
pookmish
left a comment
There was a problem hiding this comment.
Field storage configs can't live in a config_split because if there is existing data in those fields
That is not correct. Review how lagunita has many instances. the config split allows us to keep site specific fields in it's own location.
Why was all the data lost from those fields then? |
I can review the situation more another day. |
|
I think the problem is that the config split needed to be created prior to deploying the code. That would've allowed the system to see the field storage configs in their proper locations and retained the tables in the database. |
|
That makes sense to me. In that case, I think we should deploy this, restore the lost data, and then re-introduce the field storage splits once it's active on the Acquia environments. That way, the environment knows about the split, and the split files will be included in the unified configuration during future deployments. |
|
How would deploying this solve the problem? doesn't the application already have the config split on the site? or did you restore from a backup? If you restored from a backup, just create a db update hook to create the config split. Ensure the uuid and all settings are reflected in the update. Then it should work fine. |
|
Actually, it looks like just promoting the database will do the trick. Since the database on the DEV server is based on the PROD db with only the messed up tables restored from the backup (see above), it's already aware of the split. I just tested this locally by moving back to the 12x branch and doing a |
|
That seems fine to me. I can't think of a reason not to. The alternative is to restore the prod environment with the backup. Then you could use drush to create the config split and then just |
|
Closing in lieu of #93 |
READY FOR REVIEW
Summary
config_splitbecause if there is existing data in those fields, when adrush config:importhappens, it performs the import based on theconfig/syncconfigurations only. When that happens, it finds that there are fields in the database which are not accounted for in the base configuration. So it marks all the entries in those tables as deleted. The next timecronruns, it then removes the data marked for deletion from the database. This causes all those fields to lose all their records.syncdirectory, to allow the profile to install correctly during testing.Notes on data recovery in this instance
drush deployon the D11 version to make sure all the db updates were applied, and all the configuration was restored to D11 status. That gives me a D11 version of the DB including the lost data.drush @default.dev deploya couple of times to get everything applied cleanly. Subsequent deployments to the DEV server applied without issue.Next steps
Review By (Date)
Urgency
Steps to Test
Affected Projects or Products
Associated Issues and/or People
@mentionthem here)See Also