Skip to content

refactor(event_source): centralizing helper functions for query, header and base64 #2496

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

Merged

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #2424

Summary

Changes

This PR unifies all the helper functions in one file to avoid drifts and fix minor problems in event source data classes.

User experience

There is no change in the user experience.

Checklist

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

Is this a breaking change?

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.

@heitorlessa
Copy link
Contributor

LGTM after you refactor to use kwargs over args in for get_header_value and get_query_string_value.

@heitorlessa
Copy link
Contributor

Good to go.... still don't have my access fixed :/

@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03 ⚠️

Comparison is base (1d60146) 97.15% compared to head (2dd8310) 97.12%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2496      +/-   ##
===========================================
- Coverage    97.15%   97.12%   -0.03%     
===========================================
  Files          157      158       +1     
  Lines         7345     7346       +1     
  Branches       533      517      -16     
===========================================
- Hits          7136     7135       -1     
  Misses         160      160              
- Partials        49       51       +2     
Impacted Files Coverage Δ
...wertools/utilities/data_classes/active_mq_event.py 100.00% <100.00%> (ø)
...ities/data_classes/api_gateway_authorizer_event.py 100.00% <100.00%> (ø)
...s/utilities/data_classes/appsync_resolver_event.py 100.00% <100.00%> (ø)
...ls/utilities/data_classes/aws_config_rule_event.py 99.50% <100.00%> (-0.01%) ⬇️
...s/utilities/data_classes/cloud_watch_logs_event.py 100.00% <100.00%> (ø)
.../utilities/data_classes/code_pipeline_job_event.py 100.00% <100.00%> (ø)
...lambda_powertools/utilities/data_classes/common.py 100.00% <100.00%> (ø)
...a_powertools/utilities/data_classes/kafka_event.py 96.96% <100.00%> (+4.32%) ⬆️
...wertools/utilities/data_classes/rabbit_mq_event.py 100.00% <100.00%> (ø)
...wertools/utilities/data_classes/s3_object_event.py 100.00% <100.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@leandrodamascena leandrodamascena changed the title fix(event_source): centralizing helper functions for query, header and base64 fix(event_source): centralizing helper functions for query, header and base64 Jun 20, 2023
@leandrodamascena leandrodamascena changed the title fix(event_source): centralizing helper functions for query, header and base64 feat(event_source): centralizing helper functions for query, header and base64 Jun 20, 2023
@leandrodamascena leandrodamascena changed the title feat(event_source): centralizing helper functions for query, header and base64 fix(event_source): centralizing helper functions for query, header and base64 Jun 20, 2023
@github-actions github-actions bot added bug Something isn't working feature New feature or functionality labels Jun 20, 2023
@leandrodamascena leandrodamascena merged commit a3d7bd5 into aws-powertools:develop Jun 20, 2023
@leandrodamascena leandrodamascena deleted the techdebt/dictwrapper branch June 20, 2023 08:55
@heitorlessa heitorlessa removed the feature New feature or functionality label Jun 23, 2023
@heitorlessa heitorlessa changed the title fix(event_source): centralizing helper functions for query, header and base64 refactor(event_source): centralizing helper functions for query, header and base64 Jun 23, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 23, 2023
rafaelgsr pushed a commit to rafaelgsr/aws-lambda-powertools-python that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech debt: Centralize DictWrapper functions for query, header, json_data, etc.
3 participants