jiebi/CodeConvo huggingface dataset:
Change:
<!-- Please only use this template for submitting reports about failing tests in Kubernetes CI jobs --Which jobs are failing: Which test(s) are failing: [sig-storage] In-tree Volumes [Driver: local][LocalVolumeType: block] [Testpattern: Pre-provisioned PV (block volmode)] disruptive[Disruptive] Should test that pv used in a pod that is force deleted while the kubelet is down cleans up when the kubelet returns. Since when has it been failing: 10/8/19 Testgrid link: https://k8s- Reason for failure: Introduced by but root cause is probably Anything else we need to know:
/assign
/milestone 1.17 /priority important-soon this is consistently failing in release-master-informing job could you please take a look?
The provided milestone is not valid for this repository. Milestones in this repository: [, , , , , , , , ] Use to clear the milestone. <detailsIn response to : /milestone 1.17 /priority important-soon Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/milestone v1.17

Discussion:
}, } } func (s *disruptiveTestSuite) getTestSuiteInfo() TestSuiteInfo { return s.tsInfo }

if (pattern.VolMode == v1.PersistentVolumeBlock && t.runTestBlock != nil) || (pattern.VolMode == v1.PersistentVolumeFilesystem && t.runTestFile != nil) { ginkgo.It(t.testItStmt, func() { <ins> if pattern.VolMode == v1.PersistentVolumeBlock && driver.GetDriverInfo().InTreePluginName == "kubernetes.io/local-volume" { // TODO: https://github.com/kubernetes/kubernetes/issues/74552 framework.Skipf("Local volume volume plugin does not support block volume reconstruction (#74552)") } </ins> init() defer cleanup()
Change:
Hello! I got this error: or:
There are no sig labels on this issue. Please add a sig label by either: 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. See the . The in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Do I need to use ?
use instead

Discussion:
} if len(b.resources) != 0 { <del> return &Result{err: fmt.Errorf("resource(s) were provided, but no name, label selector, or --all flag specified")} </del> <ins> for _, r := range b.resources { _, err := b.mappingFor(r) if err != nil { return &Result{err: err} } else { return &Result{err: fmt.Errorf("resource(s) were provided, but no name, label selector, or --all flag specified")} } } </ins> } return &Result{err: missingResourceError} }

t.Errorf("unexpected non-error") } } <ins> func TestNoSelectorUnknowResourceType(t *testing.T) { b := newDefaultBuilder(). NamespaceParam("test"). ResourceTypeOrNameArgs(false, "unknown") err := b.Do().Err() if err != nil { if !strings.Contains(err.Error(), "server doesn't have a resource type "unknown"") { t.Fatalf("unexpected error: %v", err) } } } </ins> func TestSingleResourceType(t *testing.T) { b := newDefaultBuilder(). LabelSelectorParam("a=b").
Change:
What happened: API server panics handling requests for a CRD with OpenAPI validation with What you expected to happen: CRD is applied successfully. How to reproduce it (as minimally and precisely as possible): kind create cluster --image kindest/node:v1.16.1 then kubectl apply: Partial logs from API server: Anything else we need to know?: Environment: Kind Kubernetes version (use ):OS (e.g: ):
/sig api-machinery
/cc
where It seems that s.AnyOf was referencing some invalid address.
yes, which is very strange, given s was dereferenced earlier in the same method: is investigating
reproduced and has a fix
I had the same issue with prometheus (kube 1.16.1). Deploying is fine but when trying to delete, it crashes the api server. For those who can't upgrade to 1.16.2+ (fixed version) there is a workaround : using etcd to delete the resources that crash the api server : here I grep on coreos because I know it is prometheus that crashes the api server Remove every item in the list that causes the crash :
Note this is also resolved in 1.15.5+ and 1.16.2+, upgrading to 1.17.x is not required to resolve this

Discussion:
srcs = [ "convert_test.go", "goopenapi_test.go", <ins> "unfold_test.go", </ins> "validation_test.go", ], embed = [":go_default_library"],

Generic Extensions <del> *ValueValidation </del> <ins> ValueValidation *ValueValidation </ins> } // +k8s:deepcopy-gen=true

