From dd2027c14e2d7a5240f2a3c8b6e49fcf2ed63f3c Mon Sep 17 00:00:00 2001 From: tejal29 Date: Tue, 16 Aug 2022 09:08:45 -0700 Subject: [PATCH] revert gofmted files --- cmd/skaffold/app/exitcode.go | 3 +- cmd/skaffold/app/exitcode_test.go | 1 - go.mod | 2 +- go.sum | 2 + integration/debug_test.go | 2 +- integration/deploy_cloudrun_test.go | 5 +-- integration/deploy_test.go | 16 +++---- integration/run_test.go | 1 - pkg/diag/version/version.go | 3 +- pkg/skaffold/build/kaniko/args_test.go | 3 +- pkg/skaffold/build/scheduler_test.go | 10 ++--- pkg/skaffold/debug/cnb.go | 42 +++++++++---------- pkg/skaffold/debug/transform.go | 8 ++-- pkg/skaffold/deploy/cloudrun/accessor.go | 3 +- pkg/skaffold/deploy/cloudrun/accessor_test.go | 3 +- pkg/skaffold/deploy/cloudrun/cloudrun.go | 3 +- pkg/skaffold/deploy/cloudrun/deploy.go | 3 +- pkg/skaffold/deploy/cloudrun/deploy_test.go | 3 +- pkg/skaffold/deploy/cloudrun/status.go | 2 +- pkg/skaffold/deploy/cloudrun/status_test.go | 3 +- pkg/skaffold/deploy/docker/port/port.go | 10 ++--- pkg/skaffold/filemon/changes_test.go | 3 +- pkg/skaffold/helm/bin.go | 2 +- pkg/skaffold/kubernetes/loader/load.go | 4 +- pkg/skaffold/kubernetes/manifest/manifests.go | 1 - .../kubernetes/status/resource/deployment.go | 4 +- pkg/skaffold/render/generate/generate_test.go | 2 +- pkg/skaffold/render/renderer/kpt/kpt_test.go | 3 +- .../render/renderer/kubectl/kubectl_test.go | 3 +- .../render/transform/transform_test.go | 3 +- pkg/skaffold/render/validate/validate.go | 3 +- pkg/skaffold/render/validate/validate_test.go | 3 +- pkg/skaffold/schema/util/yaml.go | 1 - pkg/skaffold/schema/v1/upgrade.go | 12 +++--- pkg/skaffold/schema/v1alpha1/upgrade.go | 22 +++++----- pkg/skaffold/schema/v1alpha2/upgrade.go | 4 +- pkg/skaffold/schema/v1alpha3/upgrade.go | 17 ++++---- pkg/skaffold/schema/v1alpha4/upgrade.go | 3 +- pkg/skaffold/schema/v1alpha5/upgrade.go | 2 - pkg/skaffold/schema/v1beta10/upgrade.go | 3 +- pkg/skaffold/schema/v1beta14/upgrade.go | 8 ++-- pkg/skaffold/schema/v1beta15/upgrade.go | 8 ++-- pkg/skaffold/schema/v1beta16/upgrade.go | 8 ++-- pkg/skaffold/schema/v1beta17/upgrade.go | 8 ++-- pkg/skaffold/schema/v1beta8/upgrade.go | 8 ++-- pkg/skaffold/schema/v1beta9/upgrade.go | 5 +-- pkg/skaffold/schema/v2alpha1/upgrade.go | 8 ++-- pkg/skaffold/schema/v2alpha2/upgrade.go | 2 +- pkg/skaffold/schema/v2beta28/upgrade.go | 8 ++-- pkg/skaffold/schema/v2beta3/upgrade.go | 2 +- pkg/skaffold/schema/v2beta4/upgrade.go | 10 ++--- pkg/skaffold/schema/v2beta5/upgrade.go | 4 +- pkg/skaffold/schema/v2beta6/upgrade.go | 4 +- pkg/skaffold/schema/v2beta8/upgrade.go | 2 +- pkg/skaffold/schema/v2beta9/upgrade.go | 2 +- pkg/skaffold/sync/sync_test.go | 37 ---------------- 56 files changed, 141 insertions(+), 206 deletions(-) diff --git a/cmd/skaffold/app/exitcode.go b/cmd/skaffold/app/exitcode.go index 646741f6886..5601dc8338c 100644 --- a/cmd/skaffold/app/exitcode.go +++ b/cmd/skaffold/app/exitcode.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package app import ( diff --git a/cmd/skaffold/app/exitcode_test.go b/cmd/skaffold/app/exitcode_test.go index 6027bc1ba4a..a0a075bec75 100644 --- a/cmd/skaffold/app/exitcode_test.go +++ b/cmd/skaffold/app/exitcode_test.go @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package app import ( diff --git a/go.mod b/go.mod index 8d4eeb18677..d6dc3ec90bf 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/golang/glog v1.0.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/golang/protobuf v1.5.2 - github.com/google/go-cmp v0.5.7 + github.com/google/go-cmp v0.5.8 github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839 github.com/google/go-github v17.0.0+incompatible github.com/google/ko v0.11.2 diff --git a/go.sum b/go.sum index f37017c0645..936789d67d9 100644 --- a/go.sum +++ b/go.sum @@ -1166,6 +1166,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.0.0-20191010200024-a3d713f9b7f8/go.mod h1:KyKXa9ciM8+lgMXwOVsXi7UxGrsf9mM61Mzs+xKUrKE= github.com/google/go-containerregistry v0.1.2/go.mod h1:GPivBPgdAyd2SU+vf6EpsgOtWDuPqjW0hJZt4rNdTZ4= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= diff --git a/integration/debug_test.go b/integration/debug_test.go index 2f243b248f9..1725d05a444 100644 --- a/integration/debug_test.go +++ b/integration/debug_test.go @@ -245,7 +245,7 @@ func TestDebugEventsRPC_NoStatusCheck(t *testing.T) { waitForDebugEvent(t, client, rpcAddr) } -// nolint add lint back after https://github.com/GoogleContainerTools/skaffold/issues/7405 +//nolint add lint back after https://github.com/GoogleContainerTools/skaffold/issues/7405 func waitForDebugEvent(t *testing.T, client *NSKubernetesClient, rpcAddr string) { client.WaitForPodsReady() diff --git a/integration/deploy_cloudrun_test.go b/integration/deploy_cloudrun_test.go index 920f2af4e51..c233493fbf4 100644 --- a/integration/deploy_cloudrun_test.go +++ b/integration/deploy_cloudrun_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package integration import ( @@ -44,7 +43,6 @@ func TestDeployCloudRun(t *testing.T) { } // TODO: remove nolint when test is unskipped -// //nolint:unused func getRunService(ctx context.Context, project, region, service string) (*run.Service, error) { crclient, err := run.NewService(ctx, gcp.ClientOptions(ctx)...) @@ -57,7 +55,6 @@ func getRunService(ctx context.Context, project, region, service string) (*run.S } // TODO: remove nolint when test is unskipped -// //nolint:unused func checkReady(svc *run.Service) error { var ready *run.GoogleCloudRunV1Condition diff --git a/integration/deploy_test.go b/integration/deploy_test.go index 2f7e975c2f3..4d5e5fb66de 100644 --- a/integration/deploy_test.go +++ b/integration/deploy_test.go @@ -191,14 +191,14 @@ func TestDeployWithoutWorkspaces(t *testing.T) { } // Copies a file or directory tree. There are 2x3 cases: -// 1. If _src_ is a file, -// 1. and _dst_ exists and is a file then _src_ is copied into _dst_ -// 2. and _dst_ exists and is a directory, then _src_ is copied as _dst/$(basename src)_ -// 3. and _dst_ does not exist, then _src_ is copied as _dst_. -// 2. If _src_ is a directory, -// 1. and _dst_ exists and is a file, then return an error -// 2. and _dst_ exists and is a directory, then src is copied as _dst/$(basename src)_ -// 3. and _dst_ does not exist, then src is copied as _dst/src[1:]_. +// 1. If _src_ is a file, +// 1. and _dst_ exists and is a file then _src_ is copied into _dst_ +// 2. and _dst_ exists and is a directory, then _src_ is copied as _dst/$(basename src)_ +// 3. and _dst_ does not exist, then _src_ is copied as _dst_. +// 2. If _src_ is a directory, +// 1. and _dst_ exists and is a file, then return an error +// 2. and _dst_ exists and is a directory, then src is copied as _dst/$(basename src)_ +// 3. and _dst_ does not exist, then src is copied as _dst/src[1:]_. func copyFiles(dst, src string) error { if util.IsFile(src) { switch { diff --git a/integration/run_test.go b/integration/run_test.go index ddeca0f2e12..7a09b32c475 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -36,7 +36,6 @@ const ( // Note: `custom-buildx` is not included as it depends on having a // `skaffold-builder` builder configured and a registry to push to. // TODO: remove nolint once we've reenabled integration tests -// //nolint:golint,unused var tests = []struct { description string diff --git a/pkg/diag/version/version.go b/pkg/diag/version/version.go index b7bb6210dd9..a59368ff54d 100644 --- a/pkg/diag/version/version.go +++ b/pkg/diag/version/version.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package version import ( diff --git a/pkg/skaffold/build/kaniko/args_test.go b/pkg/skaffold/build/kaniko/args_test.go index 945bab794ea..fbd1890cb1a 100644 --- a/pkg/skaffold/build/kaniko/args_test.go +++ b/pkg/skaffold/build/kaniko/args_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package kaniko import ( diff --git a/pkg/skaffold/build/scheduler_test.go b/pkg/skaffold/build/scheduler_test.go index ea052382567..294c1350b51 100644 --- a/pkg/skaffold/build/scheduler_test.go +++ b/pkg/skaffold/build/scheduler_test.go @@ -384,12 +384,10 @@ func TestInOrderForArgs(t *testing.T) { // setDependencies constructs a graph of artifact dependencies using the map as an adjacency list representation of indices in the artifacts array. // For example: -// -// m = { -// 0 : {1, 2}, -// 2 : {3}, -// } -// +// m = { +// 0 : {1, 2}, +// 2 : {3}, +// } // implies that a[0] artifact depends on a[1] and a[2]; and a[2] depends on a[3]. func setDependencies(a []*latest.Artifact, d map[int][]int) { for k, dep := range d { diff --git a/pkg/skaffold/debug/cnb.go b/pkg/skaffold/debug/cnb.go index d8408758f22..54785fcab62 100644 --- a/pkg/skaffold/debug/cnb.go +++ b/pkg/skaffold/debug/cnb.go @@ -72,19 +72,19 @@ func hasCNBLauncherEntrypoint(ic ImageConfiguration) bool { // execution environment as configured by the various buildpacks, and then hands off to the // configured launch. The CNB launcher supports three types of launches: // -// 1. _predefined processes_ are named sets of command+arguments (similar to a container image's -// ENTRYPOINT/CMD). Processes are created by the buildpacks, and oftentimes there is a -// buildpack that parses a user's `Procfile` and turns those contents into processes. -// There are two types of process definitions: -// - *direct*: these are passed uninterpreted to os.exec; the command is resolved in PATH -// Note that in practice we see direct-style definitions that execute `/bin/sh -c ...` -// - *script*: the command is treated as a shell script and passed to `sh -c`, and any remaining -// arguments on the container command-line are added to the shell and so become available -// as positional arguments (see https://github.com/buildpacks/lifecycle/issues/218#issuecomment-567091462). -// For example: `sh -c 'echo $0 $1 $2 $3' arg0 arg1 arg2 arg3` => `arg0 arg1 arg2 arg3`. -// 2. _direct execs_: the user can provide a command-line which is treated like a _direct process_. -// 3. _shell scripts_: the user can provide a shell script as the first argument and any -// remaining arguments are available as positional arguments like _script processes_. +// 1. _predefined processes_ are named sets of command+arguments (similar to a container image's +// ENTRYPOINT/CMD). Processes are created by the buildpacks, and oftentimes there is a +// buildpack that parses a user's `Procfile` and turns those contents into processes. +// There are two types of process definitions: +// - *direct*: these are passed uninterpreted to os.exec; the command is resolved in PATH +// Note that in practice we see direct-style definitions that execute `/bin/sh -c ...` +// - *script*: the command is treated as a shell script and passed to `sh -c`, and any remaining +// arguments on the container command-line are added to the shell and so become available +// as positional arguments (see https://github.com/buildpacks/lifecycle/issues/218#issuecomment-567091462). +// For example: `sh -c 'echo $0 $1 $2 $3' arg0 arg1 arg2 arg3` => `arg0 arg1 arg2 arg3`. +// 2. _direct execs_: the user can provide a command-line which is treated like a _direct process_. +// 3. _shell scripts_: the user can provide a shell script as the first argument and any +// remaining arguments are available as positional arguments like _script processes_. // // Script-style launches support referencing environment variables since they are expanded by the shell. // @@ -92,14 +92,14 @@ func hasCNBLauncherEntrypoint(ic ImageConfiguration) bool { // the builder's lifecycle version, which is itself determined by the pack used to create a builder. // - In Platform API 0.3 (pack 0.12 and earlier / lifecycle 0.8 and earlier) the image entrypoint // is set to `/cnb/lifecycle/launcher`. The launch is determined by: -// 1. If there are arguments: -// 1. If there is a single argument and it matches a process type, then the corresponding -// process is launched. -// 2. If the first argument is `--` then the remaining arguments are treated as a _direct exec_. -// 3. Otherwise the first argument is treated as a shell script launch with the first -// argument as the script and remaining arguments are positional arguments to the script. -// 2. If there are no arguments, a process type is taken from the `CNB_PROCESS_TYPE` -// environment variable, defaulting to `web`. +// 1. If there are arguments: +// 1. If there is a single argument and it matches a process type, then the corresponding +// process is launched. +// 2. If the first argument is `--` then the remaining arguments are treated as a _direct exec_. +// 3. Otherwise the first argument is treated as a shell script launch with the first +// argument as the script and remaining arguments are positional arguments to the script. +// 2. If there are no arguments, a process type is taken from the `CNB_PROCESS_TYPE` +// environment variable, defaulting to `web`. // - In Platform API 0.4 (pack 0.13 / lifecycle 0.9) the process types are turned into executables // found in `/cnb/process/`, and the image entrypoint is set to the corresponding executable for // the default process type. `CNB_PROCESS_TYPE` is ignored in this situation. A different process diff --git a/pkg/skaffold/debug/transform.go b/pkg/skaffold/debug/transform.go index 3a375288e5c..547c3a3d293 100644 --- a/pkg/skaffold/debug/transform.go +++ b/pkg/skaffold/debug/transform.go @@ -39,10 +39,10 @@ be debuggable, we record this metadata using as a JSON object keyed by the conta Kubernetes requires that containers within a podspec are uniquely named. For example, a pod with two containers named `microservice` and `adapter` may be: - debug.cloud.google.com/config: '{ - "microservice":{"artifact":"node-example","runtime":"nodejs","ports":{"devtools":9229}}, - "adapter":{"artifact":"java-example","runtime":"jvm","ports":{"jdwp":5005}} - }' + debug.cloud.google.com/config: '{ + "microservice":{"artifact":"node-example","runtime":"nodejs","ports":{"devtools":9229}}, + "adapter":{"artifact":"java-example","runtime":"jvm","ports":{"jdwp":5005}} + }' Each configuration is itself a JSON object of type `types.ContainerDebugConfiguration`, with an `artifact` recording the corresponding artifact's `image` in the skaffold.yaml, diff --git a/pkg/skaffold/deploy/cloudrun/accessor.go b/pkg/skaffold/deploy/cloudrun/accessor.go index 5a18e70943c..95a1878ca33 100644 --- a/pkg/skaffold/deploy/cloudrun/accessor.go +++ b/pkg/skaffold/deploy/cloudrun/accessor.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import ( diff --git a/pkg/skaffold/deploy/cloudrun/accessor_test.go b/pkg/skaffold/deploy/cloudrun/accessor_test.go index 49ab6b25e0a..cf39ea93694 100644 --- a/pkg/skaffold/deploy/cloudrun/accessor_test.go +++ b/pkg/skaffold/deploy/cloudrun/accessor_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import ( diff --git a/pkg/skaffold/deploy/cloudrun/cloudrun.go b/pkg/skaffold/deploy/cloudrun/cloudrun.go index 6631245c109..4b93206934d 100644 --- a/pkg/skaffold/deploy/cloudrun/cloudrun.go +++ b/pkg/skaffold/deploy/cloudrun/cloudrun.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import "fmt" diff --git a/pkg/skaffold/deploy/cloudrun/deploy.go b/pkg/skaffold/deploy/cloudrun/deploy.go index d3f600180a2..6fff6fceab2 100644 --- a/pkg/skaffold/deploy/cloudrun/deploy.go +++ b/pkg/skaffold/deploy/cloudrun/deploy.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import ( diff --git a/pkg/skaffold/deploy/cloudrun/deploy_test.go b/pkg/skaffold/deploy/cloudrun/deploy_test.go index 06918759901..5da70ab380a 100644 --- a/pkg/skaffold/deploy/cloudrun/deploy_test.go +++ b/pkg/skaffold/deploy/cloudrun/deploy_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import ( diff --git a/pkg/skaffold/deploy/cloudrun/status.go b/pkg/skaffold/deploy/cloudrun/status.go index 0bd48b80dac..5db8586022f 100644 --- a/pkg/skaffold/deploy/cloudrun/status.go +++ b/pkg/skaffold/deploy/cloudrun/status.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/skaffold/deploy/cloudrun/status_test.go b/pkg/skaffold/deploy/cloudrun/status_test.go index 6f945f6bd3a..43f94769a63 100644 --- a/pkg/skaffold/deploy/cloudrun/status_test.go +++ b/pkg/skaffold/deploy/cloudrun/status_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package cloudrun import ( diff --git a/pkg/skaffold/deploy/docker/port/port.go b/pkg/skaffold/deploy/docker/port/port.go index b69f4336594..c4368af4e5a 100644 --- a/pkg/skaffold/deploy/docker/port/port.go +++ b/pkg/skaffold/deploy/docker/port/port.go @@ -74,12 +74,12 @@ func (pm *PortManager) Stop() { } /* -allocatePorts converts PortForwardResources into docker.PortSet objects, and combines them with -pre-configured debug bindings into one docker.PortMap. The debug bindings will have their -requested host ports validated against the port tracker, and modified if a port collision is found. + allocatePorts converts PortForwardResources into docker.PortSet objects, and combines them with + pre-configured debug bindings into one docker.PortMap. The debug bindings will have their + requested host ports validated against the port tracker, and modified if a port collision is found. -These ports are added to the provided container configuration's port set, and the bindings -are returned to be passed to ContainerCreate on Deploy to expose container ports on the host. + These ports are added to the provided container configuration's port set, and the bindings + are returned to be passed to ContainerCreate on Deploy to expose container ports on the host. */ func (pm *PortManager) AllocatePorts(containerName string, pf []*latest.PortForwardResource, cfg *container.Config, debugBindings nat.PortMap) (nat.PortMap, error) { pm.lock.Lock() diff --git a/pkg/skaffold/filemon/changes_test.go b/pkg/skaffold/filemon/changes_test.go index 7b8daff240c..c0a07433a12 100644 --- a/pkg/skaffold/filemon/changes_test.go +++ b/pkg/skaffold/filemon/changes_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package filemon import ( diff --git a/pkg/skaffold/helm/bin.go b/pkg/skaffold/helm/bin.go index da16503a47d..6ead97ac195 100644 --- a/pkg/skaffold/helm/bin.go +++ b/pkg/skaffold/helm/bin.go @@ -85,7 +85,7 @@ func PrepareSkaffoldFilter(h Client, builds []graph.Artifact) (skaffoldBinary st return } -// generateSkaffoldFilter creates a `skaffold filter“ command-line for applying the various +// generateSkaffoldFilter creates a `skaffold filter`` command-line for applying the various // Skaffold manifest filters, such a debugging, image replacement, and applying labels. func generateSkaffoldFilter(h Client, buildsFile string) []string { args := []string{"filter", "--kube-context", h.KubeContext()} diff --git a/pkg/skaffold/kubernetes/loader/load.go b/pkg/skaffold/kubernetes/loader/load.go index cc5735e3439..61eb7b3a981 100644 --- a/pkg/skaffold/kubernetes/loader/load.go +++ b/pkg/skaffold/kubernetes/loader/load.go @@ -58,8 +58,8 @@ func NewImageLoader(kubeContext string, cli *kubectl.CLI) *ImageLoader { } // We only load images that -// 1. Were identified as local images by the Runner, and -// 2. Are part of the set of images being deployed by a given Deployer, so we don't duplicate effort +// 1) Were identified as local images by the Runner, and +// 2) Are part of the set of images being deployed by a given Deployer, so we don't duplicate effort func imagesToLoad(localImages, deployerImages, images []graph.Artifact) []graph.Artifact { local := map[string]bool{} for _, image := range localImages { diff --git a/pkg/skaffold/kubernetes/manifest/manifests.go b/pkg/skaffold/kubernetes/manifest/manifests.go index 91cf36a0a86..92d56de8133 100644 --- a/pkg/skaffold/kubernetes/manifest/manifests.go +++ b/pkg/skaffold/kubernetes/manifest/manifests.go @@ -27,7 +27,6 @@ import ( ) // ManifestList is a list of yaml manifests. -// //nolint:golint type ManifestList [][]byte diff --git a/pkg/skaffold/kubernetes/status/resource/deployment.go b/pkg/skaffold/kubernetes/status/resource/deployment.go index a8bc8b3e731..59c546ddf6e 100644 --- a/pkg/skaffold/kubernetes/status/resource/deployment.go +++ b/pkg/skaffold/kubernetes/status/resource/deployment.go @@ -283,8 +283,8 @@ func (r *Resource) MarkComplete() { // ReportSinceLastUpdated returns a string representing rollout status along with tab header // e.g. -// - testNs:deployment/leeroy-app: waiting for rollout to complete. (1/2) pending -// - testNs:pod/leeroy-app-xvbg : error pulling container image +// - testNs:deployment/leeroy-app: waiting for rollout to complete. (1/2) pending +// - testNs:pod/leeroy-app-xvbg : error pulling container image func (r *Resource) ReportSinceLastUpdated(isMuted bool) string { if r.status.reported && !r.status.changed { return "" diff --git a/pkg/skaffold/render/generate/generate_test.go b/pkg/skaffold/render/generate/generate_test.go index 03ff1aa631d..1d204bd6470 100644 --- a/pkg/skaffold/render/generate/generate_test.go +++ b/pkg/skaffold/render/generate/generate_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/skaffold/render/renderer/kpt/kpt_test.go b/pkg/skaffold/render/renderer/kpt/kpt_test.go index 52c961da9f3..7028a27f7e4 100644 --- a/pkg/skaffold/render/renderer/kpt/kpt_test.go +++ b/pkg/skaffold/render/renderer/kpt/kpt_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package kpt import ( diff --git a/pkg/skaffold/render/renderer/kubectl/kubectl_test.go b/pkg/skaffold/render/renderer/kubectl/kubectl_test.go index c7b1af6597a..ee71ae04073 100644 --- a/pkg/skaffold/render/renderer/kubectl/kubectl_test.go +++ b/pkg/skaffold/render/renderer/kubectl/kubectl_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package kubectl import ( diff --git a/pkg/skaffold/render/transform/transform_test.go b/pkg/skaffold/render/transform/transform_test.go index 4d0f2e7f979..19cb478b6f4 100644 --- a/pkg/skaffold/render/transform/transform_test.go +++ b/pkg/skaffold/render/transform/transform_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package transform import ( diff --git a/pkg/skaffold/render/validate/validate.go b/pkg/skaffold/render/validate/validate.go index 0a2f7da05fe..d166a097287 100644 --- a/pkg/skaffold/render/validate/validate.go +++ b/pkg/skaffold/render/validate/validate.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package validate import ( diff --git a/pkg/skaffold/render/validate/validate_test.go b/pkg/skaffold/render/validate/validate_test.go index 66c22f57b36..bfdab560910 100644 --- a/pkg/skaffold/render/validate/validate_test.go +++ b/pkg/skaffold/render/validate/validate_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package validate import ( diff --git a/pkg/skaffold/schema/util/yaml.go b/pkg/skaffold/schema/util/yaml.go index 34279732457..f7789294572 100644 --- a/pkg/skaffold/schema/util/yaml.go +++ b/pkg/skaffold/schema/util/yaml.go @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package util import ( diff --git a/pkg/skaffold/schema/v1/upgrade.go b/pkg/skaffold/schema/v1/upgrade.go index 9e7a2bf3d88..63726e70311 100755 --- a/pkg/skaffold/schema/v1/upgrade.go +++ b/pkg/skaffold/schema/v1/upgrade.go @@ -24,12 +24,12 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1 to v2alpha1 -// 1. Additions: -// PortForwardResource.Address -// BuildpackArtifact.Env -// KanikoArtifact.Env -// 2. Removals: -// 3. No updates +// 1. Additions: +// PortForwardResource.Address +// BuildpackArtifact.Env +// KanikoArtifact.Env +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1alpha1/upgrade.go b/pkg/skaffold/schema/v1alpha1/upgrade.go index 6b0db03e789..bfa24af567c 100644 --- a/pkg/skaffold/schema/v1alpha1/upgrade.go +++ b/pkg/skaffold/schema/v1alpha1/upgrade.go @@ -27,19 +27,19 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1alpha1 to v1alpha2: // 1. Additions -// - Profiles -// - BuildType.KanikoBuild -// - LocalBuild.useDockerCLI, useBuildkit -// - GoogleCloudBuild. DiskSizeGb, MachineType, Timeout, DockerImage -// - DeployType.KustomizeDeploy -// - KubectlDeploy.RemoteManifests, Flags - KubectlFlags type -// - HelmRelease fields: setValues, setValueTemplates,wait,recreatePods,overrides,packaged,imageStrategy -// - BazelArtifact introduced -// - DockerArtifact fields: CacheFrom, Target -// +// - Profiles +// - BuildType.KanikoBuild +// - LocalBuild.useDockerCLI, useBuildkit +// - GoogleCloudBuild. DiskSizeGb, MachineType, Timeout, DockerImage +// - DeployType.KustomizeDeploy +// - KubectlDeploy.RemoteManifests, Flags - KubectlFlags type +// - HelmRelease fields: setValues, setValueTemplates,wait,recreatePods,overrides,packaged,imageStrategy +// - BazelArtifact introduced +// - DockerArtifact fields: CacheFrom, Target // 2. No removal // 3. Updates -// - TagPolicy is a struct +// - TagPolicy is a struct +// func (config *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var tagPolicy next.TagPolicy if config.Build.TagPolicy == "sha256" { diff --git a/pkg/skaffold/schema/v1alpha2/upgrade.go b/pkg/skaffold/schema/v1alpha2/upgrade.go index 1f180092a53..8e530bc3f9c 100644 --- a/pkg/skaffold/schema/v1alpha2/upgrade.go +++ b/pkg/skaffold/schema/v1alpha2/upgrade.go @@ -27,8 +27,8 @@ import ( // 1. No additions // 2. No removal // 3. Updates -// - KanikoBuildContext instead of GCSBucket -// - HelmRelease.valuesFilePath -> valuesFiles in yaml +// - KanikoBuildContext instead of GCSBucket +// - HelmRelease.valuesFilePath -> valuesFiles in yaml func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { // convert Deploy (should be the same) var newDeploy next.DeployConfig diff --git a/pkg/skaffold/schema/v1alpha3/upgrade.go b/pkg/skaffold/schema/v1alpha3/upgrade.go index ac25b010ad8..6d29afdba21 100644 --- a/pkg/skaffold/schema/v1alpha3/upgrade.go +++ b/pkg/skaffold/schema/v1alpha3/upgrade.go @@ -29,17 +29,16 @@ import ( // - KanikoBuildContext.LocalDir, LocalDir // - KanikoBuild.Image // - Artifact.Sync -// - JibMavenArtifact, JibGradleArtifact -// +// - JibMavenArtifact, JibGradleArtifact // 2. No removal // 3. Updates -// - EnvTemplate.Template is now optional in yaml -// - LocalBuild.SkipPush=false (v1alpha3) -> LocalBuild.Push=true (v1alpha4)_ -// - kustomizePath -> path in yaml -// - HelmRelease, HelmPackaged, HelmFQNConfig fields are optional in yaml, -// - Artifact.imageName -> image, workspace -> context in yaml -// - DockerArtifact.dockerfilePath -> dockerfile in yaml -// - BazelArtifact.BuildTarget is optional in yaml +// - EnvTemplate.Template is now optional in yaml +// - LocalBuild.SkipPush=false (v1alpha3) -> LocalBuild.Push=true (v1alpha4)_ +// - kustomizePath -> path in yaml +// - HelmRelease, HelmPackaged, HelmFQNConfig fields are optional in yaml, +// - Artifact.imageName -> image, workspace -> context in yaml +// - DockerArtifact.dockerfilePath -> dockerfile in yaml +// - BazelArtifact.BuildTarget is optional in yaml func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { // convert Deploy (should be the same) var newDeploy next.DeployConfig diff --git a/pkg/skaffold/schema/v1alpha4/upgrade.go b/pkg/skaffold/schema/v1alpha4/upgrade.go index 2059f8756e5..dd23e1f2a66 100644 --- a/pkg/skaffold/schema/v1alpha4/upgrade.go +++ b/pkg/skaffold/schema/v1alpha4/upgrade.go @@ -26,10 +26,9 @@ import ( // Config changes from v1alpha4 to v1alpha5: // 1. Additions: // - BuildType.AzureContainerBuild and AzureContainerBuild type -// // 2. No removal // 3. Updates -// - minor - []TestCase type aliased to TestConfig +// - minor - []TestCase type aliased to TestConfig func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1alpha5/upgrade.go b/pkg/skaffold/schema/v1alpha5/upgrade.go index d7d2dafe7b1..677f38e5105 100644 --- a/pkg/skaffold/schema/v1alpha5/upgrade.go +++ b/pkg/skaffold/schema/v1alpha5/upgrade.go @@ -29,10 +29,8 @@ import ( // 1. Additions: // - KanikoCache struct, KanikoBuild.Cache // - BazelArtifact.BuildArgs -// // 2. Removals: // - AzureContainerBuilder -// // 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { if c.Build.AzureContainerBuild != nil { diff --git a/pkg/skaffold/schema/v1beta10/upgrade.go b/pkg/skaffold/schema/v1beta10/upgrade.go index 0a789b78ce0..4293a290ad2 100644 --- a/pkg/skaffold/schema/v1beta10/upgrade.go +++ b/pkg/skaffold/schema/v1beta10/upgrade.go @@ -25,8 +25,7 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta10 to v1beta11 // 1. Additions: -// - GitTagger variants `TreeSha` and `AbbrevTreeSha` -// +// - GitTagger variants `TreeSha` and `AbbrevTreeSha` // 2. No removals // 3. No Updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { diff --git a/pkg/skaffold/schema/v1beta14/upgrade.go b/pkg/skaffold/schema/v1beta14/upgrade.go index 68b4c68ef99..a04cbaa354e 100755 --- a/pkg/skaffold/schema/v1beta14/upgrade.go +++ b/pkg/skaffold/schema/v1beta14/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta14 to v1beta15 -// 1. Additions: -// buildArgs for Kustomize deployer -// 2. Removals: -// 3. No updates +// 1. Additions: +// buildArgs for Kustomize deployer +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1beta15/upgrade.go b/pkg/skaffold/schema/v1beta15/upgrade.go index c85baf311bc..d30f288626b 100755 --- a/pkg/skaffold/schema/v1beta15/upgrade.go +++ b/pkg/skaffold/schema/v1beta15/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta15 to v1beta16 -// 1. Additions: -// buildArgs for Kustomize deployer -// 2. Removals: -// 3. No updates +// 1. Additions: +// buildArgs for Kustomize deployer +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1beta16/upgrade.go b/pkg/skaffold/schema/v1beta16/upgrade.go index d1ba1fe030c..3824c262392 100755 --- a/pkg/skaffold/schema/v1beta16/upgrade.go +++ b/pkg/skaffold/schema/v1beta16/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta16 to v1beta17 -// 1. Additions: -// Add EphemeralStorage and ResourceStorage to Kaniko Pod Resource Requirement. -// 2. Removals: -// 3. No updates +// 1. Additions: +// Add EphemeralStorage and ResourceStorage to Kaniko Pod Resource Requirement. +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1beta17/upgrade.go b/pkg/skaffold/schema/v1beta17/upgrade.go index 33b32f8bb90..d596fa90c0c 100755 --- a/pkg/skaffold/schema/v1beta17/upgrade.go +++ b/pkg/skaffold/schema/v1beta17/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta17 to v1 -// 1. Additions: -// Add EphemeralStorage and ResourceStorage to Kaniko Pod Resource Requirement. -// 2. Removals: -// 3. No updates +// 1. Additions: +// Add EphemeralStorage and ResourceStorage to Kaniko Pod Resource Requirement. +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig diff --git a/pkg/skaffold/schema/v1beta8/upgrade.go b/pkg/skaffold/schema/v1beta8/upgrade.go index c14cb3036af..329bf2650a6 100644 --- a/pkg/skaffold/schema/v1beta8/upgrade.go +++ b/pkg/skaffold/schema/v1beta8/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta8 to v1beta9 -// 1. Additions: -// gitTagger/variant -// 2. Removed all schemas associated with builder plugins -// 3. No updates +// 1. Additions: +// gitTagger/variant +// 2. Removed all schemas associated with builder plugins +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v1beta9/upgrade.go b/pkg/skaffold/schema/v1beta9/upgrade.go index d9f98a17238..67ba5f7ba5c 100644 --- a/pkg/skaffold/schema/v1beta9/upgrade.go +++ b/pkg/skaffold/schema/v1beta9/upgrade.go @@ -39,11 +39,10 @@ var ( // Upgrade upgrades a configuration to the next version. // Config changes from v1beta9 to v1beta10 // 1. Additions: -// - DockerArtifact.NetworkMode -// +// - DockerArtifact.NetworkMode // 2. No removals // 3. Updates: -// - sync map becomes a list of sync rules +// - sync map becomes a list of sync rules func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2alpha1/upgrade.go b/pkg/skaffold/schema/v2alpha1/upgrade.go index 4f600e8e7d8..418c03c269e 100755 --- a/pkg/skaffold/schema/v2alpha1/upgrade.go +++ b/pkg/skaffold/schema/v2alpha1/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v2alpha1 to v2alpha2 -// 1. Additions: -// 2. Removals: -// kaniko.buildContext -// 3. No updates +// 1. Additions: +// 2. Removals: +// kaniko.buildContext +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2alpha2/upgrade.go b/pkg/skaffold/schema/v2alpha2/upgrade.go index 7c2eafd2d44..962f8cb5d25 100755 --- a/pkg/skaffold/schema/v2alpha2/upgrade.go +++ b/pkg/skaffold/schema/v2alpha2/upgrade.go @@ -27,7 +27,7 @@ import ( // 1. Additions: // 2. Removals: // 3. Updates: -// - kustomize deployer supports multiple paths +// - kustomize deployer supports multiple paths func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta28/upgrade.go b/pkg/skaffold/schema/v2beta28/upgrade.go index 9a5a7df567a..f6817cc504a 100644 --- a/pkg/skaffold/schema/v2beta28/upgrade.go +++ b/pkg/skaffold/schema/v2beta28/upgrade.go @@ -24,10 +24,10 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v2beta28 to v2beta29 -// 1. Additions: -// GoogleCloudBuild.Region -// 2. Removals: -// 3. No updates +// 1. Additions: +// GoogleCloudBuild.Region +// 2. Removals: +// 3. No updates func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta3/upgrade.go b/pkg/skaffold/schema/v2beta3/upgrade.go index b70fb69554f..df0f7d0210e 100755 --- a/pkg/skaffold/schema/v2beta3/upgrade.go +++ b/pkg/skaffold/schema/v2beta3/upgrade.go @@ -27,7 +27,7 @@ import ( // 1. Additions: // 2. Removals: // 3. Updates: -// - Rename `values` in `helm.Releases` to `artifactOverrides` +// - Rename `values` in `helm.Releases` to `artifactOverrides` func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta4/upgrade.go b/pkg/skaffold/schema/v2beta4/upgrade.go index fff198c002a..78d515a908a 100755 --- a/pkg/skaffold/schema/v2beta4/upgrade.go +++ b/pkg/skaffold/schema/v2beta4/upgrade.go @@ -24,11 +24,11 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v2beta4 to v2beta5 -// 1. Additions: -// 2. Removals: -// 3. Updates: -// pullSecret renamed to pullSecretPath -// Rename `buildpack` to `buildpacks` +// 1. Additions: +// 2. Removals: +// 3. Updates: +// pullSecret renamed to pullSecretPath +// Rename `buildpack` to `buildpacks` func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta5/upgrade.go b/pkg/skaffold/schema/v2beta5/upgrade.go index bd50e6770be..724998287e1 100755 --- a/pkg/skaffold/schema/v2beta5/upgrade.go +++ b/pkg/skaffold/schema/v2beta5/upgrade.go @@ -24,8 +24,8 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v2beta5 to v2beta6 -// 1. Additions: -// New structs CustomTemplateTagger and TaggerComponent used by TagPolicy. +// 1. Additions: +// New structs CustomTemplateTagger and TaggerComponent used by TagPolicy. func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta6/upgrade.go b/pkg/skaffold/schema/v2beta6/upgrade.go index 9a219c95b91..305bd433f81 100755 --- a/pkg/skaffold/schema/v2beta6/upgrade.go +++ b/pkg/skaffold/schema/v2beta6/upgrade.go @@ -24,8 +24,8 @@ import ( // Upgrade upgrades a configuration to the next version. // Config changes from v2beta6 to v2beta7 -// 1. Additions: -// New KptDeploy, KptFn, and KptLive to support Kpt Deployer. +// 1. Additions: +// New KptDeploy, KptFn, and KptLive to support Kpt Deployer. func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta8/upgrade.go b/pkg/skaffold/schema/v2beta8/upgrade.go index 5a202fb1442..532441a8f43 100644 --- a/pkg/skaffold/schema/v2beta8/upgrade.go +++ b/pkg/skaffold/schema/v2beta8/upgrade.go @@ -27,7 +27,7 @@ import ( // 1. No additions: // 2. No removals // 3. Updates: -// - sync.auto becomes boolean +// - sync.auto becomes boolean func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/schema/v2beta9/upgrade.go b/pkg/skaffold/schema/v2beta9/upgrade.go index 76c15dddacf..5d393f19222 100755 --- a/pkg/skaffold/schema/v2beta9/upgrade.go +++ b/pkg/skaffold/schema/v2beta9/upgrade.go @@ -27,7 +27,7 @@ import ( // 1. No additions: // 2. No removals // 3. Updates: -// - portForward.port becomes util.IntOrString +// - portForward.port becomes util.IntOrString func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { var newConfig next.SkaffoldConfig pkgutil.CloneThroughJSON(c, &newConfig) diff --git a/pkg/skaffold/sync/sync_test.go b/pkg/skaffold/sync/sync_test.go index 609258f6ec2..cb217481a4b 100644 --- a/pkg/skaffold/sync/sync_test.go +++ b/pkg/skaffold/sync/sync_test.go @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ - package sync import ( @@ -748,42 +747,6 @@ func TestNewSyncItem(t *testing.T) { Delete: nil, }, }, - - // Infer with Ko - { - description: "infer: ko static assets", - artifact: &latest.Artifact{ - ArtifactType: latest.ArtifactType{ - KoArtifact: &latest.KoArtifact{}, - }, - ImageName: "test", - Sync: &latest.Sync{ - Infer: []string{"kodata/**/*"}, - }, - }, - builds: []graph.Artifact{{ - ImageName: "test", - Tag: "test:123", - }}, - evt: filemon.Events{ - Added: []string{filepath.Join("kodata", "foo", "bar.html")}, - Modified: []string{ - filepath.Join("kodata", "frob", "baz.js"), - "main.go", - }, - Deleted: []string{filepath.Join("kodata", "corge", "grault.css")}, - }, - expected: &Item{ - Image: "test:123", - Copy: map[string][]string{ - filepath.Join("kodata", "foo", "bar.html"): {"/var/run/ko/foo/bar.html"}, - filepath.Join("kodata", "frob", "baz.js"): {"/var/run/ko/frob/baz.js"}, - }, - Delete: map[string][]string{ - filepath.Join("kodata", "corge", "grault.css"): {"/var/run/ko/corge/grault.css"}, - }, - }, - }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) {