-
Notifications
You must be signed in to change notification settings - Fork 421
Bug: RuleAction Enum type was changed #1909
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @royygael, thanks for opening this issue! I'll take a look at this, but I need help understanding it in more detail:
This looks like a Hyrum's law issue, but we don't want to assume anything hence more details before we decide how to proceed it. Thank you for providing the requested information above. |
Hey,
Oh, yes that was indeed a typo. We are using 3.8.
Regarding the snippet, its a bit of a problem because its spread in several
places.
The issue is that we create a new class using the RuleAction as one of the
parameters. After that we assemble another class which is an aggregation of
the first class containing the RuleAction.
Upon creating the aggregation class there is an error thrown which we are
trying to save an Enum where a string should be.
If this was from the beginning like this then it wouldnt be an issue and we
would of dealt with it differently yet now it is a breaking change
Thank you
בתאריך יום ד׳, 8 בפבר׳ 2023 ב-17:04 מאת Leandro Damascena <
***@***.***>:
… Hi @royygael <https://github.com/royygael>, thanks for opening this
issue! I'll take a look at this, but I need help understanding it in more
detail:
- Are you using Lambda Runtime Python 3.6 or was it a typo?
- Can you give more details about this? I mean, how are you using this
feature? Do you have a code snippet to simulate this? I tested it in my
local environment, in Lambda Runtime and everything worked as expected.
Thank you for providing the requested information above.
—
Reply to this email directly, view it on GitHub
<#1909 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A33FROMIM4NGBAMM7FOMF5LWWOYWFANCNFSM6AAAAAAUVH3YQA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
thanks @royygael that makes sense. Let's revert it @leandrodamascena, the perf cost is minimum and we file under https://www.hyrumslaw.com/ type of unexpected dependency of an use case we didn't envision (BUT, we should be sympathetic to our customers who invested like @royygael on that assumption) |
Ok @heitorlessa! Reverting this. |
Adding |
This is now released under 2.9.0 version! |
Expected Behaviour
Enum should be serilizeable to dict like it was.
Now it is a breaking change
Current Behaviour
Enum breaks when sent not as a value
Code snippet
Possible Solution
class RuleAction(str, Enum):
EQUALS = "EQUALS"
NOT_EQUALS = "NOT_EQUALS"
KEY_GREATER_THAN_VALUE = "KEY_GREATER_THAN_VALUE"
Steps to Reproduce
N/A
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.6
Packaging format used
Lambda Layers
Debugging logs
No response
The text was updated successfully, but these errors were encountered: