-
Notifications
You must be signed in to change notification settings - Fork 243
fix: python version and sdk resolutions #1091
Conversation
that's much better and I would rather go that route. I originally attempted to use build args to configure the entry point for lambdaric but had tons of issues, so the simple solution totally escaped me! |
Yes and no, the
|
Fix for the find issue in 3.12 base image here if you want d6aeb54 basically just swap |
thats such a strange variance between the base images. thanks for the fix should be good now! @cmanou |
Yeah it was one of changes from Amazon Linux 2 to 2023 where they did a bunch of pruning that confused people amazonlinux/amazon-linux-2023#355 |
This ended up being a way more significant PR than planned, but to get around to not being able to inject links into the environment, I had to do a much more convoluted build pipeline. There are a few benefits of these changes; monorepo structures should work as now all relative children pyi/pyi files are included in the artifact (this might close sst/sst#4114). I am not sure if I understand their issue properly. This will not hit the 4kb env var limit, and all Python versions are now supported. The SDK is also under the SST namespace. (I will need to change the URL in the example before merging this, but it needs to resolve to a remote git branch, and currently, only my fork has the changes to the SDK) from sst import Resource
def handler(event, context):
return {
"statusCode": 200,
"body": f"{Resource.MyLinkableValue.foo} from Python!",
} This is fully typesafe using a generated Python type stub. (tracking the stub file in git is optional) |
@walln this didn't fixed sst/sst#4114, I realized my understanding of the problem was wrong see the example and fix here #1141. Basically findAbove starts returning an absolute path if the pyproject is up a directory from the handler which breaks the paths for copies after. |
hi @cmanou, @walln, it looks something is broken in below commit. i'm using sst v3.1.49. i tried to use python 3.12 runtime with docker container mode but i found python 3.11 docker image was used. |
Added support for all AWS supported python runtimes except for 3.8 since it gets deprecated in October, and aligned all template pyproject.toml files to ensure local dev is consistent.
Something is wrong with resource linking and its not just a python function issue, waiting on some changes for that potentially, so this is not ready to merge.