Skip to content
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

[WIP] Python Middleware v2 Scaffolding #2685

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

lkingland
Copy link
Member

@lkingland lkingland commented Feb 4, 2025

Changes

  • 🧹 Cleans up .gitignore
  • 🎁 Updates Python Template Tests to use pytest
  • 🎁 Updates Python middleware on make update-runtimes
  • 🧹 removes broken interactive prompts from run command pending forthcoming UX update
  • 🎁 Can now func run Python Functions locally outside of a container (no container runtime required)
  • 🎁 Python Functions now suppport instanced method signatures
  • 🎁 Python Functions now support lifecycle events (start, stop, readiness, liveness)
  • 🎁 Python Functions now use the ASGI Spec and run using an ASGI optimized server
  • 🎁 Host builder now supports Python Functions
  • 🧹 Clean up of the repository management code
  • 🎁 adds support for base images to the OCI builder

/kind enhancement

Fixes #

Release Note

Python Functions now use the ASGI specification for method signature.
Python Functions now support instances and lifecycle events.  See the new templates for details.
The Host builder now can build and run Python functions locally without a container.

Docs


Copy link

knative-prow bot commented Feb 4, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow knative-prow bot added kind/enhancement do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 4, 2025
Copy link

knative-prow bot commented Feb 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot requested review from jrangelramos and rhuss February 4, 2025 13:39
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 4, 2025
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 4, 2025
@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 4, 2025
@matzew
Copy link
Member

matzew commented Feb 7, 2025

nice for getting this started

@lkingland lkingland force-pushed the scaffolding-python branch from ec91040 to 182c74c Compare March 4, 2025 07:00
@lkingland lkingland force-pushed the scaffolding-python branch from b813d8c to 269a8b2 Compare March 6, 2025 09:57
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2025
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 5.62162% with 873 lines in your changes missing coverage. Please review.

Project coverage is 25.47%. Comparing base (fd43db9) to head (7f8f2a8).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/oci/builder.go 0.00% 632 Missing ⚠️
pkg/oci/python_builder.go 0.00% 114 Missing ⚠️
pkg/functions/runner.go 0.00% 75 Missing ⚠️
pkg/oci/go_builder.go 0.00% 25 Missing ⚠️
pkg/functions/repository.go 84.74% 7 Missing and 2 partials ⚠️
pkg/scaffolding/detectors.go 0.00% 8 Missing ⚠️
cmd/build.go 0.00% 4 Missing ⚠️
cmd/run.go 0.00% 3 Missing ⚠️
pkg/oci/pusher.go 0.00% 2 Missing ⚠️
pkg/scaffolding/scaffold.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (fd43db9) and HEAD (7f8f2a8). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (fd43db9) HEAD (7f8f2a8)
1 0
unit-tests-macos-latest 1 0
unit-tests-ubuntu-latest 1 0
unit-tests-windows-latest 1 0
e2e-test 1 0
integration-tests 1 0
e2e-test-oncluster 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2685       +/-   ##
===========================================
- Coverage   64.03%   25.47%   -38.56%     
===========================================
  Files         131      110       -21     
  Lines       15606    15117      -489     
===========================================
- Hits         9993     3851     -6142     
- Misses       4659    10772     +6113     
+ Partials      954      494      -460     
Flag Coverage Δ
e2e-test ?
e2e-test-oncluster ?
e2e-test-runtime-node 25.28% <5.62%> (?)
e2e-test-runtime-quarkus 25.43% <5.62%> (?)
e2e-test-runtime-rust 24.40% <5.62%> (?)
e2e-test-runtime-springboot 24.44% <5.62%> (?)
integration-tests ?
unit-tests-macos-latest ?
unit-tests-ubuntu-latest ?
unit-tests-windows-latest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2025
@knative-prow-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants