Skip to content

feat(event_source): add CloudFormationCustomResourceEvent data class. #4342

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

Conversation

phipag
Copy link

@phipag phipag commented May 16, 2024

Issue number: #4332

Summary

This adds the CloudFormationCustomResourceEvent event source data class. There was already a parser but the event source data class was missing.

Changes

  • Add the CloudFormationCustomResourceEvent data class
  • Add missing PhysicalResourceId to parser

User experience

As a user I was unable to add a strongly typed event to my Lambda handler for custom CloudFormation resource management.

After the change, I am able to have a typed event for this scenario.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change? No

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@phipag phipag requested a review from a team May 16, 2024 16:37
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation logger tests labels May 16, 2024
Copy link

boring-cyborg bot commented May 16, 2024

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 16, 2024
@leandrodamascena leandrodamascena changed the title feat: add CloudFormationCustomResourceEvent event source data class. feat(event_source): add CloudFormationCustomResourceEvent data class. May 16, 2024
@github-actions github-actions bot added feature New feature or functionality and removed documentation Improvements or additions to documentation labels May 16, 2024
Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 97.29730% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.32%. Comparing base (e14e768) to head (9fcbe05).
Report is 483 commits behind head on develop.

Files Patch % Lines
...ta_classes/cloudformation_custom_resource_event.py 96.96% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4342      +/-   ##
===========================================
- Coverage    96.38%   96.32%   -0.06%     
===========================================
  Files          214      219       +5     
  Lines        10030    10485     +455     
  Branches      1846     1941      +95     
===========================================
+ Hits          9667    10100     +433     
- Misses         259      271      +12     
- Partials       104      114      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 17, 2024
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label May 17, 2024
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @phipag! Super nice this PR! I just left some few comments to make it even better.

Please let me know if you have any question.

@phipag
Copy link
Author

phipag commented May 18, 2024

Thanks for your review. All makes sense. I’ll send an update on Tuesday. 👍🏻

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 21, 2024
@phipag
Copy link
Author

phipag commented May 21, 2024

I addressed your comments @leandrodamascena and pushed a new commit.

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label May 21, 2024
@leandrodamascena
Copy link
Contributor

I addressed your comments @leandrodamascena and pushed a new commit.

Super thanks @phipag! I see some errors in CI, but those are not related with this PR and I'm fixing this.

I'm going to review this PR today/tomorrow, ok?

@phipag
Copy link
Author

phipag commented May 21, 2024

Sure. No problem.

Should I merge from develop next time before sending an update?

@leandrodamascena
Copy link
Contributor

Should I merge from develop next time before sending an update?

Hmm, you don't need this unless we see some conflict that blocks the merge. But in this case the problem is because a PR was approved this morning and the linter is complaining. Basically it was my fault because I didn't run the linter locally #mybad 🫨

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 22, 2024
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label May 22, 2024
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @phipag! We need to make a very small change before we merge. 🚀

@phipag
Copy link
Author

phipag commented May 22, 2024

Good catch. I'll fix it tomorrow morning! 👍🏻

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 23, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@phipag
Copy link
Author

phipag commented May 23, 2024

Hey @leandrodamascena I pushed the update.

@leandrodamascena leandrodamascena self-requested a review May 23, 2024 13:33
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @phipag! Thank you for your first contribution to the project. The code is clean and working perfectly for what was proposed. Feel free to contribute as many times as you like! 🚀

@leandrodamascena leandrodamascena merged commit 54e6cdd into aws-powertools:develop May 23, 2024
15 of 16 checks passed
@phipag
Copy link
Author

phipag commented May 23, 2024

Awesome! 🙌

@phipag phipag deleted the feat/cloudformation-custom-resource branch May 23, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or functionality logger size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add CloudFormation CustomResource events to EventSource dataclasses
2 participants