manheim / manheim-c7n-tools

Manheim's Cloud Custodian (c7n) wrapper package, policy generator, runner, and supporting tools.
https://manheim-c7n-tools.readthedocs.io/
Apache License 2.0
45 stars 25 forks source link

Errorscan never match & pull in latest upstream release #45

Closed jantman closed 4 years ago

jantman commented 4 years ago

Description

This PR contains two changes:

  1. Now that new c7n and c7n-mailer releases have been cut, stop installing from a particular git commit and pull in the latest upstream releases.
  2. Add a new CLI option to the errorscan entrypoint/script to allow suppressing Lambda error log messages that match a specified regex. This is specifically needed for us in order to deal with some Splunk HEC annoyances.

Testing Done

  1. Automated TravisCI tests for building the Docker image, package, etc.
  2. errorscan does not have any unit tests. I ran errorscan against one of our problematic accounts locally and verified that without -n specified the output is unchanged from the last release, but with -n and an appropriate regex specified, the matching messages are no longer reported as errors.
jantman commented 4 years ago

I'm not sure why, but the last TravisCI build rebuilt the previous commit, not the latest commit. I'm going to try closing and re-opening the PR, and seeing if that re-triggers Travis on the right commit.

jantman commented 4 years ago

Weird, but yeah, that did it.

codecov-commenter commented 4 years ago

Codecov Report

Merging #45 into master will decrease coverage by 0.25%. The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
- Coverage   57.84%   57.59%   -0.26%     
==========================================
  Files           8        8              
  Lines        1376     1382       +6     
  Branches      258      260       +2     
==========================================
  Hits          796      796              
- Misses        580      586       +6     
Impacted Files Coverage Δ
manheim_c7n_tools/errorscan.py 0.00% <0.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 eaadfc0...945c427. Read the comment docs.