This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
fix(#730): delete objects that are removed from templates #745
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.
The code to be reviewed is in this commit 8630aa6
when an object is removed from any of the templates, then during the next update it removes the corresponding object from an associated namespace in OS
the deletion is done by comparing the content of the templates that were used for the update/provisioning of the namespace last time. It takes the version of the namespace and because it represents a commit in tenant repo, then it downloads the content of the template from the corresponding blob. Then it just compares the objects - combination of kind/name/namespace
introduces a caching mechanism to minimize the number of downloads of the previous version of the templates. The cache contains a record for a particular version and for a particular environment type. The actual target of the cache is list of removed objects
is blocked by #741 as it is built on top of it
Fixes: #730