jiebi/CodeConvo huggingface dataset:
Change:
Is this a BUG REPORT or FEATURE REQUEST?: What happened: I created a job with metadata.generateName twice and waited for completion, but got: panic: interface conversion: runtime.Object is unstructured.UnstructuredList, not unstructured.Unstructured What you expected to happen: kubectl to wait for the last job to complete. How to reproduce it (as minimally and precisely as possible): kubectl create -f kubectl create -f kubectl wait --for=condition=complete -f (shortened): apiVersion: batch/v1 kind: Job metadata: generateName: my-job- Anything else we need to know?: Environment: Kubernetes version (use ): 1.11.3 Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
I have to choose a sig, but I am not sure which one is right...
Reiterating the mentions to trigger a notification: <detailsIn response to : I have to choose a sig, but I am not sure which one is right... 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 cli /sig apps
/assign
kubectl get -f also doesn't work as expected.
/remove-sig apps

Discussion:
func IsDeleted(info *resource.Info, o *WaitOptions) (runtime.Object, bool, error) { endTime := time.Now().Add(o.Timeout) for { <ins> if len(info.Name) == 0 { return info.Object, false, fmt.Errorf("resource name must be provided") } </ins> gottenObj, err := o.DynamicClient.Resource(info.Mapping.Resource).Namespace(info.Namespace).Get(info.Name, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return info.Object, true, nil

func (w ConditionalWait) IsConditionMet(info *resource.Info, o *WaitOptions) (runtime.Object, bool, error) { endTime := time.Now().Add(o.Timeout) for { <ins> if len(info.Name) == 0 { return info.Object, false, fmt.Errorf("resource name must be provided") } </ins> resourceVersion := "" gottenObj, err := o.DynamicClient.Resource(info.Mapping.Resource).Namespace(info.Namespace).Get(info.Name, metav1.GetOptions{}) switch {

}, }, { <ins> name: "handles empty object name", infos: []*resource.Info{ { Mapping: &meta.RESTMapping{ Resource: schema.GroupVersionResource{Group: "group", Version: "version", Resource: "theresource"}, }, Namespace: "ns-foo", }, }, fakeClient: func() *dynamicfakeclient.FakeDynamicClient { return dynamicfakeclient.NewSimpleDynamicClient(scheme) }, timeout:     10 * time.Second, expectedErr: "resource name must be provided", validateActions: func(t *testing.T, actions []clienttesting.Action) { if len(actions) != 0 { t.Fatal(spew.Sdump(actions)) } }, }, { </ins> name: "times out", infos: []*resource.Info{ {
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: What happened: dns test failure when using kube-dns with dnsmasq 2.79 dnsmasq 2.79 introduced a change to respond to all norecurse queries with ServFail. This is to prevent cache snooping where an adversary can figure out if a particular hostname has been looked up or not. We need to change the test to drop that flag, likely the intention was to not send the query upstream(outside of kubedns), but the flag will restrict the query to just dnsmasq. One instance of the test failure: https://k8s- What you expected to happen: The test should be fixed to drop the no recursion flag. How to reproduce it (as minimally and precisely as possible): Run kube-dns with dnsmasq 2.79. dig +norecurse <any hostnameAnything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/sig networking
/sig network
/sig network

Discussion:
"strings" "time" <ins> "k8s.io/api/core/v1" </ins> metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" <del> "k8s.io/api/core/v1" </del> "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/intstr"

// createTargetedProbeCommand returns a command line that performs a DNS lookup for a specific record type func createTargetedProbeCommand(nameToResolve string, lookup string, fileNamePrefix string) (string, string) { fileName := fmt.Sprintf("%s_udp@%s", fileNamePrefix, nameToResolve) <del> probeCmd := fmt.Sprintf("dig +short +tries=12 +norecurse %s %s > /results/%s", nameToResolve, lookup, fileName) </del> <ins> probeCmd := fmt.Sprintf("dig +short +tries=12 %s %s > /results/%s", nameToResolve, lookup, fileName) </ins> return probeCmd, fileName }
Change:
It's useful to have a helm chart that expose a value like . However, the annotation simply ignores , as seen in It's just checking that the value is not empty, so even if it's false - it'll try to create internal LB.
Reiterating the mentions to trigger a notification: <detailsIn response to : 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
/assign
GitHub didn't allow me to assign the following users: mcrute. Note that only and repo collaborators can be assigned. 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

Discussion:
// Determine if this is tagged as an Internal ELB internalELB := false internalAnnotation := apiService.Annotations[ServiceAnnotationLoadBalancerInternal] <del> if internalAnnotation != "" { </del> <ins> if internalAnnotation == "false" { internalELB = false } else if internalAnnotation != "" { </ins> internalELB = true }
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug /sig node What happened: following is kubelet logs It's confusing that why kubelet still try to free bytes when usage(85%) equals to high threshold(85%) With the code, I understood that kubelet tried to keep freeing down to the LowThresholdPercen(80%) not the HighThresholdPercent What you expected to happen: How to reproduce it (as minimally and precisely as possible): Reduce the imagefs capacity to trigger image gc Environment: latest Kubernetes
/assign

Discussion:
usagePercent := 100 - int(available*100/capacity) if usagePercent >= im.policy.HighThresholdPercent { amountToFree := capacity*int64(100-im.policy.LowThresholdPercent)/100 - available <del> glog.Infof("[imageGCManager]: Disk usage on image filesystem is at %d%% which is over the high threshold (%d%%). Trying to free %d bytes", usagePercent, im.policy.HighThresholdPercent, amountToFree) </del> <ins> glog.Infof("[imageGCManager]: Disk usage on image filesystem is at %d%% which is over the high threshold (%d%%). Trying to free %d bytes down to the low threshold (%d%%).", usagePercent, im.policy.HighThresholdPercent, amountToFree, im.policy.LowThresholdPercent) </ins> freed, err := im.freeSpace(amountToFree, time.Now()) if err != nil { return err
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: What happened: Tried to create a service using targetPort as a string referencing the name of the pod port. Traffic was not routed to pod. What you expected to happen: Service to route traffic to pod How to reproduce it (as minimally and precisely as possible): See line targetPort Anything else we need to know?: Link that describes how this feature is supposed to work Environment: Kubernetes version (use ): Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-04-27T09:22:21Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"} Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.0", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-09-27T16:55:41Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"} Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): WindowsBuildLabEx : .1000.amd64fre.rs_prerelease.-1413 Kernel (e.g. ): Install tools: Others:
/sig windows
/assign

Discussion:
stickyMaxAgeSeconds = int(*service.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds) } info := &serviceInfo{ <del> clusterIP:  net.ParseIP(service.Spec.ClusterIP), port:       int(port.Port), protocol:   port.Protocol, nodePort:   int(port.NodePort), </del> <ins> clusterIP: net.ParseIP(service.Spec.ClusterIP), port:      int(port.Port), protocol:  port.Protocol, nodePort:  int(port.NodePort), // targetPort is zero if it is specified as a name in port.TargetPort. // Its real value would be got later from endpoints. </ins> targetPort: port.TargetPort.IntValue(), // Deep-copy in case the service instance changes loadBalancerStatus:       *service.Status.LoadBalancer.DeepCopy(),

var newHnsEndpoint *hcsshim.HNSEndpoint hnsNetworkName := proxier.network.name var err error <ins> // targetPort is zero if it is specified as a name in port.TargetPort, so the real port should be got from endpoints. // Note that hcsshim.AddLoadBalancer() doesn't support endpoints with different ports, so only port from first endpoint is used. // TODO(feiskyer): add support of different endpoint ports after hcsshim.AddLoadBalancer() add that. if svcInfo.targetPort == 0 { svcInfo.targetPort = int(ep.port) } </ins> if len(ep.hnsID) > 0 { newHnsEndpoint, err = hcsshim.GetHNSEndpointByID(ep.hnsID) }
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: /kind bug /sig testing What happened: The test . This can happen more frequently when it has to pull the necessary image. Additionally, spawning and starting pods takes a bit longer on Windows nodes. â¢ Failure [88.631 seconds] [sig-api-machinery] AdmissionWebhook Should be able to deny attaching pod [It] Oct 8 16:36:05.987: unexpected 'kubectl attach' error message. expected to contain "attaching to pod 'to-be-attached-pod' is not allowed", got "error running &amp;{/usr/local/bin/kubectl [kubectl --server=https://k8s-cbelu- --kubeconfig=/home/ubuntu/kube/config6 attach --namespace=e2e-tests-webhook-d8clc to-be-attached-pod -i -c=container1] [] &lt;nilIf you don't see a command prompt, try pressing enter.nerror: unable to upgrade connection: container container1 not found in pod to-be-attached-pode2e-tests-webhook-d8clcn [] &lt;nil0xc0018941b0 exit status 1 &lt;nil&lt;niltrue [0xc0002d1808 0xc0002d1838 0xc0002d1860] [0xc0002d1808 0xc0002d1838 0xc0002d1860] [0xc0002d1820 0xc0002d1850] [0x92bfb0 0x92bfb0] 0xc00074dd40 &lt;nil}:nCommand stdout:nnstderr:nIf you don't see a command prompt, try pressing enter.nerror: unable to upgrade connection: container container1 not found in pod to-be-attached-pod_e2e-tests-webhook-d8clcnnerror:nexit status 1n" Additionally, the command could hang (if it actually managed to attach), causing the test to never end. The command should be executed with a timeout. What you expected to happen: The test should wait for the pod to enter a state before trying to attach to it, so it won't randomly fail. The test should have a timeout when trying to attach to the pod. How to reproduce it (as minimally and precisely as possible): Run the test using Windows nodes and / or delete webhook image from the Compute Node's image cache. Anything else we need to know?: Environment: Kubernetes version (use ): v1.12.0-rc.2 Cloud provider or hardware configuration: N/A OS (e.g. from /etc/os-release): Windows Server 1803 compute nodes Kernel (e.g. ): N/A Install tools: N/A Others:

Discussion:
pod := toBeAttachedPod(f) _, err := client.CoreV1().Pods(f.Namespace.Name).Create(pod) Expect(err).To(BeNil()) <ins> err = framework.WaitForPodNameRunningInNamespace(client, pod.Name, f.Namespace.Name) Expect(err).NotTo(HaveOccurred()) </ins> By("'kubectl attach' the pod, should be denied by the webhook") <del> _, err = framework.NewKubectlCommand("attach", fmt.Sprintf("--namespace=%v", f.Namespace.Name), pod.Name, "-i", "-c=container1").Exec() </del> <ins> timer := time.NewTimer(30 * time.Second) defer timer.Stop() _, err = framework.NewKubectlCommand("attach", fmt.Sprintf("--namespace=%v", f.Namespace.Name), pod.Name, "-i", "-c=container1").WithTimeout(timer.C).Exec() </ins> Expect(err).NotTo(BeNil()) if e, a := "attaching to pod 'to-be-attached-pod' is not allowed", err.Error(); !strings.Contains(a, e) { framework.Failf("unexpected 'kubectl attach' error message. expected to contain %q, got %q", e, a)
Change:
From AWS: TestParseInstance should be renamed to TestmapToAWSInstanceIDs to better represent what is being tested /kind cleanup /sig cloud-provider /cc

Discussion:
"time" ) <del> func TestParseInstance(t *testing.T) { </del> <ins> func TestMapToAWSInstanceIDs(t *testing.T) { </ins> tests := []struct { Kubernetes  kubernetesInstanceID Aws         awsInstanceID
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: From /kind cleanup What happened: What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others:
/sig cloud-provider /assign

Discussion:
// need hardcoded defaults. const DefaultVolumeType = "gp2" <del> // Used to call RecognizeWellKnownRegions just once </del> <ins> // Used to call recognizeWellKnownRegions just once </ins> var once sync.Once // AWS implements PVLabeler.

// Trust that if we get a region from configuration or AWS metadata that it is valid, // and register ECR providers <del> RecognizeRegion(regionName) </del> <ins> recognizeRegion(regionName) </ins> if !cfg.Global.DisableStrictZoneCheck { valid := isRegionValid(regionName)

// Register regions, in particular for ECR credentials once.Do(func() { <del> RecognizeWellKnownRegions() </del> <ins> recognizeWellKnownRegions() </ins> }) return awsCloud, nil

"sync" ) <del> // WellKnownRegions is the complete list of regions known to the AWS cloudprovider </del> <ins> // wellKnownRegions is the complete list of regions known to the AWS cloudprovider </ins> // and credentialprovider. <del> var WellKnownRegions = [...]string{ </del> <ins> var wellKnownRegions = [...]string{ </ins> // from `aws ec2 describe-regions --region us-east-1 --query Regions[].RegionName | sort` "ap-northeast-1", "ap-northeast-2",

// awsRegions is a set of recognized regions var awsRegions sets.String <del> // RecognizeRegion is called for each AWS region we know about. </del> <ins> // recognizeRegion is called for each AWS region we know about. </ins> // It currently registers a credential provider for that region. // There are two paths to discovering a region: //  * we hard-code some well-known regions //  * if a region is discovered from instance metadata, we add that <del> func RecognizeRegion(region string) { </del> <ins> func recognizeRegion(region string) { </ins> awsRegionsMutex.Lock() defer awsRegionsMutex.Unlock()

awsRegions.Insert(region) } <del> // RecognizeWellKnownRegions calls RecognizeRegion on each WellKnownRegion func RecognizeWellKnownRegions() { for _, region := range WellKnownRegions { RecognizeRegion(region) </del> <ins> // recognizeWellKnownRegions calls RecognizeRegion on each WellKnownRegion func recognizeWellKnownRegions() { for _, region := range wellKnownRegions { recognizeRegion(region) </ins> } }

// TestRegions does basic checking of region verification / addition func TestRegions(t *testing.T) { <del> RecognizeWellKnownRegions() </del> <ins> recognizeWellKnownRegions() </ins> tests := []struct { Add            string

for _, test := range tests { if test.Add != "" { <del> RecognizeRegion(test.Add) </del> <ins> recognizeRegion(test.Add) </ins> } if test.Lookup != "" {
Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: What happened: when i run hollow-node deploymenthollow-proxy will cause panic. hollow-node deployment is as follows: hollow-proxy container logs: I1012 12:37:13. 7 ] syncProxyRules took 622.278µs I1012 12:37:13. 7 asmamd64.s:573] Shutting down service config controller E1012 12:37:13. 7 ] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference) /usr/local/go/src/runtime/asmamd64.s:573 /usr/local/go/src/runtime/asmamd64.s:2361 panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2c68ad9] goroutine 74 [running]: (0x0, 0x0, 0x0) +0x107 panic(0x32dc9e0, 0x5c20d20) +0x229 (FakeExec).LookPath(0xc420ad4450, 0x3ac6dba, 0x9, 0xc4208c51d0, 0x0, 0xc4200a4800, 0x4e7e83) +0x39 (0x3e3c000, 0xc420ad4450, 0xc4208c51d0, 0x5, 0x5, 0x5, 0x5) +0x5e (0x3e3c000, 0xc420ad4450, 0xc420768c70, 0xc, 0x3abdd6d, 0x3, 0x0, 0x0) +0x17d (Proxier).syncProxyRules(0xc420d8fe40) +0xb643 (Proxier).OnServiceSynced(0xc420d8fe40) +0x62 (ServiceConfig).Run(0xc420ad5080, 0xc4200b62a0) +0x183 created by (*ProxyServer).Run +0x283 What you expected to happen: How to reproduce it (as minimally and precisely as possible): boot up hollow-proxy container with "--use-real-proxier=true" Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: I found that in "kubemark/hollow-" we init a 'FakeExec' struct, but we don't init LookPathFunc in 'FakeExec' struct. So, execer.LookPathFunc is a vild pointer, so it cause panic.
/sig Testing
maybe we need init:
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
/remove-lifecycle stale
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
/remove-lifecycle stale I met this issue as well.
/sig scalability

Discussion:
package main import ( <ins> "errors" </ins> goflag "flag" "fmt" "math/rand"

} iptInterface := fakeiptables.NewFake() sysctl := fakesysctl.NewFake() <del> execer := &fakeexec.FakeExec{} </del> <ins> execer := &fakeexec.FakeExec{ LookPathFunc: func(_ string) (string, error) { return "", errors.New("fake execer") }, } </ins> eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: "kube-proxy", Host: config.NodeName})
Change:
I believe this owners file should not inherit permissions from parent OWNERS files; only api approvers should be able to approve api changes.
/kind feature /sig architecture
opened to do this

Discussion:
<ins> # Disable inheritance as this is an api owners file options: no_parent_owners: true </ins> approvers: - api-approvers reviewers:

# See the OWNERS docs at https://go.k8s.io/owners <ins> # Disable inheritance as this is an api owners file options: no_parent_owners: true </ins> filters: ".*": approvers:

<ins> # Disable inheritance as this is an api owners file options: no_parent_owners: true </ins> approvers: - erictune - lavalamp
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: In a windows cluster, containers can get scheduled on Windows nodes where they will never work. Warning Failed 54m (x3 over 54m) kubelet, 35934k8s9000 Failed to pull image "coredns/coredns:1.2.2": rpc error: code = Unknown desc = no matching manifest for windows/amd64 in the manifest list entries What you expected to happen: CoreDNS starts and runs on Linux master nodes. How to reproduce it (as minimally and precisely as possible): Build a Windows Cluster. Note: I first encountered this issue when deploying with ACS-Engine: but it occurs to me that it should be mirrored here, so that the relevant node selectors can be included in the canonical add-on directory. /sig Windows
I suppose this is fine if there are always linux nodes in the cluster. I don't know how Kubernetes or docker manifests work for windows, but CoreDNS does build and run on windows: That is not included in the manifest, is it possible to get that working? I guess you would probably also have to change the way the mounted config file is referred to in windows? Or is it this change good enough?
For now, IMO yes. what do you think? I'm assuming, perhaps incorrectly, that not all core k8s components support windows yet. do you know the current state of Windows support for core k8s components? Is CoreDNS the only core component whose image doesnt support windows?
Have not looked into it in detail yet, but one complication would be configuration. AFAIK Windows systems don't have an ... and the default CoreDNS configuration makes specific reference to the file (to get upstream servers).
Yeah, good point. I was thinking about the -conf /etc/coredns/Corefile which I think we pass to coredns IIRC. But is a bigger issue.
While it is possible to run Windows coreDNS pods, this is still undocumented and not officially supported yet. Officially, only kubelet & kube-proxy are in beta on Windows and scheduled to GA with 1.13 (assuming it meets the criteria and community votes of course). I think for the time being it should be fine to limit scheduling to Linux only to avoid pods being stuck but we should design in a way to keep the option open of undoing this in the future. what do you think?

Discussion:
effect: NoSchedule - key: "CriticalAddonsOnly" operator: "Exists" <ins> nodeSelector: beta.kubernetes.io/os: linux </ins> containers: - name: coredns image: k8s.gcr.io/coredns:1.2.4

operator: Exists - key: {{ .MasterTaintKey }} effect: NoSchedule <ins> nodeSelector: beta.kubernetes.io/os: linux </ins> containers: - name: coredns image: {{ .ImageRepository }}/coredns:{{ .Version }}
Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: I asked kubectl to extract all the files in a container. Only the names of the top level entries are concerned. How to reproduce it (as minimally and precisely as possible): Just cp the root folder somewhere. Environment: Kubernetes version (use ): Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.0", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-09-27T17:05:32Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"", GitTreeState:"clean", BuildDate:"2018-09-09T17:53:03Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"} Cloud provider or hardware configuration: MaaS + juju OS (e.g. from /etc/os-release): Ubuntu 16.04.5 Kernel (e.g. ): 4.4.0-137-generic -Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x8664 x8664 x86_64 GNU/Linux Install tools: juju bundle from canonical
/assign
Hi, - sorry, I didn't notice that this was assigned to you. Would you like me to close my PR?
/sig cli
never mind

Discussion:
trimmed = strings.TrimPrefix(newPath, "../") } <del> // trim leftover ".." if newPath == ".." { </del> <ins> // trim leftover {".", ".."} if newPath == "." || newPath == ".." { </ins> newPath = "" }

input:    "...foo", expected: "...foo", }, <ins> { name:     "test root directory", input:    "/", expected: "", }, </ins> } for _, test := range tests {