We need a way to exclude certain entity types from the auto deployment plan (such as users). The attached patch provides this functionality and an additional form field in the admin to set this. Default is to include all entity types so this doesn't change existing functionality out of the box.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | deploy-auto_plan_hook_alter-2243537-4.patch | 1.03 KB | timaholt |
Comments
Comment #1
skwashd commented@timaholt, as we discussed at DrupalCon Austin, this patch needs work.
The whole idea of deploy_auto_plan.module is to do one thing and to do it well. The task for the module is to automatically add items to a plan. I understand that there are some use cases when people need/want to add most, but not all entities to a plan.
I propose that we create
hook_deploy_auto_plan_status_alter. The deploy_auto_plan module code would look something like this:If a module wants to turn off storing an entity in the auto plan they flip the status bit to
FALSE.Comment #2
timaholt commentedOk so I've reworked this to do as you are suggesting, adding in a hook_deploy_auto_plan_status_alter. I've tested this and it seems to work well.
Comment #3
skwashd commentedOverall this looks good. I think we just need to look at the order in which things happen.
This should happen after the initial
if (!$plan_name...) {block as it is a potentially expensive operation. We shouldn't be firing the alter hook for entities that don't support UUIDs or when we don't have a plan set.Comment #4
timaholt commentedHere's an updated patch.
Comment #5
skwashd commented@timaholt, looks good to me. There seems to be an issue with the testbot atm. Once it marks the patch as green I'll commit it.
Comment #7
dixon_Patch looks good and not very intrusive. The test suite also doesn't work on d.o (only locally or on Travis via my Github clone).
Thanks Tim!