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

feat(idempotency): ability to specify JMESPath custom functions #3150

Merged

Conversation

arnabrahman
Copy link
Contributor

Summary

According to the Issue description, customers should be able to send their custom JMESPatch functions instead of built-in ones using the idempotency utility.

Changes

  • Introduce a new option jmesPathOptions in IdempotencyOptions
  • Export Functions to use it type the jmesPathOptions
  • Set the custom functions from config if present
  • Write unit tests for the new option
  • Update the docs for the new options but as always need suggestions on this.

Issue number: #2368


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.

@arnabrahman arnabrahman requested review from a team as code owners October 3, 2024 04:53
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation idempotency This item relates to the Idempotency Utility tests PRs that add or change tests labels Oct 3, 2024
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Oct 3, 2024
@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Oct 3, 2024
@dreamorosi
Copy link
Contributor

Hey @arnabrahman, thank you for the PR!

Before I get into the review, I wanted to ask if you're still seeing the issue with coverage on the git hooks described here #3134.

I've tried reproducing it on my side and I can't.

@arnabrahman
Copy link
Contributor Author

Yesterday, when I was pushing the commits, I faced the coverage issue again. After that, for all subsequent commits, I used the skip flag, as far as I remember.

Another thing, I believe my main branch was behind when I encountered this issue. After merging the main branch, I don’t recall if I tried committing without the skip flag. I’ll try again and get back to you @dreamorosi

@arnabrahman
Copy link
Contributor Author

Nope, the test coverage error is not there anymore.

@dreamorosi
Copy link
Contributor

Thank you @arnabrahman - I'm still going to do a small adjustment to the git hook because right now they're trying to run also e2e tests, which we don't want to.

Next time that it happens, if you can, please try to remove this flag --changed="$(git merge-base HEAD main)" and see if it fixes it. I have a suspect that it might be the reason why it's happening.


I'll review the PR in the next couple hrs tops.

Copy link

sonarqubecloud bot commented Oct 4, 2024

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thank you for adding this feature, I appreciate your time and effort on this.

I have run the e2e tests on this branch and they are successful.

@dreamorosi dreamorosi merged commit 869b6fc into aws-powertools:main Oct 4, 2024
21 checks passed
@dreamorosi dreamorosi linked an issue Oct 4, 2024 that may be closed by this pull request
2 tasks
@arnabrahman arnabrahman deleted the 2368-custom-jmespath-function branch October 5, 2024 05:42
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 PRs that introduce new features or minor changes idempotency This item relates to the Idempotency Utility size/M PR between 30-99 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: ability to specify JMESPath custom functions for Idempotency
2 participants