Closed benhoyt closed 7 months ago
Probably the best way to fix this is to extract the validation of the combined fields from plan.CombineLayers
(.Services
, .Checks
, .LogTargets
, and checkCycles
) and then add a separate function plan.Validate(p *Plan)
which does the validation on a combined plan. We'd only call plan.Validate
in the two places validation is actually desired: plan.ReadDir
and ServiceManager.updatePlanLayers
.
When doing
pebble add --combine
, Pebble is callingplan.CombineLayers
on the existing labelled layer plus the new one, and validating the result as if it's in the entire plan (rather than just a single new layer), so we get this error:The above should work, because we should only validate on the overall combined plan. The expected result is: