When a child resource specifies that its `parent` ...
# general
a
When a child resource specifies that its
parent
is a parent resource, does that imply that the child resource
dependsOn
the parent resource as well?
I set up a dependency chain which creates a race condition and a "snapshot integrity failure" because it "refers to missing parent", but that shouldn't happen if
parent
implies
dependsOn
.
Copy code
Parent 1           Parent 2
   |                   |
Child 1------------>Child 2
In this case, Child 2 references Child 1. Child 2 is created first, which causes Child 1 to be created because of the dependency. However, since Parent 1 is not created yet, the update fails with the above error, because Child 1 references Parent 1 which hasn't been created at.
If
parent
implied
dependsOn
, Child 1 wouldn't be created until after Parent 1, preventing the error.
Well, I manually added the
dependsOn
, and ended up with un unresolved promises error, probably due to the cyclical dependency. I guess I need to refactor the dependency chain.