Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Fix override clean routes #831

Merged
merged 20 commits into from
Feb 22, 2021
Merged

Fix override clean routes #831

merged 20 commits into from
Feb 22, 2021

Conversation

cpgo
Copy link
Contributor

@cpgo cpgo commented Jan 27, 2021

Adds steps on spinnaker and octopipe pipeline to cleanup the virtualservices and destination rules.

Given the following state of the cluster

some-circle{
  component1:v1
  component2:v1
}

default-circle{
  component1:v0
  component2:v0
}

And the user deploys the following components

some-circle{
  component1:v2
  component3:v2
}

We have to
1 - Remove deployments and services of component2:v1 from the some-circle circle
2 - Remove virtual services and destination rules of component2:v1 from the some-circle circle
3 - Keep component2:v1 on the default-circle untouched

Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
…utes

Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
@boring-cyborg boring-cyborg bot added butler Improvements/additions/fixes for butler module. octopipe Improvements/additions/fixes for octopipe module. labels Jan 27, 2021
@codecov
Copy link

codecov bot commented Jan 27, 2021

Codecov Report

Merging #831 (d1bf3f8) into main (01dfe6b) will increase coverage by 0.04%.
The diff coverage is 92.30%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #831      +/-   ##
============================================
+ Coverage     69.48%   69.53%   +0.04%     
  Complexity     1741     1741              
============================================
  Files          1199     1199              
  Lines         17309    17346      +37     
  Branches       1606     1618      +12     
============================================
+ Hits          12028    12062      +34     
- Misses         4796     4799       +3     
  Partials        485      485              
Flag Coverage Δ Complexity Δ
butler 85.64% <92.30%> (+0.16%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...p/v2/core/integrations/octopipe/request-builder.ts 89.41% <86.66%> (-0.73%) 0.00 <0.00> (ø)
...v2/core/integrations/spinnaker/pipeline-builder.ts 91.40% <94.44%> (+0.41%) 0.00 <0.00> (ø)
...s/undeployment/undeploy-destination-rules-stage.ts 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...app/v2/core/integrations/utils/deployment.utils.ts 97.14% <100.00%> (+0.47%) 0.00 <0.00> (ø)

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 01dfe6b...d1bf3f8. Read the comment docs.

TODO: put orderBy clause on findActiveComponents
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
@@ -288,4 +289,268 @@ describe('V2 Octopipe Deployment Request Builder', () => {
).toEqual(completeOctopipeDeploymentWithOverrides)
})

it('Should undeploy A:v1 and B:v1 and C:v2 when new deploy is A:v2, B:V2 and D:v2 and current components are A:v1, B:V1 and C:v2, but should keep remove C:V2 from circle-id', async() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is a little confused! Maybe it could describe in a more functional way what is happening!

Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
@angelicalimazup angelicalimazup added TESTED QA and removed TESTED QA labels Feb 2, 2021
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
Signed-off-by: Cassio Godinho <cassiopgodinho@gmail.com>
lucasbfernandes
lucasbfernandes previously approved these changes Feb 4, 2021
@cpgo cpgo merged commit 10914cf into main Feb 22, 2021
@cpgo cpgo deleted the fix-override-clean-routes branch February 22, 2021 17:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
butler Improvements/additions/fixes for butler module. octopipe Improvements/additions/fixes for octopipe module. TESTED QA
Projects
None yet
7 participants