jiebi/CodeConvo huggingface dataset:
Code change:
What happened: While testing out the flag, I created a manifest with the following contents: I ran , and the resources appeared on my minikube cluster: Then, I removed the deployment from the manifest: And re-ran the same command, . To my surprise, however, the deployment wasn't removed; the only output from kubectl was . What you expected to happen: I expected the pruner to find the deployment with the matching label, , and prune it. How to reproduce it (as minimally and precisely as possible): I believe my example above is minimal and easily reproducible. Anything else we need to know?: This small change to the code for resolves the issue: Environment: Kubernetes version (use ): v1.16.3 Cloud provider or hardware configuration: N/A OS (e.g: ): N/A Kernel (e.g. ): N/A Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: N/A
/sig cli
/assign cc

Related discussion:
text: } if errors.IsConflict(err) { err = fmt.Errorf(`%v Please review the fields above--they currently have other managers. Here are the ways you can resolve this warning: * If you intend to manage all of these fields, please re-run the apply
Code change:
What happened: While testing out the flag, I created a manifest with the following contents: I ran , and the resources appeared on my minikube cluster: Then, I removed the deployment from the manifest: And re-ran the same command, . To my surprise, however, the deployment wasn't removed; the only output from kubectl was . What you expected to happen: I expected the pruner to find the deployment with the matching label, , and prune it. How to reproduce it (as minimally and precisely as possible): I believe my example above is minimal and easily reproducible. Anything else we need to know?: This small change to the code for resolves the issue: Environment: Kubernetes version (use ): v1.16.3 Cloud provider or hardware configuration: N/A OS (e.g: ): N/A Kernel (e.g. ): N/A Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: N/A
/sig cli
/assign cc

Related discussion:
text: * You may co-own fields by updating your manifest to match the existing value; in this case, you'll become the manager if the other manager(s) stop managing the field (remove it from their configuration). See http://k8s.io/docs/reference/using-api/api-concepts/#conflicts`, err) } return err
Code change:
What happened: While testing out the flag, I created a manifest with the following contents: I ran , and the resources appeared on my minikube cluster: Then, I removed the deployment from the manifest: And re-ran the same command, . To my surprise, however, the deployment wasn't removed; the only output from kubectl was . What you expected to happen: I expected the pruner to find the deployment with the matching label, , and prune it. How to reproduce it (as minimally and precisely as possible): I believe my example above is minimal and easily reproducible. Anything else we need to know?: This small change to the code for resolves the issue: Environment: Kubernetes version (use ): v1.16.3 Cloud provider or hardware configuration: N/A OS (e.g: ): N/A Kernel (e.g. ): N/A Install tools: N/A Network plugin and version (if this is a network-related bug): N/A Others: N/A
/sig cli
/assign cc

