Closed jantman closed 4 years ago
Merging #54 into master will increase coverage by
0.24%
. The diff coverage is83.33%
.
@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 57.73% 57.98% +0.24%
==========================================
Files 8 8
Lines 1389 1397 +8
Branches 262 264 +2
==========================================
+ Hits 802 810 +8
Misses 586 586
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
manheim_c7n_tools/errorscan.py | 0.00% <0.00%> (ø) |
|
manheim_c7n_tools/config.py | 100.00% <100.00%> (ø) |
|
manheim_c7n_tools/policygen.py | 99.76% <100.00%> (+<0.01%) |
:arrow_up: |
manheim_c7n_tools/runner.py | 100.00% <100.00%> (ø) |
|
manheim_c7n_tools/version.py | 100.00% <100.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 0720bb7...9e8c914. Read the comment docs.
Description
c7n allows a configurable Lambda function name prefix, which defaults to
custodian-
. For the policies, this is configured in the actual policy YML. However, for mugc garbage collection, it needs to be explicitly passed in. In the current release, we have mugc hard-coded to the default ofcustodian-
. The result of this, as described in #53, is that manheim-c7n-tools can provision policies with a non-default prefix but mugc keeps trying to clean up the default-prefixed policies.This PR solves this issue with 3 pieces:
function_prefix
option inmanheim-c7n-tools.yml
, which defaults to the current and upstream default ofcustodian-
.MugcStep
to use that configuration option instead of the hard-codedcustodian-
.function-prefix
different from what's in the Config object (manheim-c7n-tools.yml
). This should prevent issues like #53 where the prefixes differ between function creation and garbage collection.Testing Done
manheim-c7n-runner -A -s policygen dryrun accountname
to verify behavior