jiebi/CodeConvo huggingface dataset:
Change:
What happened: There are many if cases in kind visitor. What you expected to happen: Use switch instand of more three if cases.
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
I sent a PR to solve the issue and the PR is wait for merging.

Discussion:
// Accept calls the Visit method on visitor that corresponds to elem's Kind func (elem GroupKindElement) Accept(visitor KindVisitor) error { <del> if elem.GroupMatch("apps", "extensions") && elem.Kind == "DaemonSet" { </del> <ins> switch { case elem.GroupMatch("apps", "extensions") && elem.Kind == "DaemonSet": </ins> visitor.VisitDaemonSet(elem) <del> return nil } if elem.GroupMatch("apps", "extensions") && elem.Kind == "Deployment" { </del> <ins> case elem.GroupMatch("apps", "extensions") && elem.Kind == "Deployment": </ins> visitor.VisitDeployment(elem) <del> return nil } if elem.GroupMatch("batch") && elem.Kind == "Job" { </del> <ins> case elem.GroupMatch("batch") && elem.Kind == "Job": </ins> visitor.VisitJob(elem) <del> return nil } if elem.GroupMatch("", "core") && elem.Kind == "Pod" { </del> <ins> case elem.GroupMatch("", "core") && elem.Kind == "Pod": </ins> visitor.VisitPod(elem) <del> return nil } if elem.GroupMatch("extensions") && elem.Kind == "ReplicaSet" { </del> <ins> case elem.GroupMatch("extensions") && elem.Kind == "ReplicaSet": </ins> visitor.VisitReplicaSet(elem) <del> return nil } if elem.GroupMatch("", "core") && elem.Kind == "ReplicationController" { </del> <ins> case elem.GroupMatch("", "core") && elem.Kind == "ReplicationController": </ins> visitor.VisitReplicationController(elem) <del> return nil } if elem.GroupMatch("apps") && elem.Kind == "StatefulSet" { </del> <ins> case elem.GroupMatch("apps") && elem.Kind == "StatefulSet": </ins> visitor.VisitStatefulSet(elem) <del> return nil </del> <ins> default: return fmt.Errorf("no visitor method exists for %v", elem) </ins> } <del> return fmt.Errorf("no visitor method exists for %v", elem) </del> <ins> return nil </ins> } // GroupMatch returns true if and only if elem's group matches one
Change:
Because I can't get the fix submitted without an issue.
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

Discussion:
return err } var err error <ins> hcRequestPath, hcPort := hc.RequestPath, hc.Port </ins> if hc, err = gce.ensureHttpHealthCheck(hc.Name, hc.RequestPath, int32(hc.Port)); err != nil || hc == nil { <del> return fmt.Errorf("Failed to ensure health check for %v port %d path %v: %v", name, hc.Port, hc.RequestPath, err) </del> <ins> return fmt.Errorf("Failed to ensure health check for %v port %d path %v: %v", name, hcPort, hcRequestPath, err) </ins> } hcLinks = append(hcLinks, hc.SelfLink) }
Change:
Seems to be broken for at least the past two weeks. /sig apps /area test
can you take a look please?
Absolutely, I'll take a look today. Sorry guys!
thanks!

Discussion:
apiVersion: v1 kind: Service metadata: <del> # This service is meant to be used by clients of the database. It exposes a ClusterIP that will # automatically load balance connections to the different database pods. name: cockroachdb-public labels: app: cockroachdb spec: ports: # The main port, served by gRPC, serves Postgres-flavor SQL, internode # traffic and the cli. - port: 26257 targetPort: 26257 name: grpc # The secondary port serves the UI as well as health and debug endpoints. - port: 8080 targetPort: 8080 name: http selector: app: cockroachdb --- apiVersion: v1 kind: Service metadata: </del> # This service only exists to create DNS entries for each pod in the stateful # set such that they can resolve each other's IP addresses. It does not # create a load-balanced ClusterIP and should not be used directly by clients

