Skip to content

feat(sdk/python): Improve Python runtime module - #7880

Merged
sipsma merged 8 commits into
dagger:mainfrom
helderco:helder/dev-update-python-runtime
Jul 11, 2024
Merged

sipsma merged 8 commits into
dagger:mainfrom
helderco:helder/dev-update-python-runtime

Conversation

@helderco

@helderco helderco commented Jul 11, 2024 •

Copy link
Copy Markdown
Contributor

Notable improvements

  • Experimental support for uv.lock for project management. 🎉
  • Install uv from OCI image for better parallelization. 🚀
  • Don’t install dependencies during dagger develop to avoid a catch 22 situation where you need an updated sdk dir to update the lock but you can’t dagger develop because you need an updated lock.
  • Use the system’s certificate chain for TLS in uv rather than the Rust library it comes with which may not work correctly when our custom certificates configuration.

Other

  • Don’t create a virtual env, just use the system Python
  • Stop generating hashes in requirements.lock because it’s been checked only if uv is disabled (i.e., using pip), and there’s a better workflow with uv.lock now
  • Don’t create a dynamic base container pipeline based on user config to avoid cache invalidation from one module to the next by always installing uv and taking advantage of it for the codegen, for example, even if uv is disabled for the module’s source.

Fixes #7430

@helderco helderco added this to the v0.12.0 milestone Jul 11, 2024
@helderco
helderco force-pushed the helder/dev-update-python-runtime branch from 9f20bb1 to 5d6dc28 Compare July 11, 2024 13:18
@helderco
helderco marked this pull request as ready for review July 11, 2024 13:18
@helderco
helderco requested a review from jedevc July 11, 2024 13:18
@helderco
helderco force-pushed the helder/dev-update-python-runtime branch from 5d6dc28 to 0aa87c9 Compare July 11, 2024 14:04

@jedevc jedevc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense 🎉 Left a couple minor comments, but I'll trust your python here!

Comment thread core/integration/module_python_test.go Resolved
Comment thread dev/sdk_python.go Resolved
Comment thread sdk/python/runtime/Dockerfile Resolved
@helderco
helderco force-pushed the helder/dev-update-python-runtime branch 4 times, most recently from c96c5d6 to f099c2c Compare July 11, 2024 22:53
helderco added 8 commits July 11, 2024 22:54
Most notably:
- Experimental support for `uv.lock`
- Install uv from OCI image for performance gains
- Don't install dependendencies during `dagger develop` to avoid a catch 22 situation
- Use the system's native certificates store (TLS) with uv

Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
@helderco
helderco force-pushed the helder/dev-update-python-runtime branch from f099c2c to 434fbe0 Compare July 11, 2024 22:54
@sipsma
sipsma merged commit b37ec01 into dagger:main Jul 11, 2024
@helderco
helderco deleted the helder/dev-update-python-runtime branch July 11, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indicate that python scripts need not be wholly placed in __init__.py

3 participants