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

[release-1.11] backports for release-1.11.1 #1998

Merged
merged 21 commits into from
Oct 2, 2023

Conversation

matejvasek
Copy link
Contributor

@matejvasek matejvasek commented Sep 27, 2023

Changes

  • Fixed parsing of image repositories with more complex hierarchy (sub-paths). Example of such registry: us-central1-docker.pkg.dev/my-gcpproject/team/user.

  • Fixed possible infinite hang on Windows with "host" builder.

  • Fixed issue where on cluster build fails because of insufficient permissions on some clusters.

  • Enabled buildpack on-cluster-build for Go and Rust.

  • Enabled s2i on-cluster-build on aarch64, ppc64le and s390x clusters.

  • Updated buildah image reference in s2i tekton task.

  • Updated Quarkus version in templates.

  • Updated Spring Boot version in templates.

fix: parsing of image repositories with more complex hierarchy; e.g. 'example.com/org/suborg/user'
fix: issue where on cluster build fails because of insufficient permissions on some clusters
feat: enabled buldpack on cluster build for Go and Rust
feat: enabled s2i on cluster build for aarch64 ppc64le and s390x clusters
feat: the 'func environment' sub-command now reports URLs of used tekton tasks

jrangelramos and others added 3 commits September 27, 2023 17:39
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Without this change prow test will refer tkn yamls from the main branch
not from the PR head branch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow
Copy link

knative-prow bot commented Sep 27, 2023

@matejvasek: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

Changes

/kind

Fixes #

Release Note


Docs


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/test-infra repository.

@knative-prow
Copy link

knative-prow bot commented Sep 27, 2023

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 the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 27, 2023
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 27, 2023
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 27, 2023
@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 27, 2023
@matejvasek matejvasek changed the base branch from main to release-1.11 September 27, 2023 15:49
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 27, 2023
* Minimize release binary size.
* Release latest version of buildpack tekton task.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (0d6e210) 61.98% compared to head (347fe51) 62.77%.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.11    #1998      +/-   ##
================================================
+ Coverage         61.98%   62.77%   +0.78%     
================================================
  Files               107      107              
  Lines             13804    13833      +29     
================================================
+ Hits               8557     8684     +127     
+ Misses             4397     4269     -128     
- Partials            850      880      +30     
Flag Coverage Δ
e2e-test 35.47% <7.40%> (-0.02%) ⬇️
e2e-test-oncluster 30.80% <46.29%> (+0.07%) ⬆️
e2e-test-oncluster-runtime 25.60% <16.66%> (?)
e2e-test-runtime-go 25.92% <7.40%> (?)
e2e-test-runtime-node 26.92% <7.40%> (?)
e2e-test-runtime-python 26.92% <7.40%> (?)
e2e-test-runtime-quarkus 27.04% <7.40%> (?)
e2e-test-runtime-rust 25.92% <7.40%> (?)
e2e-test-runtime-springboot 26.06% <7.40%> (?)
e2e-test-runtime-typescript 27.04% <7.40%> (?)
integration-tests 51.47% <57.40%> (+2.11%) ⬆️
unit-tests-macos-latest 48.65% <48.14%> (-0.05%) ⬇️
unit-tests-ubuntu-latest 49.41% <48.14%> (-0.05%) ⬇️
unit-tests-windows-latest 48.65% <53.70%> (-0.08%) ⬇️

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

Files Coverage Δ
pkg/builders/buildpacks/builder.go 65.73% <ø> (ø)
pkg/functions/client.go 65.94% <ø> (ø)
pkg/k8s/persistent_volumes.go 71.79% <100.00%> (ø)
pkg/k8s/security_context.go 89.28% <100.00%> (ø)
pkg/pipelines/tekton/pipelines_pac_provider.go 43.20% <50.00%> (+37.61%) ⬆️
pkg/pipelines/tekton/validate.go 88.23% <0.00%> (-1.77%) ⬇️
pkg/functions/function.go 85.85% <57.14%> (+0.04%) ⬆️
pkg/oci/builder.go 63.79% <62.50%> (-9.27%) ⬇️
pkg/pipelines/tekton/templates.go 70.64% <70.00%> (+0.64%) ⬆️
pkg/pipelines/tekton/pipelines_provider.go 58.44% <77.77%> (+3.13%) ⬆️
... and 1 more

... and 2 files with indirect coverage changes

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

@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 27, 2023
jrangelramos and others added 11 commits September 27, 2023 19:04
Our image is much more recent and it is multiarch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Knative Automation <automation@knative.team>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: docker registry/repository parsing

Use go-containerregistry to do parsing.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: use kebab-case instead of camelCase

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: use kebab-case instead of camelCase

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
* src: better debugging

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: wait for both builds

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: detection of process liveness on Windows

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: make symlink relative

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: cleanup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
@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 Sep 27, 2023
* chore: use custom jammy paketo builder

Use our own modified jammy builder with additional buildpacks for
GoFunc and Rust. This enables on cluster build for Go and Rust functions.
Where possible (Go, Java) we use "tiny" variant, other runtimes use "base"
variant.

The updated task is new file instead of modifying existing task
this is done for sake of keeping compatiblility.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: remove unnecessary code per review request

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: podman test refers correct tkn task yamls

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
* doc: Go and Rust on cluster build is supported

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* doc: build envvars

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@matejvasek
Copy link
Contributor Author

PTAL @gauron99 @lkingland @jrangelramos

@matejvasek matejvasek changed the title [WIP] [release-1.11] backports for release-1.11.1 [release-1.11] backports for release-1.11.1 Sep 27, 2023
@matejvasek
Copy link
Contributor Author

/ok-to-test

@knative-prow knative-prow bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 27, 2023
@matejvasek matejvasek marked this pull request as ready for review September 27, 2023 20:16
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 27, 2023
@matejvasek
Copy link
Contributor Author

PTAL @lkingland @gauron99 @jrangelramos

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.

Hugely significant PR; great work Matej!

Comment on lines -570 to -580
registryTokens := strings.Split(f.Registry, "/")
if len(registryTokens) == 1 { // only namespace provided: ex. 'alice'
image = DefaultRegistry + "/" + f.Registry + "/" + f.Name
} else if len(registryTokens) == 2 || len(registryTokens) == 3 {
// registry/namespace ('quay.io/alice') or
// registry/parent-namespace/namespace ('quay.io/project/alice') provided
image = f.Registry + "/" + f.Name
} else if len(registryTokens) > 3 { // the name of the image is also provided `quay.io/alice/my.function.name`
return "", fmt.Errorf("registry should be either 'namespace', 'registry/namespace' or 'registry/parent/namespace', the name of the image will be derived from the function name")
}

Copy link
Member

Choose a reason for hiding this comment

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

🎉

Comment on lines +239 to +241
if runtime.GOOS == "windows" {
return true
}
Copy link
Member

Choose a reason for hiding this comment

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

I like the effect; a shame it requires an if windows! A comment on why this exists will help future supporters who are not aware of why this was necessary :/ I can add that on a future PR though.

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [lkingland,matejvasek]

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 merged commit 82c7610 into knative:release-1.11 Oct 2, 2023
42 checks passed
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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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

5 participants