# We don't join cockroachdb in order to avoid a node attempting # to join itself, which currently doesn't work # (https://github.com/cockroachdb/cockroach/issues/9625). <del> CRARGS+=("--join" "cockroachdb-public") </del> <ins> CRARGS+=("--join" "cockroachdb-0.cockroachdb,cockroachdb-1.cockroachdb,cockroachdb-2.cockroachdb") </ins> fi exec /cockroach/cockroach ${CRARGS[*]} # No pre-stop hook is required, a SIGTERM plus some time is all that's
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: A couple of tests the the GKE and GCE suites have been consistently failing since yesterday. See What you expected to happen: Tests should pass. How to reproduce it (as minimally and precisely as possible): Look at failing tests. Anything else we need to know?: The failing tests correspond to the merge of CC
[MILESTONENOTIFIER] Milestone Labels Complete Issue label settings: sig/storage: Issue will be escalated to these SIGs if needed. priority/critical-urgent: Never automatically move out of a release milestone; continually escalate to contributor and SIG through all available channels. kind/bug: Fixes a bug discovered during the current release. <detailsAdditional instructions available <a href=""here</aThe commands available for adding these labels are documented <a href=""here</a</details
From one of the sample failures it looks like a nil reference: Introduced .
Unable to get in touch with so from my team will take a look. If we can fix the tests in the next couple of hours we'll send out a PR to do so, otherwise we will roll back the offending PR.
Looks like it might be caused by deferencing when it could be nil: and Verifying the fix.
Fix from is awaiting merge

Discussion:
// Check PV properties By("checking the PV") <del> Expect(pv.Spec.PersistentVolumeReclaimPolicy).To(Equal(*class.ReclaimPolicy)) </del> expectedAccessModes := []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce} Expect(pv.Spec.AccessModes).To(Equal(expectedAccessModes)) Expect(pv.Spec.ClaimRef.Name).To(Equal(claim.ObjectMeta.Name)) Expect(pv.Spec.ClaimRef.Namespace).To(Equal(claim.ObjectMeta.Namespace)) <del> Expect(pv.Spec.MountOptions).To(Equal(class.MountOptions)) </del> <ins> if class == nil { Expect(pv.Spec.PersistentVolumeReclaimPolicy).To(Equal(v1.PersistentVolumeReclaimDelete)) } else { Expect(pv.Spec.PersistentVolumeReclaimPolicy).To(Equal(*class.ReclaimPolicy)) Expect(pv.Spec.MountOptions).To(Equal(class.MountOptions)) } </ins> // Run the checker if t.pvCheck != nil {
Change:
BUG REPORT /kind bug What happened: Kubeadm checks that bridge-nf-call-iptables (IPv4) is set, but does not check for bridge-nf-call-ip6tables (IPv6) What you expected to happen: If IPv6 is being used, then Kubeadm should check for bridge-nf-call-ip6tables How to reproduce it (as minimally and precisely as possible): Just running Kubeadm, however it's only a problem when running IPv6 Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration**: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/area ipv6 /area kubeadm
/sig network

Discussion:
const ( bridgenf                    = "/proc/sys/net/bridge/bridge-nf-call-iptables" <ins> bridgenf6                   = "/proc/sys/net/bridge/bridge-nf-call-ip6tables" </ins> externalEtcdRequestTimeout  = time.Duration(10 * time.Second) externalEtcdRequestRetries  = 3 externalEtcdRequestInterval = time.Duration(5 * time.Second)

} } <ins> if ip := net.ParseIP(cfg.API.AdvertiseAddress); ip != nil { if ip.To4() == nil && ip.To16() != nil { checks = append(checks, FileContentCheck{Path: bridgenf6, Content: []byte{'1'}}, ) } } </ins> return RunChecks(checks, os.Stderr) }

InPathCheck{executable: "touch", mandatory: false}, } <ins> if len(cfg.DiscoveryTokenAPIServers) > 0 { if ip := net.ParseIP(cfg.DiscoveryTokenAPIServers[0]); ip != nil { if ip.To4() == nil && ip.To16() != nil { checks = append(checks, FileContentCheck{Path: bridgenf6, Content: []byte{'1'}}, ) } } } </ins> return RunChecks(checks, os.Stderr) }

}, expected: false, }, <ins> { cfg: &kubeadmapi.MasterConfiguration{ API: kubeadmapi.API{AdvertiseAddress: "2001:1234::1:15"}, }, expected: false, }, </ins> } for _, rt := range tests {

cfg:      &kubeadmapi.NodeConfiguration{}, expected: false, }, <ins> { cfg: &kubeadmapi.NodeConfiguration{ DiscoveryTokenAPIServers: []string{"192.168.1.15"}, }, expected: false, }, { cfg: &kubeadmapi.NodeConfiguration{ DiscoveryTokenAPIServers: []string{"2001:1234::1:15"}, }, expected: false, }, </ins> } for _, rt := range tests {
Change:
I was looking for examples of our exponential backoff usage, and found some suspicious code. wait.ExponentialBackoff exits immediately if But in this loop, we always return , so we will never retry.
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
That does look suspicious. What's the expected return of a retryable function (ConditionFunc)? for 'succeeded', for 'fatal error, do not retry' and for 'retryable error, let the retry policy decide whether to try again' (and it's up to the retryable function to log such errors as it encounters them rather than propagating the last error to its caller)? (Forgive me if this is a newbie question, I am... a newbie.)
Your description sounds right. The pattern seems to be to log the error in the case. Some other callers seem to stash the error for future use, but most simply return timeout on a timeout (not the "real" error, hence the need to log it). It's a pretty caller hostile API, IMO :-)

