jiebi/CodeConvo huggingface dataset:
Change:
t.Fatalf("TestCase[%d] meets unexpected error: %v", i, err) } } <del> pip, err := az.ensurePublicIPExists(&service, "pip1", test.expectedDNS, "", false) </del> <ins> pip, err := az.ensurePublicIPExists(&service, "pip1", test.inputDNSLabel, "", false, test.foundDNSLabelAnnotation) </ins> if test.expectedID != "" { assert.Equal(t, test.expectedID, to.String(pip.ID), "TestCase[%d]: %s", i, test.desc) } else {

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: After issue is fixed. Cloud provider will automatically reconcile the Azure Public Ip DNS record same as the service annotation. As a result, user finds their DNS record will be deleted if the annotation is not set. Such a change is a block to users who have set the DNS record on their public IP without using this annotation when they upgrade the cluster. Besides, if the public ip is a user's own public ip, it is also not reasonable to delete the DNS record. What you expected to happen: We may need to change the reconcile logic. Maybe only delete the DNS record, when the annotation exists but empty value How to reproduce it (as minimally and precisely as possible): Manually add the DNS label to Azure Public IP resource via Portal Environment: Kubernetes version (use ): 1.15.7 Cloud provider or hardware configuration: Azure
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig Azure Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig cloud-provider
/area provider/azure
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /sig Azure Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/assign
The fix helm install helm-nginx-ingress stable/nginx-ingress  --namespace ingress-nginx-ns  --set controller.replicaCount=2  --set controller.nodeSelector."beta.kubernetes.io/os"=linux  --set controller.service.annotations."service.beta.kubernetes.io/azure-dns-label-name"=MY-AZURE-DNS  --set defaultBackend.nodeSelector."beta.kubernetes.io/os"=linux
Change:
assert.Equal(t, test.err, err != nil) } } <ins> func TestMakePortsAndBindings(t *testing.T) { for desc, test := range map[string]struct { pm           []*runtimeapi.PortMapping exposedPorts map[dockernat.Port]struct{} portmappings map[dockernat.Port][]dockernat.PortBinding }{ "no port mapping": { pm:           nil, exposedPorts: map[dockernat.Port]struct{}{}, portmappings: map[dockernat.Port][]dockernat.PortBinding{}, }, "tcp port mapping": { pm: []*runtimeapi.PortMapping{ { Protocol:      runtimeapi.Protocol_TCP, ContainerPort: 80, HostPort:      80, }, }, exposedPorts: map[dockernat.Port]struct{}{ "80/tcp": {}, }, portmappings: map[dockernat.Port][]dockernat.PortBinding{ "80/tcp": { { HostPort: "80", }, }, }, }, "udp port mapping": { pm: []*runtimeapi.PortMapping{ { Protocol:      runtimeapi.Protocol_UDP, ContainerPort: 80, HostPort:      80, }, }, exposedPorts: map[dockernat.Port]struct{}{ "80/udp": {}, }, portmappings: map[dockernat.Port][]dockernat.PortBinding{ "80/udp": { { HostPort: "80", }, }, }, }, "multipe port mappings": { pm: []*runtimeapi.PortMapping{ { Protocol:      runtimeapi.Protocol_TCP, ContainerPort: 80, HostPort:      80, }, { Protocol:      runtimeapi.Protocol_TCP, ContainerPort: 80, HostPort:      81, }, }, exposedPorts: map[dockernat.Port]struct{}{ "80/tcp": {}, }, portmappings: map[dockernat.Port][]dockernat.PortBinding{ "80/tcp": { { HostPort: "80", }, { HostPort: "81", }, }, }, }, } { t.Logf("TestCase: %s", desc) actualExposedPorts, actualPortMappings := makePortsAndBindings(test.pm) assert.Equal(t, test.exposedPorts, actualExposedPorts) assert.Equal(t, test.portmappings, actualPortMappings) } } </ins>

