Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

pkg/controller/gitopsconfig: change Finalizers with ResourceDeletionMode#313

Merged
seanmalloy merged 3 commits intoKohlsTechnology:masterfrom
akavel:finalizer-set
Mar 12, 2020
Merged

pkg/controller/gitopsconfig: change Finalizers with ResourceDeletionMode#313
seanmalloy merged 3 commits intoKohlsTechnology:masterfrom
akavel:finalizer-set

Conversation

@akavel
Copy link
Copy Markdown

@akavel akavel commented Mar 9, 2020

When .Spec.ResourceDeletionMode is changed, make this change effective
by changing the .Finalizers field. Previously, .Finalizers was never
changed after GitOpsConfig was marked as initialized.

Fixes #272.

Also, increase a timeout in a test slightly, it was failing for me as

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Unit tests and e2e tests updated
  • Documentation updated - N/A

…logy#272)

The GitOpsConfig object used in controller_test.go had `.Finalizers`
field empty, not in sync with `.Spec.ResourceDeletionMode="Delete"`
field. This commit fixes `.Finalizers` value, which will become
important for later commit.

Related to KohlsTechnology#272.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2020

Codecov Report

Merging #313 into master will increase coverage by 2.82%.
The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #313      +/-   ##
=========================================
+ Coverage   21.57%   24.4%   +2.82%     
=========================================
  Files           6       6              
  Lines         482     500      +18     
=========================================
+ Hits          104     122      +18     
+ Misses        353     352       -1     
- Partials       25      26       +1
Impacted Files Coverage Δ
pkg/controller/gitopsconfig/controller.go 39.59% <77.27%> (+3.95%) ⬆️

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 4a9e17f...7044509. Read the comment docs.

When .Spec.ResourceDeletionMode is changed, make this change effective
by changing the .Finalizers field. Previously, .Finalizers was never
changed after GitOpsConfig was marked as initialized.

Fixes KohlsTechnology#272.

Also, increase a timeout in a test slightly, it was failing for me as
too short.
Increase a timeout in attempt at making CI pass more reliably - see a
timeout on l.232 in:
https://travis-ci.com/KohlsTechnology/eunomia/jobs/296112485#L2449
Copy link
Copy Markdown
Contributor

@sbar95 sbar95 left a comment

Choose a reason for hiding this comment

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

LGTM!

@seanmalloy seanmalloy added this to the v0.1.5 milestone Mar 12, 2020
@seanmalloy seanmalloy merged commit 14c9b46 into KohlsTechnology:master Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Updating ResourceDeletionMode does not update CR result

3 participants