Discussion:
if err != nil { glog.V(4).Infof("azureDisk - GetStorageAccount:%s err %s", storageAccountName, err.Error()) <del> return false, err </del> <ins> return false, nil // error performing the query - retryable </ins> } if provisionState == storage.Succeeded { return true, nil } <del> glog.V(4).Infof("azureDisk - GetStorageAccount:%s not ready yet", storageAccountName) // leave it for next loop/sync loop return false, fmt.Errorf("azureDisk - Account %s has not been flagged Succeeded by ARM", storageAccountName) </del> <ins> glog.V(4).Infof("azureDisk - GetStorageAccount:%s not ready yet (not flagged Succeeded by ARM)", storageAccountName) return false, nil // back off and see if the account becomes ready on next retry </ins> }) // we have failed to ensure that account is ready for us to create // the default vhd container if err != nil { <ins> if err == kwait.ErrWaitTimeout { return fmt.Errorf("azureDisk - timed out waiting for storage account %s to become ready", storageAccountName) } </ins> return err } }
Change:
What happened: if a node is configured with separate imagefs for container storage, eviction thresholds should align with image gc high threshold. image-gc high threshold is 85% and imagefs.available eviction should be < 15% to match.

Discussion:
obj.HairpinMode = PromiscuousBridge } if obj.EvictionHard == nil { <del> temp := "memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%" </del> <ins> temp := "memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%,imagefs.available<15%" </ins> obj.EvictionHard = &temp } if obj.EvictionPressureTransitionPeriod == zeroDuration {
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: What happened: is consistently failing because of PodPreset feature tests, which require settings/v1alpha1, which is no longer enabled by default What you expected to happen: . How to reproduce it (as minimally and precisely as possible): . Anything else we need to know?: This was caused by and kubernetes/test-infra Environment: . Kubernetes version (use ): . Cloud provider or hardware configuration**: . OS (e.g. from /etc/os-release): . Kernel (e.g. ): . Install tools: . Others: .
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig service-catalog
does the alpha CI job enable alpha API versions?
file has "AllAlpha=true" Maybe would be better?

Discussion:
"//vendor/github.com/onsi/gomega:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", <ins> "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", </ins> "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",

"k8s.io/api/core/v1" settings "k8s.io/api/settings/v1alpha1" <ins> "k8s.io/apimachinery/pkg/api/errors" </ins> metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/watch"

} _, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip) <ins> if errors.IsNotFound(err) { framework.Skipf("podpresets requires k8s.io/api/settings/v1alpha1 to be enabled") } </ins> Expect(err).NotTo(HaveOccurred()) By("creating the pod")
Change:
Failure cluster: This is the most prevalent flake for release-blocking postsubmit kubelet builds, eg: (notably, it happens far less often here) ref: we're probably going to need to ignore kubelet-1.8 for cutting a release
/kind flake /priority test-failure
could you take a look? /assign
Looking to the problem

