Merge pull request #14135 from hakman/go-1.19.0

Update Go to v1.19.0
This commit is contained in:
Kubernetes Prow Robot 2022-08-17 02:40:55 -07:00 committed by GitHub
commit 7035526204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 92 additions and 71 deletions

View File

@ -19,7 +19,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
go-version: 1.18.4
go-version: '1.19.0'
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
@ -36,7 +36,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
go-version: 1.18.4
go-version: '1.19.0'
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
@ -53,7 +53,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
go-version: 1.18.4
go-version: '1.19.0'
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
@ -70,7 +70,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
go-version: 1.18.4
go-version: '1.19.0'
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:

View File

@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
go-version: '1.18'
go-version: '1.19.0'
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Update Dependencies
id: update_deps

View File

@ -41,6 +41,7 @@ type Channel struct {
// CurrentSystemGeneration holds our current SystemGeneration value.
// Version history:
//
// 0 Pre-history (and the default value); versions prior to prune.
// 1 Prune functionality introduced.
const CurrentSystemGeneration = 1

View File

@ -5,7 +5,7 @@ options:
machineType: 'N1_HIGHCPU_8'
steps:
# Push the images
- name: 'docker.io/library/golang:1.18.4-bullseye'
- name: 'docker.io/library/golang:1.19.0-bullseye'
id: images
entrypoint: make
env:
@ -20,7 +20,7 @@ steps:
- dns-controller-push
- kube-apiserver-healthcheck-push
# Push the artifacts
- name: 'docker.io/library/golang:1.18.4-bullseye'
- name: 'docker.io/library/golang:1.19.0-bullseye'
id: artifacts
entrypoint: make
env:
@ -35,7 +35,7 @@ steps:
args:
- gcs-upload-and-tag
# Build cloudbuild artifacts (for attestation)
- name: 'docker.io/library/golang:1.18.4-bullseye'
- name: 'docker.io/library/golang:1.19.0-bullseye'
id: cloudbuild-artifacts
entrypoint: make
env:

View File

@ -261,8 +261,9 @@ func (c *RootCmd) clusterNameArgsAllowNoCluster(clusterName *string) func(cmd *c
}
// ProcessArgs will parse the positional args. It assumes one of these formats:
// * <no arguments at all>
// * <clustername> (and --name not specified)
// - <no arguments at all>
// - <clustername> (and --name not specified)
//
// Everything else is an error.
func (c *RootCmd) ProcessArgs(args []string) error {
if len(args) > 0 {

View File

@ -99,7 +99,9 @@ type ResourceRecordSet interface {
Type() rrstype.RrsType
}
/* ResourceRecordSetsEquivalent compares two ResourceRecordSets for semantic equivalence.
/*
ResourceRecordSetsEquivalent compares two ResourceRecordSets for semantic equivalence.
Go's equality operator doesn't work the way we want it to in this case,
hence the need for this function.
More specifically (from the Go spec):

View File

@ -17,9 +17,9 @@ limitations under the License.
// Package featureflag implements simple feature-flagging.
// Feature flags can become an anti-pattern if abused.
// We should try to use them for two use-cases:
// * `Preview` feature flags enable a piece of functionality we haven't yet fully baked. The user needs to 'opt-in'.
// - `Preview` feature flags enable a piece of functionality we haven't yet fully baked. The user needs to 'opt-in'.
// We expect these flags to be removed at some time. Normally these will default to false.
// * Escape-hatch feature flags turn off a default that we consider risky (e.g. pre-creating DNS records).
// - Escape-hatch feature flags turn off a default that we consider risky (e.g. pre-creating DNS records).
// This lets us ship a behaviour, and if we encounter unusual circumstances in the field, we can
// allow the user to turn the behaviour off. Normally these will default to true.
package featureflag

View File

@ -1344,20 +1344,33 @@ func TestRollingUpdateDetachFails(t *testing.T) {
}
// Request validate (1) -->
//
// <-- validated
//
// Detach instance -->
// Request validate (2) -->
//
// <-- validated
//
// Detach instance -->
// Request validate (3) -->
//
// <-- validated
//
// Request terminate 3 nodes -->
//
// <-- 3 nodes terminated, 1 left
//
// Request validate (4) -->
//
// <-- validated
//
// Request terminate 1 node -->
//
// <-- 1 node terminated, 0 left
//
// Request validate (5) -->
//
// <-- validated
type alreadyDetachedTest struct {
ec2iface.EC2API

View File

@ -28,8 +28,8 @@ import (
// KubeObjectToApplyYAML returns the kubernetes object converted to YAML, with "noisy" fields removed.
//
// We remove:
// * status (can't be applied, shouldn't be specified)
// * metadata.creationTimestamp (can't be applied, shouldn't be specified)
// - status (can't be applied, shouldn't be specified)
// - metadata.creationTimestamp (can't be applied, shouldn't be specified)
func KubeObjectToApplyYAML(data runtime.Object) (string, error) {
// This logic is inlined sigs.k8s.io/yaml.Marshal, but we delete some fields in the middle.

View File

@ -64,6 +64,7 @@ func (b *FirewallModelBuilder) getOctaviaProvider() string {
}
// addDirectionalGroupRule - create a rule on the source group to the dest group provided a securityGroupRuleTask
//
// Example
// Create an Ingress rule on source allowing traffic from dest with the options in the SecurityGroupRule
// Create an Egress rule on source allowing traffic to dest with the options in the SecurityGroupRule

View File

@ -40,7 +40,6 @@ import (
// PerformAssignments is called on create, as well as an update. In fact
// any time Run() is called in apply_cluster.go we will reach this function.
// Please do all after-market logic here.
//
func PerformAssignments(c *kops.Cluster, cloud fi.Cloud) error {
ctx := context.TODO()

View File

@ -69,7 +69,6 @@ func PopulateClusterSpec(clientset simple.Clientset, cluster *kopsapi.Cluster, c
return c.fullCluster, nil
}
//
// Here be dragons
//
// This function has some `interesting` things going on.
@ -78,7 +77,6 @@ func PopulateClusterSpec(clientset simple.Clientset, cluster *kopsapi.Cluster, c
// very wrong.. but at least now my new cluster.Spec.Topology
// struct is falling through..
// @kris-nova
//
func (c *populateClusterSpec) run(clientset simple.Clientset) error {
if errs := validation.ValidateCluster(c.InputCluster, false); len(errs) != 0 {
return errs.ToAggregate()

View File

@ -169,6 +169,7 @@ func writeLiteralList(body *hclwrite.Body, key string, literals []*terraformWrit
// writeMap writes a map's key-value pairs to a body spready across multiple lines.
// Example:
//
// key = {
// "key1" = "value1"
// "key2" = "value2"

View File

@ -141,13 +141,16 @@ func (t *TerraformTarget) finishHCL2() error {
// writeLocalsOutputs creates the locals block and output blocks for all output variables
// Example:
//
// locals {
// key1 = "value1"
// key2 = "value2"
// }
//
// output "key1" {
// value = "value1"
// }
//
// output "key2" {
// value = "value2"
// }

View File

@ -75,6 +75,7 @@ func WithBackoff(backoff wait.Backoff) VFSOption {
// ReadFile reads a file from a vfs URL
// It supports additional schemes which don't (yet) have full VFS implementations:
//
// metadata: reads from instance metadata on GCE/AWS
// http / https: reads from HTTP
func (c *VFSContext) ReadFile(location string, options ...VFSOption) ([]byte, error) {

View File

@ -40,6 +40,7 @@ import (
// https://docs.aws.amazon.com/general/latest/gr/s3.html
// TODO: match fips and S3 access point naming conventions
// TODO: perhaps make region regex more specific, i.e. (us|eu|ap|cn|ca|sa), to prevent matching bucket names that match region format?
//
// but that will mean updating this list when AWS introduces new regions
var s3UrlRegexp = regexp.MustCompile(`(s3([-.](?P<region>\w{2}(-gov)?-\w+-\d{1})|[-.](?P<bucket>[\w.\-\_]+)|)?|(?P<bucket>[\w.\-\_]+)[.]s3([.-](?P<region>\w{2}(-gov)?-\w+-\d{1}))?)[.]amazonaws[.]com([.]cn)?(?P<path>.*)?`)