Skip to content

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

Merged
dreamorosi merged 7 commits into
aws-powertools:mainfrom
arnabrahman:2368-custom-jmespath-function
Oct 4, 2024
Merged

feat(idempotency): ability to specify JMESPath custom functions#3150
dreamorosi merged 7 commits into
aws-powertools:mainfrom
arnabrahman:2368-custom-jmespath-function

Conversation

@arnabrahman

Copy link
Copy Markdown
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 a review from a team October 3, 2024 04:53
@arnabrahman
arnabrahman requested a review from a team as a code owner 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Nope, the test coverage error is not there anymore.

@dreamorosi

Copy link
Copy Markdown
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.

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2024

Copy link
Copy Markdown

@dreamorosi dreamorosi left a comment

Copy link
Copy Markdown
Contributor

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
@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