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

feat: s2i builder go support #2203

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

Conversation

lkingland
Copy link
Member

@lkingland lkingland commented Mar 5, 2024

Changes

  • 🎁 S2I builder now supports Go functions
  • 🎁 S2I Go functions now include Instance-based method signatures and lifecycle events

/kind enhancement

Release Note

The S2I builder now supports Go functions.
Go functions built with the S2I builder now support the new instance-based method signatures and lifecycle methods.

Copy link

knative-prow bot commented Mar 5, 2024

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 Mar 5, 2024
@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 5, 2024
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 5, 2024
Copy link

knative-prow bot commented Mar 5, 2024

[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 rhuss and vyasgun March 5, 2024 05:59
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2024
cmd/build.go Outdated Show resolved Hide resolved
// such that the "go build" command builds subdirectory .s2i/builds/by-func/last
// (where main resides) rather than the root.
// TODO: many apps use the pattern of having main in a subdirectory, for
// example the idiomatic "./cmd/myapp/main.go". It would therefore be
Copy link
Member

Choose a reason for hiding this comment

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

can we raise a GH issue for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think we should.

pkg/builders/s2i/builder.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 21, 2024
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2024
@knative-prow knative-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 10, 2024
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 63.03142% with 200 lines in your changes are missing coverage. Please review.

Project coverage is 60.26%. Comparing base (b97d841) to head (e9b38dc).
Report is 85 commits behind head on main.

Files Patch % Lines
pkg/pipelines/tekton/pipelines_provider.go 38.57% 37 Missing and 6 partials ⚠️
pkg/builders/s2i/builder.go 67.81% 17 Missing and 11 partials ⚠️
pkg/functions/client.go 65.82% 23 Missing and 4 partials ⚠️
pkg/knative/deployer.go 26.92% 18 Missing and 1 partial ⚠️
pkg/pipelines/tekton/pipelines_pac_provider.go 0.00% 17 Missing ⚠️
cmd/describe.go 68.57% 7 Missing and 4 partials ⚠️
cmd/deploy.go 66.66% 5 Missing and 3 partials ⚠️
pkg/mock/pipelines_provider.go 57.89% 4 Missing and 4 partials ⚠️
cmd/root.go 73.91% 3 Missing and 3 partials ⚠️
pkg/pipelines/tekton/resources.go 40.00% 4 Missing and 2 partials ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2203      +/-   ##
==========================================
- Coverage   64.21%   60.26%   -3.95%     
==========================================
  Files         108      128      +20     
  Lines       13918    14831     +913     
==========================================
+ Hits         8937     8938       +1     
- Misses       4108     4976     +868     
- Partials      873      917      +44     
Flag Coverage Δ
e2e-test 38.02% <35.86%> (+0.65%) ⬆️
e2e-test-oncluster 31.15% <33.69%> (+0.65%) ⬆️
e2e-test-oncluster-runtime 27.36% <29.07%> (?)
e2e-test-runtime-go 26.01% <24.45%> (?)
e2e-test-runtime-node 27.08% <32.33%> (?)
e2e-test-runtime-python 27.00% <31.79%> (?)
e2e-test-runtime-quarkus 27.10% <32.06%> (?)
e2e-test-runtime-rust 26.11% <24.45%> (?)
e2e-test-runtime-springboot 26.14% <24.45%> (?)
e2e-test-runtime-typescript 27.17% <32.33%> (?)
integration-tests 50.17% <60.39%> (+0.32%) ⬆️
unit-tests-macos-latest ?
unit-tests-ubuntu-latest 48.83% <46.78%> (-0.76%) ⬇️
unit-tests-windows-latest 47.39% <49.16%> (-1.48%) ⬇️

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.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 2, 2024
lkingland and others added 6 commits May 6, 2024 16:40
- Pulls logic for defaulting to active namespace (K8S) moved UP to CLI during
  flag default calculation.
- Pushes logic of deciding between f.Namespace vs f.Deploy.Namespace down into
  implementations.
- Updates some tests which needed to have their environment cleared.
- Refactors Pipelines tests to use client API.
- Removes namespaces as a state variable all structures, instead passing as
  an argument.
- Moves FromTempDirectory to testing package for use outside cmd.
bumping google.golang.org/api 64f40ff...a11ef60:
  > a11ef60 chore(main): release 0.177.0 (# 2545)
  > e6e5ac5 chore(all): update all (# 2552)
  > 3eb92f1 fix: temp patch cloud.google.com/go ambiguity (# 2560)
  > 1b6db6c fix: split large compute file up (# 2546)
  > fb153c0 feat(all): auto-regenerate discovery clients (# 2556)
  > a5d7734 chore(deps): disable otel updates until Go 1.21 (# 2554)
  > 2f46e14 feat(all): auto-regenerate discovery clients (# 2553)
  > 4418f5f feat(all): auto-regenerate discovery clients (# 2551)
  > f9bf96d feat(all): auto-regenerate discovery clients (# 2550)
  > 32a5d10 feat(all): auto-regenerate discovery clients (# 2548)
  > 2f2505b feat: reduce code size by 29% (# 2544)
bumping knative.dev/eventing 0e165f2...07ebf11:
  > 07ebf11 [main] Upgrade to latest dependencies (# 7891)
bumping google.golang.org/genproto/googleapis/rpc 8c6c420...8cf5692:
  > 8cf5692 chore(all): update all (# 1122)
bumping knative.dev/serving 4fe3de5...e3fa8d1:
  > e3fa8d1 Update net-istio nightly (# 15185)
  > 9f695f3 Update net-gateway-api nightly (# 15183)
  > 2ef687c upgrade to latest dependencies (# 15182)
bumping google.golang.org/protobuf ec47fd1...242df22:
  > 242df22 all: release v1.34.0
  > c2b76ee all: fix deprecated
  > e4ad8f9 types/gofeaturespb: move go_feature.proto to be consistent with out languages
  > c2a26e7 encoding/{protojson,prototext}: strengthen wording on stability
  > d0f77ae proto: ensure MarshalOptions are plumbed to all Size calls
  > 94bb78c proto: return an error instead of producing invalid wire format
  > 671c2db [proto] use the correct parent when resolving features for extensions
  > 98873a2 internal/impl: pass ExtensionTypeDescriptor to extensionMap
  > 39bbf13 proto: CSE ProtoReflect() and TypeDescriptor() in proto.HasExtension
  > b30b634 protobuf: fix required/group bug in descriptor proto output of editions files
  > bab4b5d protobuf: support gaps in edition defaults calculation
  > a18684d protobuf: fix delimited fields under editions in go
  > 8a74430 internal/cmd/generate-types: manual CSE of m.messageInfo()
  > 55891d7 proto: add examples for Size, MarshalAppend (regarding allocations)
  > 87fded5 internal/impl: ensure proto.HasExtension does not allocate
  > 3797f00 protogen: update Options documentation. protogen.Run doesn't exist.
  > 4fd828f proto: extend Unmarshal documentation, include an example
  > c69658e proto: extend Marshal documentation, include an example
  > 3ebf7dd proto: fix HasPresence for extensions and missing plugin response
  > dea00b5 all: enable editions support
  > 59034d8 reflect/protodesc: restore edition in protodesc.ToDescriptorProto
  > 3039476 all: implement proto2/proto3 as editions [2/2]
  > 7259b46 all: implement proto2/proto3 as editions [1/2]
  > f563685 all: use subtests to identify the message type
  > e216807 all: start v1.33.0-devel
bumping golang.org/x/oauth2 d0e617c...84cb9f7:
  > 84cb9f7 oauth2: fix typo in comment
  > 4b7f0bd go.mod: update cloud.google.com/go/compute/metadata dependency
  > e11eea8 microsoft: added DeviceAuthURL to AzureADEndpoint
bumping knative.dev/pkg b69fa27...f69d19c:
  > f69d19c Bump golang.org/x/oauth2 from 0.19.0 to 0.20.0 (# 3029)
  > 13af413 Bump google.golang.org/api from 0.176.1 to 0.177.0 (# 3028)
bumping knative.dev/networking 979f637...6886f78:
  > 6886f78 Update community files (# 975)
  > 9188dac Remove requestDelay flag for tests (# 972)
  > 24ed062 Update test dialer to use ip when available (# 970)
  > 5f9768c Update community files (# 969)

Signed-off-by: Knative Automation <automation@knative.team>
Signed-off-by: Knative Automation <automation@knative.team>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 9, 2024
@lkingland lkingland requested review from matejvasek and gauron99 and removed request for rhuss and vyasgun May 10, 2024 00:20
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 13, 2024
@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.

None yet

4 participants