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

Tech debt: Review the name of the method extract_data_from_envelope in JMESPath Functions #4218

Closed
1 of 2 tasks
leandrodamascena opened this issue Apr 26, 2024 · 4 comments · Fixed by #4907
Closed
1 of 2 tasks
Labels
good first issue Good for newcomers help wanted Could use a second pair of eyes/hands jmespath JMESPath Functions utility tech-debt Technical Debt tasks v3 Features that will be included in Powertools v3.

Comments

@leandrodamascena
Copy link
Contributor

Why is this needed?

The extract_data_from_envelope method name seems strange for customers to understand what it is for. We now have the opportunity to deprecate this method, add a warning, and create a new one.

Which area does this relate to?

JMESPath functions

Suggestion

Deprectaed this method.

Acknowledgment

@leandrodamascena leandrodamascena added triage Pending triage from maintainers tech-debt Technical Debt tasks labels Apr 26, 2024
@leandrodamascena leandrodamascena added the jmespath JMESPath Functions utility label Apr 26, 2024
@leandrodamascena leandrodamascena moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Apr 26, 2024
@leandrodamascena leandrodamascena added this to the Powertools v3 milestone Apr 26, 2024
@leandrodamascena leandrodamascena added v3 Features that will be included in Powertools v3. and removed triage Pending triage from maintainers labels Apr 26, 2024
@dreamorosi
Copy link
Contributor

We just added this method in the TypeScript repo a few weeks ago.

Do we have any anecdotes for deprecating this and how we can improve?

I'm not necessarily challenging the idea, I'm more interested in how we can disambiguate it and make it clearer.

@leandrodamascena
Copy link
Contributor Author

Hello @dreamorosi! I don't have enough anecdotes about this. @heitorlessa may have more context about the reasons behind this change and any customer feedback received.
Regardless, we do not plan to remove this method entirely. Instead, we will add a deprecation warning and remove it in the V4 release. As for the new method name, we believe query would be a good name, as it better conveys the idea of retrieving data, and the query name is more commonly used across similar concepts of data querying.

@heitorlessa heitorlessa added good first issue Good for newcomers help wanted Could use a second pair of eyes/hands labels Jun 10, 2024
n-k1 pushed a commit to n-k1/powertools-lambda-python that referenced this issue Aug 7, 2024
leandrodamascena added a commit that referenced this issue Aug 7, 2024
…or of query (#4907)

* refactor!(jmespath_utils): deprecate extract_data_from_envelope in jmespath_utils and replace with query

issue: #4218

* Adding deprecation decorator

* Adding test

* Fix highlight

---------

Co-authored-by: Neel Krishna <[email protected]>
Co-authored-by: Leandro Damascena <[email protected]>
@leandrodamascena
Copy link
Contributor Author

Closed via #4907

@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (Python) Aug 7, 2024
Copy link
Contributor

github-actions bot commented Aug 7, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Could use a second pair of eyes/hands jmespath JMESPath Functions utility tech-debt Technical Debt tasks v3 Features that will be included in Powertools v3.
Projects
Status: Coming soon
3 participants