-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/initial hooks support #315
Conversation
4bcaf3b
to
8eb2e4a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #315 +/- ##
===========================================
- Coverage 95.97% 94.85% -1.13%
===========================================
Files 10 12 +2
Lines 695 835 +140
Branches 145 165 +20
===========================================
+ Hits 667 792 +125
- Misses 16 24 +8
- Partials 12 19 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
f48eb5a
to
41eb140
Compare
I think it is time for a review of this functionality with the aim to getting a release out, even as a stepping stone to the full vision. The documentation/explanation is contained in the This adds the support for hooks without the plugin scanning functionality. It's a starting point where you can rely on at least using a fixture in a Figured it was more worth while documenting this piece before going on to that side of testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My wedding was Jan 30th, I don't even remember seeing this PR opened! This is awesome stuff 🎉
@shadycuz congratulations! Just a slightly more important thing to be thinking about 😂 |
* feat(compliance): wip ramblings * feat(hooks): continued development of hooks * feat(hooks): added more tests and code docs for template hooks * feat(hooks): documentation
Initial hook implementation for #302.
I don't think I'm finished with this quite yet, but this should give an idea of how I see a first pass going.
This doesn't include the plugin support you suggested quite yet, but aims to prove out the structure and usage patterns which are probably a good first step.
At the core of it there is two levels of hooks that will be supported - template & resource.
ResourceHookContext
, which contains:Resource level hooks are configured on a template like this:
Hooks can be suppressed (in a similar fashion to other tools like
cfn-lint
andcfn-nag
) at either the template or resource level by adding Metadata like the following, where the items in the list are the function names of the configured hooks.