Improve param_changed detection (#881) #883
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attempts to fix the issues identified in #881 and while it does address the identified issues in our scenario, I have some concerns about the approach/sanity of these checks related to the concerns called out by @MasterMind2k in #781 (comment) .
In this case, the comparison for the mounts + volumes does not preserve the source/destination paring so while comparing the list of source and destination mounts might be correct, the pairing could still be wrong ie
source1:dest2
when it should besource1:dest1
and wound not trigger theparam_changed
event that would be desired. When talking about configured volumes, It also does not take into account the mount type such as volume, bind, etc (not sure if this one should as it could be multiple types and still be a valid match in my opinion).It also seems like this function may break when called on a windows host. All of the start, stop, create, etc calls wrap the command with
run_with_powershell
while thedetect_changes
does not.I would appreciate hearing from @adrianiurca who authored most of this function as I had to guess at a couple things so if additional light can be shed on what it should be accomplishing I can try to make some updates.