generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Labels
Description
Expected Behaviour
The idempotency layer should be using the fully qualified name of the input function to compute the hash key.
Using unqualified names may result in two distinct functions and/or methods contending for the same set of idempotency items.
Current Behaviour
In IdempotencyHandler, line 77:
persistence_store.configure(config, self.function.__name__)
Possible Solution
persistence_store.configure(config, self.function.__qualname__)
Note that it should be checked whether __qualname__ is subject to Python module import peculiarities. In particular, whether import module and from module import funcName yield the same __qualname__.
Steps to Reproduce
class A:
@idempotent_function
def test(self, myParam):
return myParam
class B(A):
@idempotent_function
def test(self, myParam):
return myParamAWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.9
Packaging format used
PyPi
Debugging logs
No response