Discussion:
This is in 1.6.0-beta.4: Some context: The line number suggests it is here: I think this is because dockershim now uses a protobuf object and Protocol is now an int. And is allowed in go (apparently) - is "A". And the comedic error is because Protocol implements If this is the error, there's something fishy going on because all our UDP tests should fail?
Aha ... I think it is only UDP hostports that would be "broken" by the issue. I wouldn't be surprised if we don't rely on any, and that we might not have any test coverage. I don't think this is a regression - I think this code has been there since the start of dockershim, but maybe CRI is now the default? I don't know how widely UDP hostports are used. Given how close we are to the planned release date, cc and
There is something wrong in dockershim's protocol parsing. Will file an PR to fix this. /assgin
/assign
Opened to fix this.
thanks for filing the issue. Thanks for quickly addressing the bug. We need node e2e tests to capture the kind of regression at the first place.
Change:
} } <ins> func TestDockerKeyringLookupFails(t *testing.T) { fakeKeyring := &credentialprovider.FakeKeyring{} fakeClient := &FakeDockerClient{ Err: fmt.Errorf("test error"), } dp := dockerPuller{ client:  fakeClient, keyring: fakeKeyring, } err := dp.Pull("host/repository/image:version") if err == nil { t.Errorf("unexpected non-error") } msg := "image pull failed for host/repository/image, this may be because there are no credentials on this request.  details: (test error)" if err.Error() != msg { t.Errorf("expected: %s, saw: %s", msg, err.Error()) } } </ins> func TestDockerKeyringLookup(t *testing.T) { empty := docker.AuthConfiguration{}

Discussion:
I launched a pod forgetting that I had not uploaded my into the node's folder. Of course the image pull failed but the error message was not helpful: e.g. It should finish off the message with "because credentials for are not available to Kubernetes. This may be because blah"
Change:
} cmd.Flags().BoolVar(&o.drainer.Force, "force", o.drainer.Force, "Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet.") cmd.Flags().BoolVar(&o.drainer.IgnoreAllDaemonSets, "ignore-daemonsets", o.drainer.IgnoreAllDaemonSets, "Ignore DaemonSet-managed pods.") <ins> cmd.Flags().BoolVar(&o.drainer.IgnoreErrors, "ignore-errors", o.drainer.IgnoreErrors, "Ignore errors occurred between drain nodes in group.") </ins> cmd.Flags().BoolVar(&o.drainer.DeleteEmptyDirData, "delete-local-data", o.drainer.DeleteEmptyDirData, "Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).") cmd.Flags().MarkDeprecated("delete-local-data", "This option is deprecated and will be deleted. Use --delete-emptydir-data.") cmd.Flags().BoolVar(&o.drainer.DeleteEmptyDirData, "delete-emptydir-data", o.drainer.DeleteEmptyDirData, "Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).")

