Skip to content

Move S2I scaffolding from .s2i/ to .func/build/ for go/python runtimes.#3436

Draft
gauron99 wants to merge 1 commit intoknative:mainfrom
gauron99:push-nnvsznoykpvn
Draft

Move S2I scaffolding from .s2i/ to .func/build/ for go/python runtimes.#3436
gauron99 wants to merge 1 commit intoknative:mainfrom
gauron99:push-nnvsznoykpvn

Conversation

@gauron99
Copy link
Contributor

  • Move the generated .s2i/* files during s2i build with scaffold-enabled runtimes into .func/build to align it with the other builders. All should now be the same.
  • Update Tekton pipelines to use custom assemble scripts for Go/Python

@knative-prow
Copy link

knative-prow bot commented Feb 13, 2026

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 13, 2026
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 13, 2026
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 60.52632% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.76%. Comparing base (990fd9d) to head (6f88c86).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/s2i/builder.go 75.00% 4 Missing and 2 partials ⚠️
pkg/s2i/scaffolder.go 16.66% 2 Missing and 3 partials ⚠️
pkg/oci/scaffolder.go 0.00% 1 Missing and 1 partial ⚠️
pkg/pipelines/tekton/templates.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3436      +/-   ##
==========================================
- Coverage   54.51%   51.76%   -2.75%     
==========================================
  Files         179      179              
  Lines       20274    20290      +16     
==========================================
- Hits        11052    10504     -548     
- Misses       8050     8714     +664     
+ Partials     1172     1072     -100     
Flag Coverage Δ
e2e 36.72% <10.71%> (-1.71%) ⬇️
e2e go ?
e2e node ?
e2e python 32.17% <50.00%> (+0.02%) ⬆️
e2e quarkus ?
e2e rust ?
e2e springboot ?
e2e typescript ?
integration ?
unit macos-14 42.35% <53.57%> (+0.11%) ⬆️
unit macos-latest 42.35% <53.57%> (+0.12%) ⬆️
unit ubuntu-24.04-arm 42.63% <60.52%> (+0.09%) ⬆️
unit ubuntu-latest 43.24% <53.57%> (+0.12%) ⬆️
unit windows-latest 42.37% <53.57%> (+0.11%) ⬆️

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.

Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

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

So glad to see us using .func consistently now

// Scaffold the function so that it can be built via oci builder.
// 'path' is an optional override. Assign "" (empty string) most of the time
func (s Scaffolder) Scaffold(ctx context.Context, f fn.Function, path string) error {
if f.Runtime != "go" && f.Runtime != "python" {
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: Perhaps HasScaffolding

if repoErr != nil {
return fmt.Errorf("unable to load the embedded scaffolding: %w", repoErr)
}
middlewareVersion, mwErr := scaffolding.MiddlewareVersion(f.Root, f.Runtime, f.Invoke, embeddedRepo.FS())
Copy link
Member

Choose a reason for hiding this comment

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

We might want to put a note here about why ony languages which have scaffolding get their middlewareVersion populated.

I suspect it's because, if it's out of date, the operator will try rebuilding it repeatedly.

}

// Assert: scaffolding should be in .func/build/
expectedPath := root + "/" + fn.RunDataDir + "/build"
Copy link
Member

Choose a reason for hiding this comment

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

Might want to use filepath.Join for consistency

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2026
@knative-prow
Copy link

knative-prow bot commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, lkingland

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

The pull request process is described here

Details 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

@matejvasek
Copy link
Contributor

note: podman failure is related to this PR, override it

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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants