Skip to content

Conversation

sebastiankasprzak
Copy link
Contributor

Issue #, if available:
#2509

Description of changes:

  • Added a schema and test to support State property of AWS::Events::Rule in SAM

Description of how you validated changes:
Used bin/sam-translate.py to generate a CFN template from SAM template which I then successfully deployed in my AWS account with desired changes taking effect.

Checklist:

  • Add/update unit tests using:
  • Add/update integration tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected
  • Do these changes include any template validations?
    • Did the newly validated properties support intrinsics prior to adding the validations? (If unsure, please review Intrinsic Functions before proceeding).
      • Does the pull request ensure that intrinsics remain functional with the new validations?

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

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

@github-actions github-actions bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Oct 10, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2022

Codecov Report

Merging #2524 (8154199) into develop (e7a1496) will increase coverage by 0.84%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2524      +/-   ##
===========================================
+ Coverage    93.58%   94.43%   +0.84%     
===========================================
  Files           90       99       +9     
  Lines         6124     7615    +1491     
  Branches      1260     1598     +338     
===========================================
+ Hits          5731     7191    +1460     
- Misses         183      205      +22     
- Partials       210      219       +9     
Impacted Files Coverage Δ
samtranslator/region_configuration.py 77.77% <0.00%> (-22.23%) ⬇️
samtranslator/model/codedeploy.py 90.90% <0.00%> (-9.10%) ⬇️
samtranslator/validator/validator.py 91.80% <0.00%> (-3.85%) ⬇️
samtranslator/model/exceptions.py 97.67% <0.00%> (-2.33%) ⬇️
samtranslator/model/__init__.py 95.58% <0.00%> (-2.07%) ⬇️
samtranslator/open_api/open_api.py 90.16% <0.00%> (-1.81%) ⬇️
samtranslator/model/s3_utils/uri_parser.py 68.42% <0.00%> (-0.81%) ⬇️
samtranslator/yaml_helper.py 89.47% <0.00%> (-0.53%) ⬇️
samtranslator/translator/logical_id_generator.py 90.62% <0.00%> (-0.29%) ⬇️
samtranslator/model/apigateway.py 96.98% <0.00%> (-0.18%) ⬇️
... and 54 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

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

Thanks!

there are couple of places to change to add to the property dict:

@aahung
Copy link
Contributor

aahung commented Oct 11, 2022

@sebastiankasprzak can we also update the transform tests (both SFN and Lambda event source to include this new property?

@sebastiankasprzak
Copy link
Contributor Author

sebastiankasprzak commented Oct 11, 2022

@sebastiankasprzak
Copy link
Contributor Author

@aahung those changes are now be implemented. I have not added integration tests, how would you recommend these should be added?

aahung
aahung previously approved these changes Oct 12, 2022
Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing the comments!

@aahung aahung self-requested a review October 12, 2022 07:51
Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

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

One more comment: It would be great if we can use the new "State" in our transform tests, e.g., here, you can run make test to verify if it translates to the current template.

@aahung aahung dismissed their stale review October 12, 2022 07:52

Adding one last comment

@sebastiankasprzak
Copy link
Contributor Author

sebastiankasprzak commented Oct 13, 2022

nice! Thanks @aahung Added transform test for one of the Eventbridge tests. Let me know if that's good enough

Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing the comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants