Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cmd/generate-release/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ substitutions:
_RELEASE_BUCKET: '' # Required
_RELEASE_FOLDER: '' # Defaults to _VERSION
_CLOUDSDK_IMAGE: 'gcr.io/google.com/cloudsdktool/cloud-sdk:528.0.0-alpine'
_GOLANG_IMAGE: 'golang:1.25'
_BUILDPACK_WRAPPER_GOLANG_IMAGE: 'golang:1.17'
_GOLANG_IMAGE: 'golang:1.26'
_KO_VERSION: 'github.com/google/ko@v0.18.1'

timeout: '1800s'
Expand Down Expand Up @@ -339,7 +338,7 @@ steps:

done
- id: generate v2 wrapper buildpacks
name: "${_BUILDPACK_WRAPPER_GOLANG_IMAGE}"
name: "${_GOLANG_IMAGE}"
dir: /workspace
waitFor: ['build CLIs']
entrypoint: bash
Expand Down
24 changes: 13 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/fatih/color v1.13.0
github.com/gofrs/flock v0.8.1
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.7
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.8.1-0.20220216220642-00c59d91847c
github.com/google/k8s-stateless-subresource v0.0.0-00010101000000-000000000000
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702
Expand All @@ -33,8 +33,8 @@ require (
github.com/spf13/pflag v1.0.5
github.com/tektoncd/pipeline v0.36.0
go.uber.org/zap v1.19.1
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/sys v0.5.0
golang.org/x/sync v0.20.0
golang.org/x/sys v0.45.0
google.golang.org/api v0.70.0
google.golang.org/genproto v0.0.0-20220303160752-862486edd9cc
google.golang.org/protobuf v1.28.0
Expand Down Expand Up @@ -135,6 +135,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/klauspost/compress v1.14.4 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
Expand All @@ -158,7 +159,7 @@ require (
github.com/prometheus/statsd_exporter v0.21.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
Expand All @@ -180,14 +181,15 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/automaxprocs v1.4.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/tools v0.44.0 // indirect
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/grpc v1.44.0 // indirect
Expand Down Expand Up @@ -216,7 +218,7 @@ replace (
// Uploads API server
replace github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5

go 1.20
go 1.25.0

replace knative.dev/pkg => knative.dev/pkg v0.0.0-20220524202603-19adf798efb8

Expand Down
93 changes: 31 additions & 62 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pkg/kf/commands/buildpacks/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func setupJavaSpringMusic() acceptance.SourceCode {
cmd := exec.CommandContext(context.Background(), "./gradlew", "clean", "assemble")
out, err := cmd.CombinedOutput()
testutil.AssertNil(t, "./gradlew clean assemble", err)
integration.Logf(t, string(out))
integration.Logf(t, "%s", string(out))
},
}
}
Expand All @@ -84,12 +84,12 @@ func setupBinaryApp() acceptance.SourceCode {
cmd := exec.CommandContext(context.Background(), "go", "build", "main.go")
out, err := cmd.CombinedOutput()
testutil.AssertNil(t, "go build main.go", err)
integration.Logf(t, string(out))
integration.Logf(t, "%s", string(out))

cmd = exec.CommandContext(context.Background(), "mv", "main", "bin/main")
out, err = cmd.CombinedOutput()
testutil.AssertNil(t, "mv main bin/main", err)
integration.Logf(t, string(out))
integration.Logf(t, "%s", string(out))

man, err := manifest.New("binary-app")
man.Applications[0].Command = "./main"
Expand Down
7 changes: 4 additions & 3 deletions pkg/kf/commands/buildpacks/wrap-v2-buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,15 @@ EOF
return nil
}

// goGetRepos does a `go get` on each of the given repo. It then moves the
// goGetRepos does a `go install {repo}@latest` on each of the given repo. It then moves the
// contents to the output directory where the compiled artifacts will be
// included in the OCI container.
func goGetRepos(ctx context.Context, outputDir, buildpackName string, repos ...string) error {
logger := logging.FromContext(ctx)
for _, repo := range repos {
logger.Infof("Downloading repo (%s) to %s", repo, outputDir)
if out, err := goCommand(ctx, outputDir, "get", repo); err != nil {
return fmt.Errorf("failed to download repo: %v\n%s", err, out)
if out, err := goCommand(ctx, outputDir, "install", repo+"@latest"); err != nil {
return fmt.Errorf("failed to install repo: %v\n%s", err, out)
}
}

Expand Down Expand Up @@ -650,6 +650,7 @@ func goCommand(ctx context.Context, outputDir string, args ...string) (string, e
"GOOS=linux",
"GOCACHE=" + filepath.Join(outputDir, "gocache"),
"GOPATH=" + outputDir,
"GOBIN=" + filepath.Join(outputDir, "bin"),
}
out, err := cmd.CombinedOutput()
return string(out), err
Expand Down
6 changes: 3 additions & 3 deletions pkg/kf/commands/service-bindings/fix-orphaned-bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewFixOrphanedBindingsCommand(
// Case: App has been deleted, remove binding.
fmt.Fprintf(out, "Deleting binding %q which refers to a missing app %q\n", b.Name, appRef.Name)
deletedBindingsCount++
fmt.Fprintf(out, cmdColor.Sprintf(" kubectl delete serviceinstancebindings -n %q %q", p.Space, b.Name))
fmt.Fprintf(out, "%s", cmdColor.Sprintf(" kubectl delete serviceinstancebindings -n %q %q", p.Space, b.Name))
fmt.Fprintln(out)

if !dryRun {
Expand All @@ -116,7 +116,7 @@ func NewFixOrphanedBindingsCommand(
return err
}

fmt.Fprintf(out, cmdColor.Sprintf(
fmt.Fprintf(out, "%s", cmdColor.Sprintf(
` kubectl patch serviceinstancebinding -n %q %q --type=json -p='[{"op":"add", "path":"/metadata/ownerReferences", "value":[%s] }]'`,
p.Space,
b.Name,
Expand All @@ -142,7 +142,7 @@ func NewFixOrphanedBindingsCommand(
)
if dryRun {
fmt.Fprintf(
out, color.New(color.FgHiYellow).Sprint("Run with --dry-run=false to apply."))
out, "%s", color.New(color.FgHiYellow).Sprint("Run with --dry-run=false to apply."))
fmt.Fprintln(out)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/kf/internal/genericcli/xargs.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func NewXargsCommand(t Type, p *config.KfParams, spacesClient spaces.Client, opt

if flags.dryRun && !flags.generateScript {
fmt.Fprintf(
cmd.OutOrStdout(), color.New(color.FgHiYellow).Sprint("# Run with --dry-run=false to apply."))
cmd.OutOrStdout(), "%s", color.New(color.FgHiYellow).Sprint("# Run with --dry-run=false to apply."))
fmt.Fprintln(cmd.OutOrStdout())
}

Expand Down Expand Up @@ -251,8 +251,8 @@ func doSpace(
}

if err := p.Wait(); err != nil {
fmt.Fprintf(w, color.New(color.FgHiRed).Sprintf("Command '%v' failed: %v", shellescape.QuoteCommand(c), err))
fmt.Fprintf(w, color.New(color.Reset).Sprintln())
fmt.Fprintf(w, "%s", color.New(color.FgHiRed).Sprintf("Command '%v' failed: %v", shellescape.QuoteCommand(c), err))
fmt.Fprintf(w, "%s", color.New(color.Reset).Sprintln())
return err
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/kf/testutil/acceptance/acceptance_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func fetchApps(ctx context.Context, t *testing.T, apps []SourceCode) map[string]
cmd := exec.CommandContext(ctx, "git", "clone", app.Repo, appDir)
out, err := cmd.CombinedOutput()
testutil.AssertNil(t, "git clone", err)
integration.Logf(t, string(out))
integration.Logf(t, "%s", string(out))

// Setup the app directory
if app.Setup != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/kf/testutil/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ func CombineOutput(ctx context.Context, t *testing.T, out KfTestOutput) <-chan s
case <-ctx.Done():
return
case lines <- s.Text():
Logf(t, s.Text())
Logf(t, "%s", s.Text())
}
}
}
Expand Down Expand Up @@ -850,7 +850,7 @@ func Logf(t *testing.T, format string, i ...interface{}) {
return
}

t.Logf(lineWithPrefix)
t.Logf("%s", lineWithPrefix)
}

// StreamOutput writes the output of KfTestOutput to the testing.Log if
Expand All @@ -866,7 +866,7 @@ func StreamOutput(ctx context.Context, t *testing.T, out KfTestOutput, errs <-ch
return
case line, ok := <-lines:
if ok {
Logf(t, line)
Logf(t, "%s", line)
}
case err := <-errs:
if err != nil {
Expand Down
48 changes: 40 additions & 8 deletions third_party/VENDOR-LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4835,24 +4835,16 @@ THE SOFTWARE.

===========================================================
Module: github.com/liggitt/tabwriter
Module: golang.org/x/crypto
Module: golang.org/x/mod
Module: golang.org/x/mod
Module: golang.org/x/net
Module: golang.org/x/net
Module: golang.org/x/oauth2
Module: golang.org/x/oauth2
Module: golang.org/x/sync
Module: golang.org/x/sync
Module: golang.org/x/sys
Module: golang.org/x/sys
Module: golang.org/x/term
Module: golang.org/x/term
Module: golang.org/x/text
Module: golang.org/x/text
Module: golang.org/x/time
Module: golang.org/x/time
Module: golang.org/x/tools


Copyright (c) 2009 The Go Authors. All rights reserved.
Expand Down Expand Up @@ -6266,6 +6258,46 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


===========================================================
Module: golang.org/x/crypto
Module: golang.org/x/mod
Module: golang.org/x/net
Module: golang.org/x/sync
Module: golang.org/x/sys
Module: golang.org/x/term
Module: golang.org/x/text
Module: golang.org/x/tools


Copyright 2009 The Go Authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


===========================================================
Module: github.com/golang/protobuf
Module: github.com/golang/protobuf
Expand Down
17 changes: 12 additions & 5 deletions third_party/forked/v2-buildpack-lifecycle/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module code.cloudfoundry.org/buildpackapplifecycle

go 1.16
go 1.25.0

require (
code.cloudfoundry.org/archiver v0.0.0-20210922154202-074be9d9bcda
Expand All @@ -9,9 +9,16 @@ require (
code.cloudfoundry.org/credhub-cli v0.0.0-20210922204850-e4696d9a0b35
code.cloudfoundry.org/goshims v0.6.0
code.cloudfoundry.org/lager v2.0.0+incompatible
code.cloudfoundry.org/systemcerts v0.0.0-20200131000731-95ea366d9154 // indirect
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.16.0
golang.org/x/sys v0.0.0-20210921065528-437939a70204
golang.org/x/sys v0.45.0
gopkg.in/yaml.v2 v2.4.0
)

require (
code.cloudfoundry.org/systemcerts v0.0.0-20200131000731-95ea366d9154 // indirect
github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect
github.com/cloudfoundry/socks5-proxy v0.2.14 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/net v0.55.0 // indirect
)
Loading