Discussion:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : on multiple nodes, if one node failed, the command aborting. Without special purpose, maybe it's better to continue processing other nodes. Why is this needed: Follow the pattern of other subcommand, such as kubectl delete.
/sig cli
/triage accepted /assign
done /close
Closing this issue. <detailsIn response to : done /close 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 would wait the patch get merged before closing :)
Change:
"time" ) <del> func TestParseInstance(t *testing.T) { </del> <ins> func TestMapToAWSInstanceIDs(t *testing.T) { </ins> tests := []struct { Kubernetes  kubernetesInstanceID Aws         awsInstanceID

Discussion:
From AWS: TestParseInstance should be renamed to TestmapToAWSInstanceIDs to better represent what is being tested /kind cleanup /sig cloud-provider /cc
Change:
func CustomResourceDefinitionToSelectableFields(obj *apiextensions.CustomResourceDefinition) fields.Set { return generic.ObjectMetaFieldsSet(&obj.ObjectMeta, true) } <del> // dropDisabledFields drops disabled fields that are not used if their associated feature gates // are not enabled. func dropDisabledFields(newCRD *apiextensions.CustomResourceDefinition, oldCRD *apiextensions.CustomResourceDefinition) { if !utilfeature.DefaultFeatureGate.Enabled(features.CustomResourceValidationExpressions) && (oldCRD == nil || (oldCRD != nil && !specHasXValidations(&oldCRD.Spec))) { if newCRD.Spec.Validation != nil { dropXValidationsField(newCRD.Spec.Validation.OpenAPIV3Schema) } for _, v := range newCRD.Spec.Versions { if v.Schema != nil { dropXValidationsField(v.Schema.OpenAPIV3Schema) } } } } // dropXValidationsField drops field XValidations from CRD schema func dropXValidationsField(schema *apiextensions.JSONSchemaProps) { if schema == nil { return } schema.XValidations = nil if schema.AdditionalProperties != nil { dropXValidationsField(schema.AdditionalProperties.Schema) } for def, jsonSchema := range schema.Properties { dropXValidationsField(&jsonSchema) schema.Properties[def] = jsonSchema } if schema.Items != nil { dropXValidationsField(schema.Items.Schema) for i, jsonSchema := range schema.Items.JSONSchemas { dropXValidationsField(&jsonSchema) schema.Items.JSONSchemas[i] = jsonSchema } } for def, jsonSchemaPropsOrStringArray := range schema.Dependencies { dropXValidationsField(jsonSchemaPropsOrStringArray.Schema) schema.Dependencies[def] = jsonSchemaPropsOrStringArray } } func specHasXValidations(spec *apiextensions.CustomResourceDefinitionSpec) bool { return validation.HasSchemaWith(spec, schemaHasXValidations) } func schemaHasXValidations(s *apiextensions.JSONSchemaProps) bool { return validation.SchemaHas(s, func(s *apiextensions.JSONSchemaProps) bool { return s.XValidations != nil }) } </del>

Discussion:
This is the tracking issue of promoting CRD validation rules to GA: Listed the blocking issues/features below: [x] [x] [x] [x] Issues be aware of but should not be a GA blocker [ ] [ ] [ ] [ ] [ ] /sig api-machinery /triage accepted
/assign
/cc
Change:
// TestPostBindPlugin tests invocation of postbind plugins. func TestPostBindPlugin(t *testing.T) { <del> // Create a plugin registry for testing. Register a prebind and a postbind plugin. preBindPlugin := &PreBindPlugin{} postBindPlugin := &PostBindPlugin{name: postBindPluginName} registry := frameworkruntime.Registry{ preBindPluginName:  newPlugin(preBindPlugin), postBindPluginName: newPlugin(postBindPlugin), } // Setup initial prebind and postbind plugin for testing. prof := schedulerconfig.KubeSchedulerProfile{ SchedulerName: v1.DefaultSchedulerName, Plugins: &schedulerconfig.Plugins{ PreBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: preBindPluginName, }, }, }, PostBind: &schedulerconfig.PluginSet{ Enabled: []schedulerconfig.Plugin{ { Name: postBindPluginName, }, }, }, }, } // Create the master and the scheduler with the test plugin set. testCtx := initTestSchedulerForFrameworkTest(t, testutils.InitTestMaster(t, "postbind-plugin", nil), 2, scheduler.WithProfiles(prof), scheduler.WithFrameworkOutOfTreeRegistry(registry)) defer testutils.CleanupTest(t, testCtx) </del> tests := []struct { <del> name          string preBindFail   bool preBindReject bool </del> <ins> name        string preBindFail bool </ins> }{ { name:        "plugin preBind fail",

Discussion:
Which jobs are flaking: ci-kubernetes-integration-master pull-kubernetes-integration Which test(s) are flaking: TestPostBindPlugin Testgrid link: Reason for failure: Anything else we need to know: links to appreciated: links to specific failures in spyglass appreciated /sig scheduling
It flaked two times recently:
Change:
for _, filesource := range filesources { data, err := filesource.ReadTestFile(filePath) if err != nil { <del> ginkgo.Fail(fmt.Sprintf("fatal error looking for test file %s: %s", filePath, err), 1) </del> <ins> e2elog.Fail(fmt.Sprintf("fatal error looking for test file %s: %s", filePath, err), 1) </ins> } if data != nil { return true

Discussion:
/help /kind cleanup /area e2e-testing-framework mini guide: make sure you have signed the CNCF clone kubernetes;/kubernetes search for ginkgo.Fail calls under test/e2e/framework e.g. replace them with this that was in this PR: send a PR for kubernetes/kubernetes
/remove-kind feature /area e2e-test-framework
/sig testing
I will take this.
thank you! Please feel free to ping #testing-commons in the Kubernetes slack if you have any questions :smiley: /cc
/remove-help
/assign
Change:
KUBE_HOME="/home/kubernetes" KUBE_BIN="${KUBE_HOME}/bin" <ins> PYTHON="python" log-start 'SetPythonVersion' if [[ "$(python -V 2>&1)" =~ "Python 2" ]]; then # found python2, just use that PYTHON="python" elif [[ -f "/usr/bin/python2.7" ]]; then # System python not defaulted to python 2 but using 2.7 during migration PYTHON="/usr/bin/python2.7" else # No python2 either by default, let's see if we can find python3 PYTHON="python3" if ! command -v ${PYTHON} >/dev/null 2>&1; then echo "ERROR Python not found. Aborting." exit 2 fi fi echo "Version :  $(${PYTHON} -V 2>&1)" log-end 'SetPythonVersion' </ins> # download and source kube-env log-wrap 'DownloadKubeEnv' retry-forever 30 download-kube-env

Discussion:
<!-- Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI --ci-kubernetes-e2e-gce-device-plugin-gpu Cluster up Apr 23 8:30PM PDT Taken from: From a , there are supposed to be three worker/minion nodes set up as well. Started failing after -- so maybe related to ? /cc /sig testing More examples of failing runs: /priority critical-urgent (this is a job on the release/master-blocking board)
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
It uses image gke-1134-gke-rc5-cos-69--138-0-v190320-pre-nvda-gpu as node image kubekins-e2e image is built from Base image is bootstrap image is built from with debian:buster and install python3.
The node image gke-1134-gke-rc5-cos-69--138-0-v190320-pre-nvda-gpu has no python3. We need to upgrade it.
Thanks for catching this and sending revert. Separately, we should definitely upgrade that image, cos-69 is super old and not supported anymore: /cc regarding GPU image
Change:
"failSupplementalGroupOutOfRange": { pod:           failSupplementalGroupPod, psp:           failSupplementalGroupPSP, <del> expectedError: "999 is not an allowed group", </del> <ins> expectedError: "group 999 must be in the ranges: [{1 1}]", </ins> }, "failSupplementalGroupEmpty": { pod:           defaultPod(),

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: This is request for improvements. What happened: When PodSecurityPolicy provider validates or fields of a pod, it shows an error like "999 is not an allowed group" if the group doesn't belong to the range(s). What you expected to happen: It should include to the error message also the allowed values -- the ranges against what we were validating this group. This will simplify user experience and debugging. How to reproduce it (as minimally and precisely as possible): run kubernetes cluster with PSP support create a PSP that allows fsGroup/SupplementalGroups in some ranges grant to a user access to this PSP try to create a pod that has fsGroup/SupplementalGroups outside of the allowed ranges Anything else we need to know?: In order to improve the current behavior, we need to modify function here: Reported-by: /kind help
This looks like a good first issue! My suggestion would be something like . I would also suggest to merge overlaying ranges in the log message, like as , to keep the log as concise as possible. I will look into it.
Maybe something like ? Thank you!
We can use the same approach that strategy uses:
Sure, that is probably the most consistent solution.
/remove-help
Change:
nodeLabels = make(map[string]string) nodeLabels["kubelet_cleanup"] = "true" nodes, err := e2enode.GetBoundedReadySchedulableNodes(c, maxNodesToCheck) <ins> numNodes = len(nodes.Items) </ins> framework.ExpectNoError(err) nodeNames = sets.NewString() for i := 0; i < len(nodes.Items); i++ {

Discussion:
<!-- Please only use this template for submitting reports about failing tests in Kubernetes CI jobs --Which jobs are failing: https://k8s- Which test(s) are failing: [] [sig-node] kubelet [] [sig-node] Clean up pods on node kubelet should be able to delete 10 pods per node in 1m0s. Since when has it been failing: 2019-09-26 Testgrid link: Reason for failure: Anything else we need to know: /cc
is there someone who can pick this up since it's constantly failing in the master-informing? Thanks :)
Could you help us here?
Looked into the test logs, and it seems like the in was accidentally removed in , which caused its value to be 0. As the current log is showing: And last succeeded test log is: I'll send a PR to fix this. /cc
It seems that this PR didn't help. This run already contains this PR and it failed:
/milestone v1.17 /priority critical-urgent
I0926 12:39:42.660] I0926 12:35:26. ] Trace[]: "Reflector ListAndWatch" (started: 2019-09-26 12:33:26. +0000 UTC m=+1132.) (total time: 2m0.000301191s):
Seems like the test is timing out creating the pods and reflector to watch those pods.
Looks like the section of code taking a long time is
Checked KAS log and seeing about 7000 requests of the form I1010 12:26:59. 1 ] GET /api/v1/nodes/gce-scale-cluster-minion-group-1-4p2m:/proxy/stats/summary: (9.753712ms) 200 [ (linux/amd64) kubernetes/ -- [] [sig-node] kubelet [] [sig-node] Clean up pods on node kubelet should be able to delete 10 pods per node in 1m0s. 146.148.73.158:] between replicationcontroller being created and the pod list/watch request.
The is only supposed to run if there are less than 10 nodes in the cluster. However, the situation doesn't hold with this change: (or ) was changed to .

While the e2e test only uses 10 () nodes from the cluster, the resource monitor is querying all the nodes in the cluster. Thus the client qps limit was exceeded and caused the reflector to be throttled. I'll send a fix
/assign
Change:
if [[ "${KUBERNETES_MASTER:-}" == "true" ]]; then compute-master-manifest-variables start-etcd-servers <ins> start-etcd-empty-dir-cleanup-pod </ins> start-kube-apiserver start-kube-controller-manager start-kube-scheduler

Discussion:
I came upon a cluster that had had the namespace code thoroughly exercised. No namespaces currently existed, but many had been created and deleted in the past. Its etcd had lots of empty directories under each resource that had held items when those namespaces were alive (secrets, serviceaccounts, pods...). Do we need to be doing something to clean these empty directories up? It seems like this etcd was consuming a lot of memory.
or might know the answer to this question.
Right. We should delete them. It might get tricky for concurrent cases like A checks if dir is empty, B creates, then A deletes it. What does it look like currently in creating and deleting namespace?
How much memory does a directory entry take? Does it really sound possible to run out of memory while snapshotting on account of too many empty directories?
-- have you guys encountered this? I think you run with more namespaces than we do. But maybe yours are mostly populated?
Yes, we've seen it. c.f.
Approximate memory use we saw from empty dirs:
cc
The patch we debated carrying is here: Our hope was to just wait to etcd v3 where this would not be a problem.
can you link to your clean-up script here?
I needed another PR to run the pod automatically on master.
Change:
) // NewSourceApiserver creates a config source that watches and pulls from the apiserver. <del> func NewSourceApiserver(client *client.Client, hostname string, updates chan<- interface{}) { lw := cache.NewListWatchFromClient(client, "pods", api.NamespaceAll, fields.OneTermEqualSelector(getHostFieldLabel(client.APIVersion()), hostname)) </del> <ins> func NewSourceApiserver(c *client.Client, hostname string, updates chan<- interface{}) { lw := cache.NewListWatchFromClient(c, "pods", api.NamespaceAll, fields.OneTermEqualSelector(client.PodHost, hostname)) </ins> newSourceApiserverFromLW(lw, updates) }

Discussion:
My broke it for v1beta3, then fixed it for v1beta3 and broke it for v1beta1. I'm working on a fix.
Honestly I'm very surprised that more people aren't complaining-- integration test logs are full of noise because of this.
Exact text of error log is "Failed to watch *api.Node: field label not supported: "
cc
Change:
[]api.Port{}, }, } <del> for _, tt := range testCases { ports := portsFromString(tt.spec) </del> <ins> for _, tt := range successTestCases { ports, err := portsFromString(tt.spec) </ins> if !reflect.DeepEqual(ports, tt.ports) { t.Errorf("Expected %#v, got %#v", tt.ports, ports) } <ins> if err != nil { t.Errorf("Unexpected error: %v", err) } } var failTestCases = []struct { spec string }{ {"8080:"}, {":80"}, {":"}, } for _, tt := range failTestCases { _, err := portsFromString(tt.spec) if err == nil { t.Errorf("Unexpected non-error") } </ins> } }

Discussion:
Kubernetes will create replication controller and pods in case of port spec error, e.g. will create 'myNginx'. A following correct spec will fail:
/cc
Change:
framework.Failf("cannot create crd %s", err) } <ins> defer func() { err = fixtures.DeleteV1CustomResourceDefinition(noxuDefinition, apiExtensionClient) framework.ExpectNoError(err, "deleting CustomResourceDefinition") }() </ins> kind := noxuDefinition.Spec.Names.Kind apiVersion := noxuDefinition.Spec.Group + "/" + noxuDefinition.Spec.Versions[0].Name name := "mytest"

Discussion:
After running k8s conformance testing on kubernetes v1.27, we have leftover custom resources of the format that should not exist. For example) Basic test instructions: We use the latest official kubernetes kubekins image: We extract kubetest binary from kubekins latest-master docker image. We run serial conformance tests as follows. We also run parallel conformance tests as follows.
/sig api-machinery
The following script is used to cleanup the leftover CRDs:
/triage accepted /assign /cc
/area conformance
/sig architecture