jiebi/CodeConvo huggingface dataset:
Change:
// endpointSliceTracker or the managed-by value of the EndpointSlice has changed // from or to this controller. func (c *Controller) onEndpointSliceUpdate(prevObj, obj interface{}) { <del> prevEndpointSlice := obj.(*discovery.EndpointSlice) </del> <ins> prevEndpointSlice := prevObj.(*discovery.EndpointSlice) </ins> endpointSlice := obj.(*discovery.EndpointSlice) if endpointSlice == nil || prevEndpointSlice == nil { utilruntime.HandleError(fmt.Errorf("Invalid EndpointSlice provided to onEndpointSliceUpdate()"))

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: Mistake use obj as prevObj prevEndpointSlice := obj.(discovery.EndpointSlice) What you expected to happen: prevEndpointSlice := prevObj.(discovery.EndpointSlice) 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: cc
/sig network
/triage unresolved Comment when the issue is assessed and confirmed. I am a bot run by vllry. ‍
/remove-triage unresolved PR for fixing it Thanks
Change:
} func TestEnsureInternalBackendServiceGroups(t *testing.T) { <ins> t.Parallel() </ins> for desc, tc := range map[string]struct { mockModifier func(*cloud.MockGCE) }{

Discussion:
Seeing several of the tests in ./pkg/cloudprovider/providers/gce flake 1 in 5-10 runs when run locally (I am logged in to gcloud). Is it possible one of the APIs is not correctly shimmed and is fetching real data?
you were the last folks in here - why would this and other internal_tests in here be flaking?
Happens in both master and 1.11 release branches
/cc cheftako
Change:
if apierrors.IsNotFound(err) { c.triggerTimeTracker.DeleteService(namespace, name) c.reconciler.deleteService(namespace, name) <ins> c.endpointSliceTracker.DeleteService(namespace, name) </ins> // The service has been deleted, return nil so that it won't be retried. return nil }

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: The endpointSliceTracker creates a set of resource versions for each service, the resource versions in the set could be deleted when endpointslices are deleted, but the set and its key in the map is never deleted, leading to memory leak. What you expected to happen: The set of resource versions should be delete from endpointSliceTracker when the service is deleted. Environment: Kubernetes version (use ): 1.18.5
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands: - Please see the for a listing of the SIGs, working groups, and committees available. <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
/cc
Change:
Expect(len(nodes.Items)).NotTo(BeZero(), "No available nodes for scheduling") scName = fmt.Sprintf("%v-%v", testSCPrefix, f.Namespace.Name) // Choose the first node <del> node0 = &config.nodes.Items[0] </del> <ins> node0 = &nodes.Items[0] </ins> config = &localTestConfig{ ns:     f.Namespace.Name,

Discussion:
<!-- 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: What you expected to happen: Test should pass
/sig storage
can you take a look?
cc
This part looks a bit suspicious, config var at this moment is not initialized properly, it is just a pointer to nil. var ( config localTestConfig node0 v1.Node scName string ) Panic here is because I think config points nowhere node0 = [0] Here is only where config gets instantiated. config = &localTestConfig{ ns: f.Namespace.Name, client: f.ClientSet, nodes: nodes, node0: node0, scName: scName, } Am I on the right track here?
Yeah, looks like should not use
+1 we should just use nodes.Items[0] wondering how this passed ci ...
It didn't :-) See
hmm, ok since u spotted the bug, do you want to put a PR for it?
if you can do it now, then please go ahead. otherwise I will do it tomorrow morning since it is already late on East Coast.
I've created , PTAL
Change:
b.errs = append(b.errs, fmt.Errorf("no internal mapper provided")) return b } <del> if b.mapper != nil { </del> <ins> if b.mapper != nil && b.mapper != b.internal { </ins> b.errs = append(b.errs, fmt.Errorf("another mapper was already selected, cannot use internal types")) return b }

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 bug What happened: I run and I got Running with shows What you expected to happen: How to reproduce it (as minimally and precisely as possible): With Kubernetes master branch and in different terminal on the same machine Anything else we need to know?: Environment: Kubernetes version (use ):Cloud provider or hardware configuration: VM via libvirtd OS (e.g. from /etc/os-release): Fedora 27 with golang-1.10.1-1.fc29.x86_64 from rawhide Kernel (e.g. ):Install tools: ?? Others:
/sig cli
/assign
/assign
Change:
<ins> // +build !windows /* Copyright 2021 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 app import ( "fmt" "os" ) func checkPermissions() error { if uid := os.Getuid(); uid != 0 { return fmt.Errorf("kubelet needs to run as uid `0`. It is being run as %d", uid) } // TODO: Check if kubelet is running in the `initial` user namespace. // http://man7.org/linux/man-pages/man7/user_namespaces.7.html return nil } </ins>

Discussion:
What happened: follow on to Need to comment and avoid checking UID on windows. requires some research into what we should be checking so that we can add appropriate TODO. What you expected to happen: Lets also check this at the call site, Anything else we need to know?: Environment: Kubernetes version (use ): master OS (e.g: ): windows
/assign
/assign
/good-first-issue
This request has been marked as suitable for new contributors. 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 : /good-first-issue 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 windows
Hi are you working on this issue already? If not I'd like to tackle this issue :)
Hi yeah I am already working on this :)
Started branch for this here
thanks
Hey guys is there anything I can do here?
If you want to test perks patch that would be great ?
That sounds great Where do I get started?
Hey ! is there anything I can help with? and how?
I dont think there is anything left to do anything more that you think we need to do to get this merged?
Tested this with containerd as well, I think its good to test
/triage accepted
Change:
libcontainerStats := &libcontainer.Stats{ CgroupStats: cgroupStats, } <del> stats := newContainerStats(libcontainerStats) </del> <ins> withPerCPU := !ignoreMetrics.Has(container.PerCpuUsageMetrics) stats := newContainerStats(libcontainerStats, withPerCPU) </ins> // If we know the pid then get network stats from /proc/<pid>/net/dev if pid == 0 {

Discussion:
/kind feature This is the once-per-release cut of a new cAdvisor release, which corresponds to the next kubernetes release. cAdvisor v0.29 corresponds to kubernetes v1.10. /sig node /priority important-soon
self-reminder to add per-cpu stats to ignore metrics when vendoring. reminder to add a release notice that one of the container labels fields is being removed.
/kind bug turns out most of the changes are bug-fixes
please mark this issue as approved-for-milestone, since it certainly seems to be, and it's now code slush. Thanks!
Change:
res = append(res, obj) } <ins> // Sort res to get deterministic order. sort.Slice(res, func(i, j int) bool { acc1, _ := meta.Accessor(res[i]) acc2, _ := meta.Accessor(res[j]) if acc1.GetNamespace() != acc2.GetNamespace() { return acc1.GetNamespace() < acc2.GetNamespace() } return acc1.GetName() < acc2.GetName() }) </ins> return res, nil }

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: I used to fake a clientset to test my code. I found that it became very slow to init the clientset with a big number of objects when I was trying to simulate a large scale cluster, and the time seemed exponential increasing. For example: Initializing a clientset with: 5000 objects took 300ms objects took 2.58s objects took 11.82s objects took 54.64s. It's because the fake clientset used a slice to store each kind of objects, so it's quite slow to init the clientset with massive objects because it checked existence of an object by traversing all objects and comparing with them before adding one, which leads to O(n^2) time complexity. What you expected to happen: The fake clientset is very useful for development, it should have a reasonable time complexity to allow developers to use it for large scale scenario. How to reproduce it (as minimally and precisely as possible): Run this code: You would see the time spent on each operation, like: Anything else we need to know?: Environment: Kubernetes version (use ): 1.15.0-1.18.0 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:
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands: - Please see the for a listing of the SIGs, working groups, and committees available. <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 had PR that uses map to store objects, which can reduce the init time to a reasonable value (tens of ms for objects). /assign
Change:
return allErrs } <del> func validateAudiences(audiences []string, audienceMatchPolicy api.AudienceMatchPolicyType, fldPath, audienceMatchPolicyFldPath *field.Path) field.ErrorList { </del> <ins> func validateAudiences(audiences []string, audienceMatchPolicy api.AudienceMatchPolicyType, fldPath, audienceMatchPolicyFldPath *field.Path, structuredAuthnFeatureEnabled bool) field.ErrorList { </ins> var allErrs field.ErrorList if len(audiences) == 0 {

Discussion:
For example, should not let you set discovery URL when the feature gate is not enabled. I believe this only impacts library users, as direct usage in KAS requires the file based config, which is feature gated. /assign enj aramase /milestone v1.32
Change:
f.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged ginkgo.Context("Downward API tests for hugepages", func() { <del> ginkgo.BeforeEach(func() { e2eskipper.SkipUnlessFeatureGateEnabled(kubefeatures.DownwardAPIHugePages) }) </del> ginkgo.It("should provide container's limits.hugepages-<pagesize> and requests.hugepages-<pagesize> as env vars", func() { podName := "downward-api-" + string(uuid.NewUUID()) env := []v1.EnvVar{

Discussion:
/kind failing-test <!-- If this is a flake, please add: /kind flake --/sig node
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
Same failure in
I think this is related to the change @ could you please help take a look?
We already discussed this in The change from correctly points out that the test isn't working as expected. It needs to be fixed. /unassign
/assign
After , the tests are still failing. Could you help check it?
The skip function is used in another case as well. We may remove that like .
will fix this.
/close the test grid is green now.
Closing this issue. <detailsIn response to : /close the test grid is green now. 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
Change:
} func tooManyRequests(req *http.Request, w http.ResponseWriter) { <del> // "Too Many Requests" response is returned before logger is setup for the request. // So we need to explicitly log it here. defer httplog.NewLogged(req, &w).Log() </del> // Return a 429 status indicating "Too Many Requests" w.Header().Set("Retry-After", retryAfter) http.Error(w, "Too many requests, please try again later.", errors.StatusTooManyRequests)

Discussion:
Example call stack from : We should fix this and add an integration test that sets the limit low and exercises apiserver when it is getting too many requests.
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <bre.g., for API Machinery<br(2) specifying the label manually: <bre.g., for sig/scalability<br<brNote: method (1) will trigger a notification to the team. You can find the team list and label list
Should be fixed by the above PR. Closing it.
Change:
if err := cc.syncFunc(cKey.(string)); err != nil { cc.queue.AddRateLimited(cKey) <del> utilruntime.HandleError(fmt.Errorf("Sync %v failed with : %v", cKey, err)) </del> <ins> if _, ignorable := err.(ignorableError); !ignorable { utilruntime.HandleError(fmt.Errorf("Sync %v failed with : %v", cKey, err)) } else { glog.V(4).Infof("Sync %v failed with : %v", cKey, err) } </ins> return true }

Discussion:
Each node waiting for bootstrapping creates 1 line per 2-3s in the logs when the requesting client doesn't have access. It should not be logging at v(0), these are all v(4) level. We should be reporting these appropriately. I don't want a 5k node cluster showing this.
I'd like to fix it
Change:
} name := env[:pos] value := env[pos+1:] <del> if len(name) == 0 || len(validation.IsCIdentifier(name)) != 0 || len(value) == 0 { </del> <ins> if len(name) == 0 || len(validation.IsCIdentifier(name)) != 0 { </ins> return nil, fmt.Errorf("invalid env: %v", env) } envVar := v1.EnvVar{Name: name, Value: value}

Discussion:
It should be possible to pass empty environment variables to pods run by env (to clear an env var set inside the image, for example). is valid syntax for "set env var FOO to empty string".
Change:
} handler.ValidateRequest(t, "/api/"+testapi.Version()+"/minions", "GET", nil) <del> if e, a := len(item.minions), ce.Len(); e != a { t.Errorf("Expected %v, got %v", e, a) </del> <ins> if a := ce.Len(); item.expectedCount != a { t.Errorf("Expected %v, got %v", item.expectedCount, a) </ins> } } }

Discussion:
With latest master it can happen that pods get scheduled on minions that are not up and get stuck in state. Also the command now also lists the down minions.
Master now returns all minions, with minion status set. Scheduler hasn't been updated yet. I'll put a fix for this. kubectl should return only running minions, and take a '-a' option to list all minions now. This also needs to be fixed.
, Deyuan Deng wrote:
Yeah, the main concern is that minion status is not as clear as Pod, e.g. running minion may not be eligible to schedule a pod. I'm still trying to figure out the best way to convey the message to client.
Re-open as now list all minions, including down ones. We should probabaly first filter out unhealthy ones in kubectl, before we can show any status.
What do you mean by "filter out"? We should be caching minion status in the apiserver. As proposed, we should show all minions that exist, including unresponsive ones.
I mean do not show down minions for now for consistency (users do not expect down minion to be listed). I agree with what proposed, but I'm trying to figure out how / what we convey the status message to user. NodePhase + NodeConditions are essential for k8s components, but are we going to expose all such data to user?
Why wouldn't users need to see down minions? I would think as an admin i would want to see phase + conditions
nvm My original concern was that phase and conditions are meant to be used by k8s, so we may need some translation to make it easier to understand for admin. Also, they are not fully populated, so I thought we may delay showing status for now. I certainly have no problem showing down minions and adding status. I've created a PR
Change:
volumeManager kubeletvolume.VolumeManager // Cloud provider interface. <del> cloud cloudprovider.Interface </del> <ins> cloud                   cloudprovider.Interface autoDetectCloudProvider bool </ins> // Reference to this node. nodeRef *api.ObjectReference

Discussion:
It appears that the kubelet will detect and use the cloud provider as detected by cadvisor thus overriding the cloud provider passed in at runtime: This will break our private cloud configuration where we do not use our cloud provider's load balancing and instead use our own load balancing tier. In my opinion, the cloud provider specified at kubelet runtime should be respected for the node. Am I reading this correctly? Any thoughts on how to handle this properly? Thank you!
If you specify any cloud provider through flags, it will be used by kubelet (see ). It's only when you don't specify any cloud provider that kubelet will detect the cloud provider from the machine info, as described by the comment.
that's exactly my situation, I want to run in our private cloud environment without any of the cloud integration. If I specify cloud-provider="" at runtime it will get overridden.
Ah I see. I guess specifying an empty string is the same as not specifying any cloud provider. This auto-detection feature was introduced by /cc the author and reviewer to see if this is an intended behavior:
Legitimate concern. I'm posting a fix. Do you consider this to be a regression or are you just getting started with k8s.
I am sorry, This was not the original intention. We can keep the auto detection with a flag, or make a flag to ask kubelet not to do it. Unless there is a way to see if the variable was assigned to that I missed. I can post a fix tomorrow if it won't exit by then.
Thank you. We're running on 1.2.4 and won't be running on 1.3 for a few months yet anyways and was just testing to look for future issues when I found this.
I assigned this issue to you since , and I can't assign this to anyway :-)
Thanks for testing our 1.3 release candidate, and reporting this regression to us. We are including the fix to 1.3.
Change:
AllowInvalidTopologySpreadConstraintLabelSelector: false, AllowMutableNodeSelectorAndNodeAffinity:           utilfeature.DefaultFeatureGate.Enabled(features.PodSchedulingReadiness), AllowNamespacedSysctlsForHostNetAndHostIPC:        false, <ins> AllowNonLocalProjectedTokenPath:                   false, </ins> } if oldPodSpec != nil {

Discussion:
Originally posted by in
Hello, I'm new here. Can I try solving this? it seems like a good first issue
sure, context is the change is needed here: We have to tolerate existing pods / pod specs that fail this validation, so we should only do this additional validation on create or if the existing object passes this validation. To do this: an field to , initialize that field to false, and then conditionally override it to if is non-nil and has a projected token volume path that fails (will have to export the function to check this) , if is false, call the validation on the path:
Hi, I'd like to work on this if there is no one is proceeding on. /assign
Change:
"time" "github.com/golang/glog" <ins> "golang.org/x/net/http2" </ins> "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime"

Discussion:
While this issue happens without this complicated reproduction, here is a sure-fire way to get it. a long-running kubectl get. In this example, I have a cluster with about 2,000 configmaps each around 100KiB. Once you see these lines Press , then type , and then you'll see... What's happening is that the apiserver is hitting , and then it . As the code says, this should make it obvious to the client (kubectl) that it didn't get the entire body, because no 0-length EOF chunk gets sent. I can confirm from using tcpdump that no such chunk gets sent. However, kubectl doesn't notice this, and instead tries to decode a 0-length Response body, giving the cryptic message. What I expected to happen the very least, a less cryptic error message like "connected closed". , this gets detected by the code and we can internally retry, just as if we got, e.g.,
cc Possibly seen here, too: openshift/origin
/assign mengqiy
Created a PR to detect it. Further improvement may be retrying when detect connection closure
closing this since you filed a PR for it
Change:
{ "SelectorRegexp": "k8s[.]io/kubernetes/test/", "AllowedPrefixes": [ <ins> "k8s.io/kubernetes/test/e2e/framework", </ins> "k8s.io/kubernetes/test/e2e/framework/auth", "k8s.io/kubernetes/test/e2e/framework/ginkgowrapper", <ins> "k8s.io/kubernetes/test/e2e/framework/kubectl", </ins> "k8s.io/kubernetes/test/e2e/framework/log", "k8s.io/kubernetes/test/e2e/framework/metrics", <ins> "k8s.io/kubernetes/test/e2e/framework/network", </ins> "k8s.io/kubernetes/test/e2e/framework/node", "k8s.io/kubernetes/test/e2e/framework/pod", <ins> "k8s.io/kubernetes/test/e2e/framework/rc", </ins> "k8s.io/kubernetes/test/e2e/framework/resource", <ins> "k8s.io/kubernetes/test/e2e/framework/service", </ins> "k8s.io/kubernetes/test/e2e/framework/ssh", "k8s.io/kubernetes/test/e2e/framework/testfiles", "k8s.io/kubernetes/test/e2e/manifest", "k8s.io/kubernetes/test/e2e/perftype", <ins> "k8s.io/kubernetes/test/e2e/storage/utils", "k8s.io/kubernetes/test/e2e/system", </ins> "k8s.io/kubernetes/test/utils", "k8s.io/kubernetes/test/utils/image" ],

Discussion:
What happened: There is to manage import ways under but that doesn't work at our upstream CI. We can enable it by But if doing that, we will face the following error with What you expected to happen: I hope the check is always running to block invalid import ways at upstream CI system. How to reproduce it (as minimally and precisely as possible): As line into arguments.InputDirs of
/sig testing /area e2e-test-framework