The major change between 2.7 and 2.8 is that in 2.7, hook changes are applied _individually_ in a best-effort approach. This means that if any of the change operations fails, juju will still attempt to apply the rest and return back the first-seen error. On the other hand, in 2.8, all hook changes (pod-spec included) get applied in a single transaction and all changes get rolled back in case on an error.
The major change between 2.7 and 2.8 is that in 2.7, hook changes are applied _individually_ in a best-effort approach. This means that if any of the change operations fails, juju will still attempt to apply the rest and return back the first-seen error. On the other hand, in 2.8, all hook changes (pod-spec included) get applied in a single transaction and all changes get rolled back in case on an error.
AFAICT from https:/ /github. com/juju/ juju/blob/ 2.7/worker/ uniter/ runner/ context/ context. go#L878- L883, 2.7 defers setting the podspec until the hook flush time so the issue with 2.8 might be caused by the combination of changes being applied together.