Related discussion:
text: } } <ins> func TestApplyPruneObjects(t *testing.T) { cmdtesting.InitTestErrorHandler(t) nameRC, currentRC := readAndAnnotateReplicationController(t, filenameRC) pathRC := "/namespaces/test/replicationcontrollers/" + nameRC for _, fn := range testingOpenAPISchemaFns { t.Run("test apply returns correct output", func(t *testing.T) { tf := cmdtesting.NewTestFactory().WithNamespace("test") defer tf.Cleanup() tf.UnstructuredClient = &fake.RESTClient{ NegotiatedSerializer: resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { switch p, m := req.URL.Path, req.Method; { case p == pathRC && m == "GET": bodyRC := ioutil.NopCloser(bytes.NewReader(currentRC)) return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: bodyRC}, nil case p == pathRC && m == "PATCH": validatePatchApplication(t, req) bodyRC := ioutil.NopCloser(bytes.NewReader(currentRC)) return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: bodyRC}, nil default: t.Fatalf("unexpected request: %#vn%#v", req.URL, req) return nil, nil } }), } tf.OpenAPISchemaFunc = fn tf.ClientConfigVal = cmdtesting.DefaultClientConfig() ioStreams, _, buf, errBuf := genericclioptions.NewTestIOStreams() cmd := NewCmdApply("kubectl", tf, ioStreams) cmd.Flags().Set("filename", filenameRC) cmd.Flags().Set("prune", "true") cmd.Flags().Set("namespace", "test") cmd.Flags().Set("output", "yaml") cmd.Flags().Set("all", "true") cmd.Run(cmd, []string{}) if !strings.Contains(buf.String(), "test-rc") { t.Fatalf("unexpected output: %snexpected to contain: %s", buf.String(), "test-rc") } if errBuf.String() != "" { t.Fatalf("unexpected error output: %s", errBuf.String()) } }) } } </ins> func TestApplyObjectOutput(t *testing.T) { cmdtesting.InitTestErrorHandler(t) nameRC, currentRC := readAndAnnotateReplicationController(t, filenameRC)
Code 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: When trying to use the webhookConversionServer, im getting . I was able to figure out that the unicode character displayed maps to port 443. see code What you expected to happen: If the service reference doesnt define 443, it should show an error that the service doesnt have the port number (whatever the number may be). How to reproduce it (as minimally and precisely as possible): your service (missing the default port 443) your CRD (one version no conversion webhook) your resource at this old version crd with new version and conversion webhook, and use new version for storage. to get the resource yaml, and see error Anything else we need to know?: current implementation will convert port number into a unicode character. ie. im seeing where . Must use instead of to maintain decimal. Environment: Kubernetes version (use ): v1.15.4+IKS Cloud provider or hardware configuration: IBM IKS OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig api-machinery
Are you planning to send out a PR ?
i was going to.. but didnt know which repo was relevant and didnt feel like reading through all contibution gorp.
Created a PR to fix the message output.

Related discussion:
text: return &svcPort, nil } } <del> return nil, errors.NewServiceUnavailable(fmt.Sprintf("no service port %q found for service %q", port, svc.Name)) </del> <ins> return nil, errors.NewServiceUnavailable(fmt.Sprintf("no service port %d found for service %q", port, svc.Name)) </ins> } // ResourceLocation returns a URL to which one can send traffic for the specified service.
Code 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: Azure cloud provider is sending unexpected LoadBalancer update requests even if the LoadBalancer rules are already identical. The reason is GetIdleTimeout() returns nil when the annotation is not set While find rule doens't check whether it is nil or not. What you expected to happen: Azure cloud provider shouldn't send unexpected LoadBalancer updates. It is easily to get throttled if there're too many services running on the cluster. How to reproduce it (as minimally and precisely as possible): kubectl annotate service nginx testlabel=value 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 /area provider/azure /assign
/sig cloud-provider

