jiebi/CodeConvo huggingface dataset:
Change:
<ins> //go:build windows // +build windows /* Copyright 2024 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 logs import ( "os" "syscall" ) // Based on Windows implementation of Windows' syscall.Open // https://cs.opensource.google/go/go/+/refs/tags/go1.22.2:src/syscall/syscall_windows.go;l=342 // In addition to syscall.Open, this function also adds the syscall.FILE_SHARE_DELETE flag to sharemode, // which will allow us to read from the file without blocking the file from being deleted or renamed. // This is essential for Log Rotation which is done by renaming the open file. Without this, the file rename would fail. func openFileShareDelete(path string) (*os.File, error) { pathp, err := syscall.UTF16PtrFromString(path) if err != nil { return nil, err } var access uint32 = syscall.GENERIC_READ var sharemode uint32 = syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE | syscall.FILE_SHARE_DELETE var createmode uint32 = syscall.OPEN_EXISTING var attrs uint32 = syscall.FILE_ATTRIBUTE_NORMAL handle, err := syscall.CreateFile(pathp, access, sharemode, nil, createmode, attrs, 0) if err != nil { return nil, err } return os.NewFile(uintptr(handle), path), nil } </ins>

Discussion:
The test is failing on Windows [0]: The idea of the test is to check that kubelet still follows and reads the Container Logs after a Log Rotation occured. However, because the followed file is open, it cannot be renamed, and thus, the container logs cannot be rotated. This issue could be prevented if the file would be opened with the [0] [1] Kubelet should not block container log rotation. Run the test ` is failing on Windows. /sig windows /kind bug /kind failing-test latest, master. This unit test has been failing for a while. N/A Windows nodes </detailsN/A N/A N/A
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <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
/kind failing-test /sig windows
Change:
// https://github.com/kubernetes/kubernetes/issues/72236 proxier.filterRules.Write( "-A", string(kubeIPVSFilterChain), <del> "-m", "set", "--match-set", proxier.ipsetList[kubeLoadBalancerSet].Name, "dst,dst", "-j", "ACCEPT") </del> <ins> "-m", "set", "--match-set", proxier.ipsetList[kubeLoadBalancerSet].Name, "dst,dst", "-j", "RETURN") </ins> proxier.filterRules.Write( "-A", string(kubeIPVSFilterChain), <del> "-m", "set", "--match-set", proxier.ipsetList[kubeClusterIPSet].Name, "dst,dst", "-j", "ACCEPT") </del> <ins> "-m", "set", "--match-set", proxier.ipsetList[kubeClusterIPSet].Name, "dst,dst", "-j", "RETURN") </ins> proxier.filterRules.Write( "-A", string(kubeIPVSFilterChain), <del> "-m", "set", "--match-set", proxier.ipsetList[kubeExternalIPSet].Name, "dst,dst", "-j", "ACCEPT") </del> <ins> "-m", "set", "--match-set", proxier.ipsetList[kubeExternalIPSet].Name, "dst,dst", "-j", "RETURN") </ins> proxier.filterRules.Write( "-A", string(kubeIPVSFilterChain), "-m", "conntrack", "--ctstate", "NEW",

Discussion:
Kubernetes e2e suite.[It] [sig-network] LoadBalancers should only allow access from service loadbalancer source ranges [Slow] Sept 1st This PR merged around that time ! /sig network /area ipvs
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <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
I agree that is a prime suspect. I can't run "ESIPP" (is there a way?) tests locally, but I will try to run the second test and test manually.
Reproduced and found. The was ; The "ACCEPT" should be replaced with "RETURN".
Change:
Annotations: annotations, Labels:      cronJob.Spec.JobTemplate.Labels, OwnerReferences: []metav1.OwnerReference{ <del> *metav1.NewControllerRef(cronJob, appsv1.SchemeGroupVersion.WithKind("CronJob")), </del> <ins> *metav1.NewControllerRef(cronJob, cronJob.GroupVersionKind()), </ins> }, }, Spec: cronJob.Spec.JobTemplate.Spec,

Discussion:
<!-- 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: of Job created by using command will be . This apiVersion is wrong. What you expected to happen: Set the to How to reproduce it (as minimally and precisely as possible): CronJob manifest: <details</detailsApply CronJob and execute command Anything else we need to know?: Environment: Kubernetes version (use ):
/sig cli
This was introduced by . /assign
GitHub didn't allow me to assign the following users: odino. 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 : This was introduced by . 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 created fix pull request:
Change:
local message=$1 local match=$2 <del> if echo "$message" | grep -q "$match"; then </del> <ins> if grep -q "${match}" <<< "${message}"; then </ins> echo "FAIL!" echo "message:$message" echo "has:$match"

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug for lack of better idea hack/make-rules/test-cmd-, line 1443 is failing, even when the debug output shows the expected text: from the test log: What happened: See for example https://k8s-
This should be owned by whoever owns the "test-cmd runkubectlget_tests". This doesn't look like a failure in the testing framework or the infrastructure. I believe this is
the linked test is actually failing on the next test, not the .missing test... from the test log: this is very odd:
the issue appears to be with
potential fix in
seems like the same issue for runpluginstests:
same fix will hopefully resolve the issue
Change:
} } <del> var info syscall.Sysinfo_t syscall.Sysinfo(&info) procs := int64(info.Procs) rlimit.NumOfRunningProcesses = &procs </del> <ins> // Prefer to read "/proc/loadavg" when possible because sysinfo(2) // returns truncated number when greater than 65538. See // https://github.com/kubernetes/kubernetes/issues/107107 if procs, err := runningTaskCount(); err == nil { rlimit.NumOfRunningProcesses = &procs } else { var info syscall.Sysinfo_t syscall.Sysinfo(&info) procs := int64(info.Procs) rlimit.NumOfRunningProcesses = &procs } </ins> rlimit.Time = v1.NewTime(time.Now()) return rlimit, nil } <ins> func runningTaskCount() (int64, error) { // Example: 1.36 3.49 4.53 2/3518 3715089 bytes, err := ioutil.ReadFile("/proc/loadavg") if err != nil { return 0, err } fields := strings.Fields(string(bytes)) if len(fields) < 5 { return 0, fmt.Errorf("not enough fields in /proc/loadavg") } subfields := strings.Split(fields[3], "/") if len(subfields) != 2 { return 0, fmt.Errorf("error parsing fourth field of /proc/loadavg") } return strconv.ParseInt(subfields[1], 10, 64) } </ins>

Discussion:
Condition PIDPressure is not set to true when the system thread number exceeds even it's reaching the limit. Condition PIDPressure is set to true correctly See cause below The bug is due to , which truncates any process number greater than because of type conversion. See kernel code . Reading it from should be working. v1.23.1 <detailsNA </details<details</details<details</details<details</details<details</details
/sig node
/triage accepted /priority important-longterm
Change:
appslisters "k8s.io/client-go/listers/apps/v1beta1" corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" <ins> "k8s.io/client-go/tools/record" </ins> podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/history"

Discussion:
An issue to make bot happy for When StatefulSet finds any of its pods in phase Failed it will delete it and create it again. While doing so it will emit delete+create event which is really confusing for the user as he has no idea what's happening. /sig apps
Change:
REGISTRY?=gcr.io/google-containers IMAGE?=debian-hyperkube-base <del> TAG=0.7 </del> <ins> TAG=0.8 </ins> ARCH?=amd64 CACHEBUST?=1

Discussion:
the new hyperkube image has changed without notifying the bash environment now links to sh, there is only one thing worst than an error, and it is a SILENT ERROR this means that anyone that execute kubectl inside the hyperkube and leverage from a bash environment now get the weirdest exceptions , in my case troubles where caused by flexvolume scripted in bash which stopped working without reason and with weird errors logged ( but also there are some other cluster-images based on your hyperkube image, and if you link bash to sh it will spread headache around :) ) while for version 1.7.7 the result was different so , or remove bash, or repristinate bash, link bash-sh is a NO-NO
/assign /sig node
Change:
logger.Info("Stopping to monitor node resources of the plugin", "reason", context.Cause(ctx), "err", ctx.Err(), "recover", r) }() <ins> backOff := flowcontrol.NewBackOffWithJitter(retryPeriod, maxRetryPeriod, backoffFactor) backOffID := "retry" </ins> // Keep trying until canceled. for ctx.Err() == nil { logger.V(5).Info("Calling NodeListAndWatchResources")

Discussion:
has to retry after failures. This currently uses a fixed 5 second delay to avoid busy-looping. Exponential backoff might be better. /sig node /triage-accepted /priority important-longterm /lifecycle frozen /assign
/triage accepted
/assign
Change:
fakeRuntime.Stop() }() fakeRecorder := &record.FakeRecorder{} <del> rtSvc := createRemoteRuntimeService(endpoint, t) </del> <ins> rtSvc := createRemoteRuntimeService(endpoint, t, oteltrace.NewNoopTracerProvider()) </ins> kubeDep := &Dependencies{ Auth:                 nil, CAdvisorInterface:    cadvisor,

Discussion:
spans are not being parented to other spans - propagation of context seems broken. More context: spans should be parented to other spans enable kubelet tracing at v1.28 and hook up a tracing backend. No response <detailsv1.28 at least </details<detailsNot sure this matters. </details<details</details<details</details<details</details<details</details
/sig instrumentation /assign
/triage accepted
!
repro steps:
/assign Thanks for helping to look into this! Feel free to post the findings here you shared with me on slack
GitHub didn't allow me to assign the following users: fatsheep9146. Note that only with read permissions, 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
Thanks! I will post this ASAP
The broken issue is due to the pr , which try to propagate context brought by pod worker to syncPod function in order to let the syncPod can be interrupted in time by other asynchronous routines, for example eviction. But in the line we did not pass the context which contain the parent span and trace into function, so the trace is broken. So I want to fix this by passing the into , which is also desired in comment But passing the ctx into syncPod may have something other to do as described in comments, so I tried to fix as comments advised.
cc
Change:
} # Ensure that we have a password created for validating to the master.  Will <del> # read from the kubernetes auth-file for the current context if available. </del> <ins> # read from kubeconfig for the current context if available. </ins> # # Assumed vars #   KUBE_ROOT

Discussion:
Retrying after gave no joy.
Trying did not help.
will fix it. The problem is that your kubeconfig's current-context doesn't have a corresponding context entry. I'll see if I can make it gce's kube-up little more robust to invalid kubeconfig entries.
Thank you kindly for your help again. My brain is simply not large enough to remember all this.
Change:
init() defer func() { <del> volume.TestCleanup(f, convertTestConfig(l.config)) </del> <ins> volume.TestServerCleanup(f, convertTestConfig(l.config)) </ins> cleanup() }()

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : In block volume tests, wait for the Pod to be deleted instead of letting it be handled by the framework's namespace deletion Why is this needed: I think the regression caused by could have been caught if the tests check for Pod deletion because the Pod object shouldn't be deleted if TearDown fails.
/assign
This issue is not specific to block tests. We should in ideally wait for pod deletion at the end of all types of tests to confirm cleanup logic is functioning
I checked the tests under test/e2e/storage/testsuites/ where DeletePodWithWait is used to wait for the deletion.
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
/remove-lifecycle rotten is this still an issue? One way to check is to make a breaking change in cleanup and see if the pull job fails.
I went through all block volume usage in e2e tests: All of them but one wait for their pods to be deleted. I'm fixing the remaining test in
Change:
defer cancel() // Invalidate the cache right after updating <del> if err = ss.deleteCacheForNode(vmName); err != nil { return nil, err } </del> <ins> defer ss.deleteCacheForNode(vmName) </ins> klog.V(2).Infof("azureDisk - update(%s): vm(%s) - detach disk(%s, %s)", nodeResourceGroup, nodeName, diskName, diskURI) return ss.VirtualMachineScaleSetVMsClient.Update(ctx, nodeResourceGroup, ssName, instanceID, newVM, "detach_disk")

Discussion:
<!-- 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: vmss dirty cache issue, caused by What you expected to happen: clean vmss cache should happen after disk attach/detach operation, now it's before those operations, which would lead to dirty cache. 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: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others: /kind bug /assign /priority important-soon /sig cloud-provider /area provider/azure
Change:
shortDesc: "Aging shows pods by age" longDesc: > Aging shows pods from the current namespace by age. <del> Once we have plugin support for global flags through env vars (planned for V1) we'll be able to switch between namespaces using the --namespace flag. </del> command: ./aging.rb

Discussion:
/kind bug /sig cli What happened: Tried to list the age of pods in the namespace in an otherwise empty cluster $ kubectl --namespace kube-system plugin aging The Magnificent Aging Plugin. No pods What you expected to happen: That the pods in the namespace would have been listed How to reproduce it (as minimally and precisely as possible): the and from into . the command: Anything else we need to know?: No Environment: Kubernetes version (use ): v1.8.2 Cloud provider or hardware configuration: minikube & GKE OS (e.g. from /etc/os-release): Mac OSX El Capitan Kernel (e.g. ): Darwin Kernel Version 15.6.0 Install tools: Google Cloud SDK
hi for cli issue, could you please file it in this repo next time ? thanks !!
Will the k8s github bots be able to resolve references in commit messages made in kubernetes/kubernetes PRs be able to find the corresponding issue ticket in that other project? Semi-OT but related: I know there's an overall intention to refactoring k8s proper into many distinct projects, so it would be helpful if either the contributor guide contained a mapping of each and every module making up a k8s release with its corresponding github project and protocol governing the component. Or if each directory (module) in kubernetes/kubernetes contains its own explaining the contribution protocol. Right now documentation and information about ownership, contribution and protocols of various project modules are a sprawl and a bit of a mess, creating a significant barrier to entry (contribution). What's the proper place and form to discuss these sort of things?
thanks, I think those are some good suggestions, as far as I know you could send an email to our mailling-list(google-groups) or create an new issue then cc
Change:
// by REST storage - these typically indicate programmer // error by not using pkg/api/errors, or unexpected failure // cases. <del> runtime.HandleError(fmt.Errorf("apiserver received an error that is not an metav1.Status: %v", err)) </del> <ins> runtime.HandleError(fmt.Errorf("apiserver received an error that is not an metav1.Status: %#+v", err)) </ins> return &metav1.Status{ TypeMeta: metav1.TypeMeta{ Kind:       "Status",

Discussion:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If this may be security issue, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: /kind feature What happened: I am suffering from mysterious timeouts. See for the evidence from my latest investigation. It includes this line from the function in . The relevant line is this: I still do not know the type of the error in question or where it is coming from. It would be helpful if the log message included the type of the error object --- such as with or, if that does not include the type's package name, perhaps something that would really nail the type. What you expected to happen: I would expect more information about an unexpected type of error. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): 1.10.3 Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
I think this timeout is from resourcequota admission. Did you enable admission plugin? will create a pr to make ResourceQuota return err.
thanks for the suggestion, I will respond in the original issue.
I appreciate removing a source of errors of unexpected type, but this issue is about what to do whenever an unexpected type of error does arrive. I suggest formatting it with instead of .
/reopen That PR did not really fix this issue.
Change:
return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference a service account", nodeName)) } hasSecrets := false <del> podutil.VisitPodSecretNames(pod, func(name string) (shouldContinue bool) { hasSecrets = true; return false }) </del> <ins> podutil.VisitPodSecretNames(pod, func(name string) (shouldContinue bool) { hasSecrets = true; return false }, podutil.AllContainers) </ins> if hasSecrets { return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference secrets", nodeName)) } hasConfigMaps := false <del> podutil.VisitPodConfigmapNames(pod, func(name string) (shouldContinue bool) { hasConfigMaps = true; return false }) </del> <ins> podutil.VisitPodConfigmapNames(pod, func(name string) (shouldContinue bool) { hasConfigMaps = true; return false }, podutil.AllContainers) </ins> if hasConfigMaps { return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference configmaps", nodeName)) }

Discussion:
Fully described in , and will visit these fields for all containers, regardless of whether they're hidden behind a feature gate (e.g. ). This is usually correct, these methods are often used to drop fields and in this case should visit all containers that are persisted regardless of whether they're disabled, but the callers of these methods should signal that explicitly rather than relying on the implicit behavior. /cc /priority important-longterm /kind bug /sig node
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : Fully described in , and will visit these fields for all containers, regardless of whether they're hidden behind a feature gate (e.g. ). /priority important/long-term /kind bug /sig node 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
are you interested in taking this one, too?
VisitPodSecretNames and VisitPodConfigmapNames already specify AllContainers for VisitContainers Can you let me know what else needs to be done?
Callers should specify whether they want to visit all containers or not. There are valid reasons for each, so we shouldn't assume the desired behavior, even if 100% of the current users want to visit all containers. Jordan's original comment in has some examples of current uses. I don't think this needs to be as configurable as , so my naive first attempt to implement this would probably just be a new to and
Change:
scheme := runtime.NewScheme() err := v2beta1scheme.AddToScheme(scheme) require.NoError(t, err) <del> v2scheme.SchemeBuilder.Register(v2scheme.RegisterConversions) </del> err = v2scheme.AddToScheme(scheme) require.NoError(t, err) <ins> err = v2scheme.RegisterConversions(scheme) require.NoError(t, err) </ins> fuzzer := fuzz.NewWithSeed(2374375)

Discussion:
Seeing data race flakes in unit tests: Appears to have just been in /sig api-machinery /priority critical-urgent /assign /cc
This code is mutating the package-level schemebuilder: I think it should be adding the conversions to the local scheme instead:
Fixed in (found several instances)
/triage accepted