-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
store absolute addresses for resource dependencies in the state #23252
Commits on Oct 30, 2019
-
change state dependencies to AbsResource addrs
We need to be able to reference all possible dependencies for ordering when the configuration is no longer present, which means that absolute addresses must be used. Since this is only to recreate the proper ordering for instance destruction, only resources addresses need to be listed rather than individual instance addresses.
Configuration menu - View commit details
-
Copy full SHA for 2c3c011 - Browse repository at this point
Copy the full SHA 2c3c011View commit details
Commits on Nov 7, 2019
-
read+write the new dependencies in the statefile
The test fixture did not like having modules when using the generic json map, so read and compare the states in the final *File datastructure.
Configuration menu - View commit details
-
Copy full SHA for 5a0a002 - Browse repository at this point
Copy the full SHA 5a0a002View commit details -
make use of the new state Dependencies
Make use of the new Dependencies field in the instance state. The inter-instance dependencies will be determined from the complete reference graph, so that absolute addresses can be stored, rather than just references within a module. The Dependencies are added to the node in the same manner as state, i.e. via an "attacher" interface and transformer. This is because dependencies are calculated from the graph itself, and not from the config.
Configuration menu - View commit details
-
Copy full SHA for 42bb4a6 - Browse repository at this point
Copy the full SHA 42bb4a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16b368e - Browse repository at this point
Copy the full SHA 16b368eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 886af20 - Browse repository at this point
Copy the full SHA 886af20View commit details -
append dependencies during refresh
Refresh should load any new dependencies found because of configuration or state changes, but retain any dependencies already in the state. Orphaned resources would not be in config, but we do not want to lose the destroy ordering for the later apply.
Configuration menu - View commit details
-
Copy full SHA for 5e16e8e - Browse repository at this point
Copy the full SHA 5e16e8eView commit details -
failing test for update from orphaned instance
Updates resulting from orphaned instances should happen after the deletion of the instances.
Configuration menu - View commit details
-
Copy full SHA for 10152da - Browse repository at this point
Copy the full SHA 10152daView commit details -
use Dependencies to connect creator and destroyer
The DestroyEdgeTransformer cannot determine ordering from the graph when the destroyers are from orphaned resources, because there are no references to resolve. The new stored Dependencies provides what we need to connect the instances in this case. We also add the StateDependencies method directly in the GraphNodeResourceInstance interface, since all instances already implement this, and we don't need another optional interface to check. The old code in DestroyEdgeTransformer may no longer be needed in the long run, but that can be determined separately, since too many of the tests start with an incomplete state and rely on the Dependencies being determined from the configuration alone.
Configuration menu - View commit details
-
Copy full SHA for 46dbb3d - Browse repository at this point
Copy the full SHA 46dbb3dView commit details