Skip to content
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

Introducing SAM support for EventBridgeRule, modeled after the existing CloudWatchEvent... #1241

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

nikp
Copy link
Contributor

@nikp nikp commented Nov 13, 2019

…, and guiding users to new service

Description of changes:

Add support for explicitly referencing "EventBridge" - the service that superseded "CloudWatch Events

The meaningful part of this CR is actually ONLY 3 lines of code in push.py:

class EventBridgeRule(CloudWatchEvent):
    """EventBridge Rule event source for SAM Functions."""
    resource_type = 'EventBridgeRule'

The rest is examples, doc, and test file updates

There are 2 code samples in serverless-application-model that refer to cloudwatchevents. I kept the directories of the old ones for someone who’s only familiar with “cloudwatch events” to be able to discover them, but copied the code to new eventbridge - named code sample directories. In the original directory i added README referencing the move and linking to the new none

Schedule triggers use Events rules underneath, so no specification requirements have to be made. However a couple places in the code refer to them as “CloudWatchEvents Schedule” - since that’s not backwards incompatible i just renamed those to EventBridge Schedule"

Description of how you validated changes:

make test/make pr

Pure renaming

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected
  • Add/update example to examples/2016-10-31

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Nov 13, 2019

Codecov Report

Merging #1241 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1241      +/-   ##
===========================================
+ Coverage    94.45%   94.46%   +<.01%     
===========================================
  Files           78       78              
  Lines         4332     4334       +2     
  Branches       854      854              
===========================================
+ Hits          4092     4094       +2     
  Misses         114      114              
  Partials       126      126
Impacted Files Coverage Δ
samtranslator/model/eventsources/push.py 90.92% <100%> (+0.03%) ⬆️

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 bbccae9...b31e4b9. Read the comment docs.

Copy link
Contributor

@praneetap praneetap left a comment

Choose a reason for hiding this comment

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

Thanks for this change @nikp!
Please make sure the merge conflicts are resolved.

@praneetap praneetap assigned keetonian and unassigned praneetap Dec 5, 2019
@keetonian
Copy link
Contributor

Rebased and pushed changes. Thank you for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants