Cedric pointed out on IRC that in the implementation of the fix for bug 1353670, the second step after exporting data was not, as I requested in that bug report, a DELETE, but rather an ABANDON. Since all of the other resources we delete by doing a DELETE with the DeletionPolicy forced to RETAIN, this means that to fix it we would have to somehow override the behaviour of Resource.delete() specifically in the case of a StackResource that is in the process of being abandoned. Which is horrible.
I was thinking that with that fix in we could rely on the stored state (i.e. that the nested stack was EXPORT_COMPLETE or whatever) to do the Right Thing on DELETE, but that isn't the case at all.
Cedric pointed out on IRC that in the implementation of the fix for bug 1353670, the second step after exporting data was not, as I requested in that bug report, a DELETE, but rather an ABANDON. Since all of the other resources we delete by doing a DELETE with the DeletionPolicy forced to RETAIN, this means that to fix it we would have to somehow override the behaviour of Resource.delete() specifically in the case of a StackResource that is in the process of being abandoned. Which is horrible.
I was thinking that with that fix in we could rely on the stored state (i.e. that the nested stack was EXPORT_COMPLETE or whatever) to do the Right Thing on DELETE, but that isn't the case at all.