-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
aws-events: Rule schedule property type checking failing Python #27258
Comments
Linked issue: #27259 I believe this is because the new |
Created a fork, and reverted rate to use a LiteralSchedule that inherits from the consumer Schedule abstract class and that does fix the issue: However, this does mean that there will be more repeated code, that I understand the refactor was aiming to avoid. Struggling to think of a way around this otherwise currently as Parameterised Types can't be used with jsii. |
- Latest version of aws-cdk-lib casuses event schedule error - Downgrade 2.97 to 2.96 - Reference: aws/aws-cdk#27258
Thanks for the report @danielwilton-metoffice, I'm going to close this in favor of #27259 🙂 |
|
Describe the bug
Specifying
aws_events.Schedule.rate(core.Duration.minutes(30))
for the schedule property on aws_events.Rule class, fails on aws-cdk-lib==2.97.0 at synth time.This is also the same for the
cron
andexpression
properties.Expected Behavior
This was previously working to create an Event Rule:
Current Behavior
Error at synth time:
Reproduction Steps
Install latest
aws-cdk-lib
in Python and create anaws_event.Rule
object with the schedule property set toaws_events.Schedule.rate(core.Duration.minutes(30))
, and runcdk synth
.Possible Solution
Workaround:
aws-cdk-lib==2.96.0
Additional Information/Context
No response
CDK CLI Version
2.96.2 (build 3edd240) and 2.97.0 (build d7cf3be)
Framework Version
2.97.0
Node.js Version
20.7.0
OS
Windows
Language
Python
Language Version
Python 3.9.17
Other information
With the
Schedule
functionality getting moved tocore
and theaws_events.Schedule
now inheriting this version, I'm guessing there are some proxying issues with jsii?The text was updated successfully, but these errors were encountered: