Hi All. I noticed that the automated tests in gith...
# general
s
Hi All. I noticed that the automated tests in github include python 3.13 on Ubuntu. What would be need to make sure using policies in the python3.13 runtime works successfully so it can be added as an allowed runtime in the policy schema? Also, currently python3.11 is the default runtime. There’s a little less than a year before AWS deprecates that runtime. The python3.12 runtime doesn’t reach deprecation until Oct 31, 2028. How close to the EOL of 3.11 would be a good time to change the default runtime?
a
defaulting to 3.13 seems fine to me really, unless we run into issues trying it. it's been about a year and a half since we moved the default to 3.11, and with python being on an annual release schedule skipping 3.12 seems to make sense
(that pr is why i say "unless we run into issues" because i definitely did with the switch to 3.11 😅 ) we should also probably make sure that we don't allow lambda runtime versions lower than the minimum python version we support. looks like policies allow a python3.8+ runtime but c7n only supports 3.10+
s
The unit tests pass on 3.13. That doesn’t necessarily mean that policies will run in the python3.13 runtime for all possible actions and filters. Is there a way to test that, or do we just add 3.13 to the schema and people can “test in production” if they choose and report bugs? Perhaps allowing 3.13 for those that wish to test with it (hopefully in a non-prod env), then waiting for bug reports before making 3.13 the default is the most practical approach. I agree on dropping anything < 3.10 from the schema.
a
i don't know of a good way to test all possible action/filter combinations for any given execution environment (lambda or other). the core validation comes from running our test suite in a python3.13 linux environment.
but like you said, it's always possible that there's an environmental issue that only shows up in a lambda context with specific filters/actions
s
What has been the decision making process on this in the past?
Allowing a new runtime is lower risk than changing the default imo. But I may be overthinking it.
a
i don't think there's a fixed way of handling it. looks like you added 3.11 support a couple years back, and then when i added 3.12 we bumped the default. tweaking the supported list is simpler, but bumping the default brings things more current with some time buffer before a deprecation hits. there are good reasons for either approach
nothing wrong with fine-tuning the supported runtime list in one pr, then bumping the default (and hashing out any issues) in a separate pr
s
Ok. I’ll try and carve out a little time in the next week or two to do a PR to add 3.13 as an allowed runtime. My dev env is out of date so might take me a little while to get it updated and working again. Then those of us with a non-prod env can test policies and submit bugs. A few months later after any issues are resolved a new PR can update the default. Then the next day 3.14 will be released :-D.
😅 1
a
Appreciate you jumping in with the question and contribution 🙌