Discussion:
listeningPort := "" var l net.Listener <ins> var err error </ins> BeforeEach(func() { <del> l, err := net.Listen("tcp", ":0") </del> <ins> l, err = net.Listen("tcp", ":0") </ins> if err != nil { framework.Failf("Failed to open a new tcp port: %v", err) }
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: What happened: Currently, IPVS proxier only runs in linux platfrom. What you expected to happen: Run IPVS proxier UTs everywhere, including !linux platfrom, which will help a lot when developing in windows platfrom. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration**: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/assign
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig network
/area kube-proxy

Discussion:
go_test( name = "go_default_test", <del> srcs = select({ "@io_bazel_rules_go//go/platform:linux_amd64": [ "proxier_test.go", ], "//conditions:default": [], }), </del> <ins> srcs = ["proxier_test.go"], </ins> library = ":go_default_library", <del> deps = select({ "@io_bazel_rules_go//go/platform:linux_amd64": [ "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/proxy/util:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//pkg/util/ipvs:go_default_library", "//pkg/util/ipvs/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/exec/testing:go_default_library", ], "//conditions:default": [], }), </del> <ins> deps = [ "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/proxy/util:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//pkg/util/ipvs:go_default_library", "//pkg/util/ipvs/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/exec/testing:go_default_library", ], </ins> ) go_library(

<del> // +build linux </del> /* Copyright 2017 The Kubernetes Authors.
Change:
What happened: We use OpenStack as our cloud provider. We meet an issue that some controllers stuck because all workers routine stuck at http call to OpenStack services because of rabbitmq issues. Stuck routine call stack: Checked the openstack cloud provider that there is no HttpClient.Timeout set which means no timeout during http call. I think we should set at least the default http timeout value. Environment: Kubernetes version (use ): v1.6.3 Cloud provider or hardware configuration**: OpenStack
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig openstack /kind feature PTAL PR .

Discussion:
const ( ProviderName     = "openstack" AvailabilityZone = "availability_zone" <ins> defaultTimeOut   = 60 * time.Second </ins> ) var ErrNotFound = errors.New("Failed to find object")

} type MetadataOpts struct { <del> SearchOrder string `gcfg:"search-order"` </del> <ins> SearchOrder    string     `gcfg:"search-order"` RequestTimeout MyDuration `gcfg:"request-timeout"` </ins> } // OpenStack is an implementation of cloud provider Interface for OpenStack.

return nil, err } <ins> emptyDuration := MyDuration{} if cfg.Metadata.RequestTimeout == emptyDuration { cfg.Metadata.RequestTimeout.Duration = time.Duration(defaultTimeOut) } provider.HTTPClient.Timeout = cfg.Metadata.RequestTimeout.Duration </ins> os := OpenStack{ provider:     provider, region:       cfg.Global.Region,
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: During startup shows the following warning: However is set and refers to a valid X.509 private key file. All service accounts seem to be created despite the warning. How to reproduce it (as minimally and precisely as possible): start controller-manager with Anything else we need to know?: Environment: Kubernetes version (use ): v1.8.0 OS (e.g. from /etc/os-release): Debian GNU/Linux 8 (jessie)
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
Thanks for the report. The condition for printing the warning is backwards, but has no effect on behavior. Fixed in
Still present in 1.8.3 , can it be ~backported~ cherry-picked to 1.8 branch please?
See for proposed cherry-pick

Discussion:
} var clientBuilder controller.ControllerClientBuilder if s.UseServiceAccountCredentials { <del> if len(s.ServiceAccountKeyFile) > 0 { </del> <ins> if len(s.ServiceAccountKeyFile) == 0 { </ins> // It's possible another controller process is creating the tokens for us. // If one isn't, we'll timeout and exit when our client builder is unable to create the tokens. glog.Warningf("--use-service-account-credentials was specified without providing a --service-account-private-key-file")
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: There will always be extra UpdateContainerResources CRI call even when cpu set is empty. This is unneeded. What you expected to happen: Only call UpdateContainerResources when cpu set is set. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration**: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig node

Discussion:
cpus := m.state.GetCPUSetOrDefault(containerID) m.Unlock() <del> err = m.updateContainerCPUSet(containerID, cpus) if err != nil { glog.Errorf("[cpumanager] AddContainer error: %v", err) return err </del> <ins> if !cpus.IsEmpty() { err = m.updateContainerCPUSet(containerID, cpus) if err != nil { glog.Errorf("[cpumanager] AddContainer error: %v", err) return err } } else { glog.V(5).Infof("[cpumanager] update container resources is skipped due to cpu set is empty") </ins> } return nil }

description: "cpu manager add - container update error", regErr:      nil, updateErr:   fmt.Errorf("fake update error"), <del> expErr:      fmt.Errorf("fake update error"), </del> <ins> expErr:      nil, </ins> }, }