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

schedule: Add a description for cloudwatch event rule #1155

Merged
merged 3 commits into from Aug 25, 2019

Conversation

@haidaraM
Copy link
Contributor

haidaraM commented Jun 26, 2019

Description of changes:
This PR adds support for CloudWatch Event description when creating a schedule:

from chalice import Chalice, Rate

app = Chalice(app_name="helloworld")

# Automatically runs every 5 minutes
@app.schedule(Rate(5, unit=Rate.MINUTES), description="Hello world event")
def periodic_task(event):
    return {"hello": "world"}

By the default, the description is set to an empty string.

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

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jun 27, 2019

Codecov Report

Merging #1155 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1155      +/-   ##
==========================================
+ Coverage   96.03%   96.03%   +<.01%     
==========================================
  Files          28       28              
  Lines        5218     5224       +6     
  Branches      665      667       +2     
==========================================
+ Hits         5011     5017       +6     
  Misses        134      134              
  Partials       73       73
Impacted Files Coverage Δ
chalice/deploy/deployer.py 98.32% <ø> (ø) ⬆️
chalice/package.py 100% <ø> (ø) ⬆️
chalice/awsclient.py 94.64% <100%> (+0.02%) ⬆️
chalice/app.py 97.43% <100%> (ø) ⬆️
chalice/deploy/planner.py 97.14% <100%> (+0.02%) ⬆️
chalice/deploy/models.py 100% <100%> (ø) ⬆️

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 0ad1309...d2443d3. Read the comment docs.

@haidaraM

This comment has been minimized.

Copy link
Contributor Author

haidaraM commented Jun 27, 2019

I'm wondering if I should description everywhere instead of rule_description ? I have tried to be close to the existing names...
And I just figured it out that SAM doesn't support description on Schedule :-(

@haidaraM haidaraM changed the title schedule: Add a description for cloudwatch event schedule: Add a description for cloudwatch event rule Jun 27, 2019
@haidaraM haidaraM force-pushed the haidaraM:feature/scheduleDescription branch from 8ded3ae to 6eba484 Jun 30, 2019
@haidaraM

This comment has been minimized.

Copy link
Contributor Author

haidaraM commented Aug 20, 2019

Someone to take a look at this PR 😄 ? Anything to change ?

@jamesls

This comment has been minimized.

Copy link
Member

jamesls commented Aug 23, 2019

Yep, sorry for the delay, looking at this now.

@jamesls jamesls force-pushed the haidaraM:feature/scheduleDescription branch from 6eba484 to c6ce6f1 Aug 23, 2019
@jamesls jamesls force-pushed the haidaraM:feature/scheduleDescription branch from c6ce6f1 to b1105f5 Aug 23, 2019
Copy link
Member

jamesls left a comment

Looks good to me. I had to rebase with the latest changes on master, the recent cloudwatch events PR refactored a number of internals.

I also pushed a change that added terraform support as well. Looks like SAM doesn't support this field (https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#schedule) so there's not much we can do for SAM.

Thanks for the pull request.

@jamesls jamesls force-pushed the haidaraM:feature/scheduleDescription branch from 483282c to d2443d3 Aug 23, 2019
jamesls added a commit that referenced this pull request Aug 25, 2019
PR #1155

* feature/scheduleDescription:
  Add description to terraform module
  Add feature to CHANGELOG
  schedule: Add a description for cloudwatch event rule
@jamesls jamesls merged commit d2443d3 into aws:master Aug 25, 2019
3 checks passed
3 checks passed
codecov/patch 100% of diff hit (target 96.03%)
Details
codecov/project 96.03% (+<.01%) compared to 0ad1309
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@haidaraM haidaraM deleted the haidaraM:feature/scheduleDescription branch Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Chalice Roadmap
  
Awaiting triage
3 participants
You can’t perform that action at this time.