Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MatousJobanek
Copy link
Contributor

@MatousJobanek MatousJobanek commented Feb 5, 2019

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

@fabric8-services fabric8-services deleted a comment from fabric8cd Feb 5, 2019
@codecov
Copy link

codecov bot commented Feb 5, 2019

Codecov Report

Merging #745 into master will increase coverage by 1.45%.
The diff coverage is 82.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #745      +/-   ##
==========================================
+ Coverage   75.15%   76.61%   +1.45%     
==========================================
  Files          37       38       +1     
  Lines        3128     3211      +83     
==========================================
+ Hits         2351     2460     +109     
+ Misses        583      565      -18     
+ Partials      194      186       -8
Impacted Files Coverage Δ
auth/service.go 73.73% <ø> (ø) ⬆️
toggles/toggles.go 30.61% <ø> (ø) ⬆️
openshift/removed_objects.go 100% <100%> (ø)
controller/convert.go 100% <100%> (ø) ⬆️
jsonapi/jsonapi_utility.go 70.1% <100%> (ø) ⬆️
configuration/configuration.go 71.25% <100%> (ø) ⬆️
migration/migration.go 38.13% <100%> (ø) ⬆️
controller/update.go 69.14% <100%> (ø) ⬆️
controller/tenants.go 63.96% <46.87%> (ø) ⬆️
environment/template.go 89.13% <50%> (+0.72%) ⬆️
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa05c55...6824584. Read the comment docs.

@fabric8cd
Copy link
Contributor

This PR changes one or more of the template files. These changes are now available for testing: Launch in OpenShift.io and click the update tenant button

@MatousJobanek MatousJobanek changed the base branch from develop to master February 15, 2019 14:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants