Move S2I scaffolding from .s2i/ to .func/build/ for go/python runtimes.#3436
Move S2I scaffolding from .s2i/ to .func/build/ for go/python runtimes.#3436gauron99 wants to merge 1 commit intoknative:mainfrom
Conversation
Add test for scaffold output path
|
Skipping CI for Draft Pull Request. |
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // 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" { |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Might want to use filepath.Join for consistency
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
note: podman failure is related to this PR, override it |
.s2i/*files during s2i build with scaffold-enabled runtimes into.func/buildto align it with the other builders. All should now be the same.