Related discussion:
text: reflect.DeepEqual(s.EnableTCPReset, t.EnableTCPReset) && reflect.DeepEqual(s.DisableOutboundSnat, t.DisableOutboundSnat) <del> if wantLB { </del> <ins> if wantLB && s.IdleTimeoutInMinutes != nil && t.IdleTimeoutInMinutes != nil { </ins> return properties && reflect.DeepEqual(s.IdleTimeoutInMinutes, t.IdleTimeoutInMinutes) } return properties
Code 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: Azure cloud provider is sending unexpected LoadBalancer update requests even if the LoadBalancer rules are already identical. The reason is GetIdleTimeout() returns nil when the annotation is not set While find rule doens't check whether it is nil or not. What you expected to happen: Azure cloud provider shouldn't send unexpected LoadBalancer updates. It is easily to get throttled if there're too many services running on the cluster. How to reproduce it (as minimally and precisely as possible): kubectl annotate service nginx testlabel=value 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 /area provider/azure /assign
/sig cloud-provider

Related discussion:
text: expected: false, }, { <ins> msg: "rule names match while idletimeout unmatch should return false", existingRule: []network.LoadBalancingRule{ { Name: to.StringPtr("httpRule"), LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{ IdleTimeoutInMinutes: to.Int32Ptr(1), }, }, }, curRule: network.LoadBalancingRule{ Name: to.StringPtr("httpRule"), LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{ IdleTimeoutInMinutes: to.Int32Ptr(2), }, }, expected: false, }, { msg: "rule names match while idletimeout nil should return true", existingRule: []network.LoadBalancingRule{ { Name:                              to.StringPtr("httpRule"), LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{}, }, }, curRule: network.LoadBalancingRule{ Name: to.StringPtr("httpRule"), LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{ IdleTimeoutInMinutes: to.Int32Ptr(2), }, }, expected: true, }, { </ins> msg: "rule names match while LoadDistribution unmatch should return false", existingRule: []network.LoadBalancingRule{ {
Code change:
If you give a prerelease version to , it'll match both and . Based on this logic: We'll end up trying to pull binaries for this prerelease from the CI bucket () rather than the release bucket (). These pre-release versions are usually* pushed to the release bucket as part of the release process (e.g. ), and so should probably prefer these over the CI versions (which may or may not exist, depending on whether a commit was pushed to the release branch between when the tag was created and the build occurred). More explicitly, the current logic is: the release bucket by default. a version matches the CI regex, use the CI bucket. , if a version matches the release regex, we're good - continue to use the default (release bucket). , bail out - invalid version. The correct logic would probably be something like the release bucket by default. a version matches the release version regex, continue to use the release bucket. , if a version doesn't match the release version regex, but it matches the CI regex, use the CI bucket. it matches neither, bail out. Important note: due to our hotfix for , there is a somewhat fake prerelease tag () which doesn't have any bits in the release bucket, and we expect others soon. We should not fix this bug in until the latest pointers in the CI bucket do not point to valid release/prerelease versions.
/sig testing /sig release I guess?
/area release-eng /priority critical-urgent /assign /milestone v1.18
Hello With code freeze approaching for 1.18 (5 March), can you please check if the current issue is still intended for milestone 1.18?
-- I'm pretty sure I can get to this before the cycle is out.
if our current approach for tagging release branch pre-releases doesn't trigger this, this seems like it is not critical for the milestone, is that correct?
-- Good point! /milestone v1.19 /remove-priority critical-urgent /priority important-soon
Given the priority dip on this one, I think it's fine for someone in Releng other than Tim or I to pick this up. /unassign -- This is a good one to work on. /help
I can look that, after the release 1.18, if is that fine then can we have a short discussion about this one? /remove-help /assign
-- SGTM

Related discussion:
text: # Translate a published version <bucket>/<version> (e.g. "release/stable") to version number. set_binary_version "${release}" if [[ -z "${KUBERNETES_SKIP_RELEASE_VALIDATION-}" ]]; then <del> if [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then </del> <ins> if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then # Use KUBERNETES_RELEASE_URL for Releases and Pre-Releases # ie. 1.18.0 or 1.19.0-beta.0 KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL}" elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then </ins> # Override KUBERNETES_RELEASE_URL to point to the CI bucket; # this will be used by get-kube-binaries.sh. <ins> # ie. v1.19.0-beta.0.318+b618411f1edb98 </ins> KUBERNETES_RELEASE_URL="${KUBERNETES_CI_RELEASE_URL}" <del> elif ! [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then </del> <ins> else </ins> echo "Version doesn't match regexp" >&2 exit 1 fi
Code change:
In a few utility function in current test/e2e/storage/utils, we found that the err variable gets shadowed. Because of this, it might get nil pointer error. See code
fixed by

Related discussion:
text: func VerifyExecInPodSucceed(f *framework.Framework, pod *v1.Pod, shExec string) { _, err := PodExec(f, pod, shExec) if err != nil { <del> if err, ok := err.(uexec.CodeExitError); ok { exitCode := err.ExitStatus() </del> <ins> if exiterr, ok := err.(uexec.CodeExitError); ok { exitCode := exiterr.ExitStatus() </ins> framework.ExpectNoError(err, "%q should succeed, but failed with exit code %d and error message %q", <del> shExec, exitCode, err) </del> <ins> shExec, exitCode, exiterr) </ins> } else { framework.ExpectNoError(err, "%q should succeed, but failed with error message %q",
Code change:
In a few utility function in current test/e2e/storage/utils, we found that the err variable gets shadowed. Because of this, it might get nil pointer error. See code
fixed by

Related discussion:
text: func VerifyExecInPodFail(f *framework.Framework, pod *v1.Pod, shExec string, exitCode int) { _, err := PodExec(f, pod, shExec) if err != nil { <del> if err, ok := err.(clientexec.ExitError); ok { actualExitCode := err.ExitStatus() </del> <ins> if exiterr, ok := err.(clientexec.ExitError); ok { actualExitCode := exiterr.ExitStatus() </ins> framework.ExpectEqual(actualExitCode, exitCode, "%q should fail with exit code %d, but failed with exit code %d and error message %q", <del> shExec, exitCode, actualExitCode, err) </del> <ins> shExec, exitCode, actualExitCode, exiterr) </ins> } else { framework.ExpectNoError(err, "%q should fail with exit code %d, but failed with error message %q",
Code change:
What would you like to be : An integration test for NodeResourceLimits plugin. Why is this needed: No end-to-end test coverage current exist for this alpha feature. /sig scheduling /help
/assign /remove-help

Related discussion:
text: "extender_test.go", "framework_test.go", "main_test.go", <ins> "plugins_test.go", </ins> "predicates_test.go", "preemption_test.go", "priorities_test.go",
Code change:
What would you like to be : An integration test for NodeResourceLimits plugin. Why is this needed: No end-to-end test coverage current exist for this alpha feature. /sig scheduling /help
/assign /remove-help

Related discussion:
text: <ins> /* Copyright 2020 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 scheduler import ( "testing" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" utilfeature "k8s.io/apiserver/pkg/util/feature" featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/kubernetes/pkg/features" ) func TestNodeResourceLimits(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ResourceLimitsPriorityFunction, true)() context := initTest(t, "node-resource-limits") defer cleanupTest(t, context) // Add one node expectedNode, err := createNode(context.clientSet, "test-node1", &v1.ResourceList{ v1.ResourcePods:   *resource.NewQuantity(32, resource.DecimalSI), v1.ResourceCPU:    *resource.NewMilliQuantity(2000, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(2000, resource.DecimalSI), }) if err != nil { t.Fatalf("Cannot create node: %v", err) } // Add another node with less resource _, err = createNode(context.clientSet, "test-node2", &v1.ResourceList{ v1.ResourcePods:   *resource.NewQuantity(32, resource.DecimalSI), v1.ResourceCPU:    *resource.NewMilliQuantity(1000, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(1000, resource.DecimalSI), }) if err != nil { t.Fatalf("Cannot create node: %v", err) } podName := "pod-with-resource-limits" pod, err := runPausePod(context.clientSet, initPausePod(context.clientSet, &pausePodConfig{ Name:      podName, Namespace: context.ns.Name, Resources: &v1.ResourceRequirements{Requests: v1.ResourceList{ v1.ResourceCPU:    *resource.NewMilliQuantity(500, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(500, resource.DecimalSI)}, }, })) if err != nil { t.Fatalf("Error running pause pod: %v", err) } if pod.Spec.NodeName != expectedNode.Name { t.Errorf("pod %v got scheduled on an unexpected node: %v. Expected node: %v.", podName, pod.Spec.NodeName, expectedNode.Name) } else { t.Logf("pod %v got successfully scheduled on node %v.", podName, pod.Spec.NodeName) } } </ins>
Code change:
When trying to see why pods don't start using either kubectl get events or kubectl describe pod , the base message is not detailed enough. Warning FailedScheduling 5s (x4 over 65s) default-scheduler 0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate. What would you like to be : Details of the taint and details of what it didn't tolerate Why is this needed: To get much much better debug information by default when trying to understand why pods can't launch.
/sig cli
/sig scheduling /priority important-longterm
/cc
/remove-sig cli
Those labels are not set on the issue: <detailsIn response to : /remove-sig cli </details
/good-first-issue
/assign starizard
Can I get an idea of what this would involve? I might be able to put some work on it.
I assume is taking this already. The error message is produced in We probably also require changes in to get the name of the missing toleration.
/remove-help

Related discussion:
text: // TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates // all the taints that apply to the filter in given taint list. <ins> // DEPRECATED: Please use FindMatchingUntoleratedTaint instead. </ins> func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool { <del> if len(taints) == 0 { return true } </del> <ins> _, isUntolerated := FindMatchingUntoleratedTaint(taints, tolerations, applyFilter) return !isUntolerated } </ins> <del> for i := range taints { if applyFilter != nil && !applyFilter(&taints[i]) { continue </del> <ins> // FindMatchingUntoleratedTaint checks if the given tolerations tolerates // all the filtered taints, and returns the first taint without a toleration func FindMatchingUntoleratedTaint(taints []v1.Taint, tolerations []v1.Toleration, inclusionFilter taintsFilterFunc) (v1.Taint, bool) { filteredTaints := getFilteredTaints(taints, inclusionFilter) for _, taint := range filteredTaints { if !TolerationsTolerateTaint(tolerations, &taint) { return taint, true </ins> } <ins> } return v1.Taint{}, false } </ins> <del> if !TolerationsTolerateTaint(tolerations, &taints[i]) { return false </del> <ins> // getFilteredTaints returns a list of taints satisfying the filter predicate func getFilteredTaints(taints []v1.Taint, inclusionFilter taintsFilterFunc) []v1.Taint { if inclusionFilter == nil { return taints } filteredTaints := []v1.Taint{} for _, taint := range taints { if !inclusionFilter(&taint) { continue </ins> } <ins> filteredTaints = append(filteredTaints, taint) </ins> } <del> return true </del> <ins> return filteredTaints </ins> } // Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise.
Code change:
When trying to see why pods don't start using either kubectl get events or kubectl describe pod , the base message is not detailed enough. Warning FailedScheduling 5s (x4 over 65s) default-scheduler 0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate. What would you like to be : Details of the taint and details of what it didn't tolerate Why is this needed: To get much much better debug information by default when trying to understand why pods can't launch.
/sig cli
/sig scheduling /priority important-longterm
/cc
/remove-sig cli
Those labels are not set on the issue: <detailsIn response to : /remove-sig cli </details
/good-first-issue
/assign starizard
Can I get an idea of what this would involve? I might be able to put some work on it.
I assume is taking this already. The error message is produced in We probably also require changes in to get the name of the missing toleration.
/remove-help

Related discussion:
text: return framework.NewStatus(framework.Error, err.Error()) } <del> if v1helper.TolerationsTolerateTaintsWithFilter(pod.Spec.Tolerations, taints, func(t *v1.Taint) bool { </del> <ins> filterPredicate := func(t *v1.Taint) bool { </ins> // PodToleratesNodeTaints is only interested in NoSchedule and NoExecute taints. return t.Effect == v1.TaintEffectNoSchedule || t.Effect == v1.TaintEffectNoExecute <del> }) { </del> <ins> } taint, isUntolerated := v1helper.FindMatchingUntoleratedTaint(taints, pod.Spec.Tolerations, filterPredicate) if !isUntolerated { </ins> return nil } <del> return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonNotMatch) </del> <ins> errReason := fmt.Sprintf("node(s) had taint {%s: %s}, that the pod didn't tolerate", taint.Key, taint.Value) return framework.NewStatus(framework.UnschedulableAndUnresolvable, errReason) </ins> } // postFilterState computed at PostFilter and used at Score.