return false } <del> if s.AnyOf == nil { s.AnyOf = []NestedValueValidation{ </del> <ins> if s.ValueValidation == nil { s.ValueValidation = &ValueValidation{} } if s.ValueValidation.AnyOf == nil { s.ValueValidation.AnyOf = []NestedValueValidation{ </ins> {ForbiddenGenerics: Generic{Type: "integer"}}, {ForbiddenGenerics: Generic{Type: "string"}}, } } else { <del> s.AllOf = append([]NestedValueValidation{ </del> <ins> s.ValueValidation.AllOf = append([]NestedValueValidation{ </ins> { ValueValidation: ValueValidation{ AnyOf: []NestedValueValidation{

}, }, }, <del> }, s.AllOf...) </del> <ins> }, s.ValueValidation.AllOf...) </ins> } return true

<ins> /* Copyright 2019 The Kubernetes Authors. 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 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, 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 schema import ( "testing" ) // TestStructuralUnfoldNilValueValidation tests that Unfold() does not crash // on a IntOrString pattern with nil ValueValidation. func TestStructuralUnfoldIntOrString(t *testing.T) { schema := Structural{ Extensions: Extensions{ XIntOrString: true, }, } schema.Unfold() } </ins>
Change:
What would you like to be : Support dynamically set log level for kube-scheduler, is blocked on node controller approval, but we can move forward with a scheduler only change. /sig scheduling
/help
/assign /remove-help
do you have a PR for this one?
I submitted the PR.

Discussion:
"//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", <ins> "//staging/src/k8s.io/component-base/logs:go_default_library", </ins> "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library",

"k8s.io/client-go/tools/leaderelection" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" <ins> "k8s.io/component-base/logs" </ins> "k8s.io/component-base/metrics/legacyregistry" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag"

if config.EnableContentionProfiling { goruntime.SetBlockProfileRate(1) } <ins> routes.DebugFlags{}.Install(pathRecorderMux, "v", routes.StringFlagPutHandler(logs.GlogSetter)) </ins> } return pathRecorderMux }
Change:
What happened: CI failed when deprecated metrics. Refer to The reason is that a hidden metrics won't be created thus can't be registered to prometheus's registry. I guess the other PR failed for the same reason. What you expected to happen: How to reproduce it (as minimally and precisely as possible): When starting the cluster, panic happens Anything else we need to know?: In my option, we need to remove backoff from legacyregistry. Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others: /assign /sig instrumentation
Discoveries after run go test ( by ) after removing backoff and deprecating some metrics: The kubelet's metrics are protected by the unit tests, and they work well . The only block is , that is I mean register to legacy registry and gather from Prometheus.
By backoff do you mean the fallback call to prometheus.Register in the various legacyregistry register functions?
Yes. I opened a PR and see what would happen. (I guess it should be fine now)

Discussion:
// Register registers a collectable metric but uses the global registry func Register(c metrics.Registerable) error { err := defaultRegistry.Register(c) <del> // sideload global prom registry as fallback prometheus.Register(c) </del> return err } // MustRegister registers registerable metrics but uses the global registry. func MustRegister(cs ...metrics.Registerable) { defaultRegistry.MustRegister(cs...) <del> // sideload global prom registry as fallback for _, c := range cs { prometheus.Register(c) } </del> } // RawMustRegister registers prometheus collectors but uses the global registry, this

// Deprecated func RawMustRegister(cs ...prometheus.Collector) { defaultRegistry.RawMustRegister(cs...) <del> // sideload global prom registry as fallback for _, c := range cs { prometheus.Register(c) } </del> } // RawRegister registers a prometheus collector but uses the global registry, this

// Deprecated func RawRegister(c prometheus.Collector) error { err := defaultRegistry.RawRegister(c) <del> // sideload global prom registry as fallback prometheus.Register(c) </del> return err }
Change:
Hi, We are experiencing a memory leak in our operator and it seems to be caused by some Timers: ! See here the original issue: After some investigations I found out that the can create a lot of timers (at least ) if the queue is not empty : The problem here is that if the event in the queue is to expire in a "far" future the previous timers will pile up and the memory will be reclaimed too late. Could someone confirm this scenario ? A fix would be to create some with and close them when they are not needed (e.g. is called) or superseded by a most recent one. Happy to discuss the issue and contribute if needed.
thanks for the report, moved to the main repo for better visibility /sig api-machinery
yes, using NewTimer would be better here
thanks for your feedback, could you assign me to this issue ? I will try to provide a fix.
Thanks, I have opened a PR:

Discussion:
// Make a placeholder channel to use when there are no items in our list never := make(<-chan time.Time) <ins> // Make a timer that expires when the item at the head of the waiting queue is ready var nextReadyAtTimer clock.Timer </ins> waitingForQueue := &waitForPriorityQueue{} heap.Init(waitingForQueue)

// Set up a wait for the first item's readyAt (if one exists) nextReadyAt := never if waitingForQueue.Len() > 0 { <ins> if nextReadyAtTimer != nil { nextReadyAtTimer.Stop() } </ins> entry := waitingForQueue.Peek().(*waitFor) <del> nextReadyAt = q.clock.After(entry.readyAt.Sub(now)) </del> <ins> nextReadyAtTimer = q.clock.NewTimer(entry.readyAt.Sub(now)) nextReadyAt = nextReadyAtTimer.C() </ins> } select {
Change:
What happened: I have a test: That passes with (Kubernetes 1.15) but fails with (Kubenernetes 1.16) Logs from pass: Logs from fail: here is . If I switch to this passes on both version. What you expected to happen: does not panic. How to reproduce it (as minimally and precisely as possible): Test and apimachinary version above
/sig api-machinery
/assign
cc
I notice you are using a different version of than k8s 1.16. If you match versions, do you still encounter the same issue?
I think I tried updating gogo to the latest version, but looks like k8s is on an older version. Tomorrow I'll try reproducing this on a minimal and play around with different version combinations
One other question, did the merge with 1.15 k8s levels actually work, or did it just not error? I see a log message that might indicate the merge was encountering an error and just skipping something internally.
figured out the issue. we updated the gogo proto generator in 1.16, which generated an XXX_Merge method for IntOrString. The generated method fails on the unsized Type field.
(the reason golang proto merge still works is that the generated XXX_Merge method implements the gogo merger interface, not the golang merger interface, so golang still falls back to reflect-driven mergeStruct)
Reproducer at

Discussion:
} // Type represents the stored type of IntOrString. <del> type Type int </del> <ins> type Type int64 </ins> const ( Int    Type = iota // The IntOrString holds an int.
Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: The cluster is release-1.16. When a VMSS is manually scaled up, some pointers in of the newly created nodes are nil. Here's the list of the missing ones: PlatformUpdateDomain PlatformFaultDomain - - - The strikeouts mean they are missing but we don't focus on them. What you expected to happen: These pointers are not supposed to be nil. How to reproduce it (as minimally and precisely as possible): a cluster with VMSS, k8s version release-1.16 and ccm enabled. up the VMSS. Anything else we need to know?: Note that this issue only happens when ccm is enabled. Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
The label(s) cannot be applied. These labels are supported: <detailsIn response to : /area provider-azure Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
The label(s) cannot be applied. These labels are supported: <detailsIn response to : /area provider-azure Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig cloud-provider /area provider/azure /milestone v1.17

Discussion:
} else if vm.InstanceView != nil && vm.InstanceView.PlatformFaultDomain != nil { // Availability zone is not used for the node, falling back to fault domain. failureDomain = strconv.Itoa(int(*vm.InstanceView.PlatformFaultDomain)) <ins> } else { err = fmt.Errorf("failed to get zone info") klog.Errorf("GetZoneByNodeName: got unexpected error %v", err) ss.deleteCacheForNode(name) return cloudprovider.Zone{}, err </ins> } return cloudprovider.Zone{
Change:
From integration tests:
/assign
Nope - you need something like that:
I was looking at the GetPodFromDeleteAction when I noticed PR opened for this issue. Hence I didn't update my snippet.

Discussion:
"time" apps "k8s.io/api/apps/v1beta1" <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> "k8s.io/api/extensions/v1beta1" policy "k8s.io/api/policy/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality"

} func (dc *DisruptionController) removeDb(obj interface{}) { <del> pdb := obj.(*policy.PodDisruptionBudget) </del> <ins> pdb, ok := obj.(*policy.PodDisruptionBudget) if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { klog.Errorf("Couldn't get object from tombstone %+v", obj) return } pdb, ok = tombstone.Obj.(*policy.PodDisruptionBudget) if !ok { klog.Errorf("Tombstone contained object that is not a pdb %+v", obj) return } } </ins> klog.V(4).Infof("remove DB %q", pdb.Name) dc.enqueuePdb(pdb) }
Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: apiserver fails to pass readiness/liveness check when we upgrade k8s 1.12 to k8s.14+. there are some detail error messages in apiserver when we increase log level to 6(healthz check etcd failed: error getting data from etcd: etcdserver: permission denied.) our etcd cluster grant specified prefix(for example,/cluster-1) permission to k8s cluster. there is no problem in k8s1.12. etcd healthz check is implemented by getting prefix+'/'+health path in k8s 1.14+,but prefix do not join '/'. there is no problem in etcd3 store, pathPrefix is joined by '/' and prefix. What you expected to happen: prefix joins '/' in etcd healthz check.
/sig api-machinery
/assign
GitHub didn't allow me to assign the following users: jingyih. Note that only , repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
What custom etcd prefix are you passing in? if you prefix it with , that should resolve this issue for you in the short-term. I agree the health check key prefix should be computed the same way as the etcd client prefix
thanks. yes, we prefix it with '/' to resolve this issue.

Discussion:
client := clientValue.Load().(*clientv3.Client) ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() <del> // See https://github.com/etcd-io/etcd/blob/master/etcdctl/ctlv3/command/ep_command.go#L118 _, err := client.Get(ctx, path.Join(c.Prefix, "health")) </del> <ins> // See https://github.com/etcd-io/etcd/blob/c57f8b3af865d1b531b979889c602ba14377420e/etcdctl/ctlv3/command/ep_command.go#L118 _, err := client.Get(ctx, path.Join("/", c.Prefix, "health")) </ins> if err == nil { return nil }
Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: Kubelet does send the pvc resize success events when expanding pvc (node expand) What you expected to happen: Kubelet sends the pvc resize success events when expanding pvc (node expand) successfully How to reproduce it (as minimally and precisely as possible): Plugin supports node expand the external-reszier(csi reszier) pvc pod pvc expanded, but did not see the events Anything else we need to know?: Environment: 1.16.1 Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig storage
/assign
more details. pvc pod If we do not send the successful expansion event, it is hard to know the result. I think we should also send the event to pvc
note that events are not guaranteed to be delivered (the event recorder throttles event reporting over certain thresholds)
Thanks, after I read the codes, I find the event did not send

Discussion:
} simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.NodeExpandVolume succeeded", "") og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) <ins> og.recorder.Eventf(pvc, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) </ins> klog.Infof(detailedMsg) // File system resize succeeded, now update the PVC's Capacity to match the PV's err = util.MarkFSResizeFinished(pvc, pvSpecCap, og.kubeClient)
Change:
/sig api-machinery /kind bug /cc this makes any updates on a "Local" apiservice failing by kubectl (unless you disable the client-side validation). a quick repro: (edit whatever a local apiservice) a label "foo: bar" will fail on the schema validation # "" was not valid: # * : Invalid value: "The edited file failed validation": ValidationError(): missing required field "service" in client-side v1.15.0 server-side v1.15.2 referencing the published openapi v2 for apiservice#spec below:
/label help-wanted
The label(s) cannot be applied. These labels are supported: <detailsIn response to : /label help-wanted Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/help
This request has been marked as needing help from a contributor. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : /help Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
I can on this if no one else is currently working on it.
sure, feel free to tag me to request reviewing..
awesome, I will /assign
are you still working on this one?

Discussion:
} }, "required": [ <del> "service", </del> "groupPriorityMinimum", "versionPriority" ],

// on port 443 // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. <ins> // +optional </ins> Service *ServiceReference // Group is the API group name this server hosts Group string

// on port 443 // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. <ins> // +optional </ins> optional ServiceReference service = 1; // Group is the API group name this server hosts

// on port 443 // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. <del> Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` </del> <ins> // +optional Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` </ins> // Group is the API group name this server hosts Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` // Version is the API version this server hosts.  For example, "v1"