jiebi/CodeConvo huggingface dataset:
Change:
Part of See example /sig scheduling /kind cleanup /help /priority important-soon
/assign /remove-help

Discussion:
import ( "fmt" <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> ) var (

ErrPodNotMatchHostName = NewPredicateFailureError("HostName", "node(s) didn't match the requested hostname") // ErrPodNotFitsHostPorts is used for PodFitsHostPorts predicate error. ErrPodNotFitsHostPorts = NewPredicateFailureError("PodFitsHostPorts", "node(s) didn't have free ports for the requested pod ports") <del> // ErrServiceAffinityViolated is used for CheckServiceAffinity predicate error. ErrServiceAffinityViolated = NewPredicateFailureError("CheckServiceAffinity", "node(s) didn't match service affinity") </del> // ErrNodeUnderMemoryPressure is used for NodeUnderMemoryPressure predicate error. ErrNodeUnderMemoryPressure = NewPredicateFailureError("NodeUnderMemoryPressure", "node(s) had memory pressure") // ErrNodeUnderDiskPressure is used for NodeUnderDiskPressure predicate error.

importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity", visibility = ["//visibility:public"], deps = [ <del> "//pkg/scheduler/algorithm/predicates:go_default_library", "//pkg/scheduler/framework/plugins/migration:go_default_library", </del> "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/listers:go_default_library", "//pkg/scheduler/nodeinfo:go_default_library",

"context" "fmt" <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/klog" <del> "k8s.io/kubernetes/pkg/scheduler/algorithm/predicates" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/migration" </del> framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" "k8s.io/kubernetes/pkg/scheduler/nodeinfo"

// preFilterStateKey is the key in CycleState to InterPodAffinity pre-computed data. // Using the name of the plugin will likely help us avoid collisions with other plugins. preFilterStateKey = "PreFilter" + Name <ins> // ErrServiceAffinityViolated is used for CheckServiceAffinity predicate error. ErrServiceAffinityViolated = "node(s) didn't match service affinity" </ins> ) // Args holds the args that are used to configure the plugin.

return nil } <del> return migration.PredicateResultToFrameworkStatus([]predicates.PredicateFailureReason{predicates.ErrServiceAffinityViolated}, nil) </del> <ins> return framework.NewStatus(framework.Unschedulable, ErrServiceAffinityViolated) </ins> } // Score invoked at the Score extension point.
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Currently, the field on must be explicitly set to their zero-values due to the fact that they are not tagged . Ref: Why is this needed: If using a system that automatically compares the provided configuration to the current, it will produce a diff on the updated status after creation. In addition, making sure to explicitly set to zero-values is not the best user experience. I am happy to provide the fix if this change is approved! /cc /sig api-machinery /area custom-resources
marking them as seems ok, so that client-side validation doesn't complain if they are absent when submitting manifests, but they shouldn't need to be set to omitempty (and at this point, we likely wouldn't change the serialization) Those fields are changed by controllers after creation, so expecting the live API object to exactly match the status is not going to go well anyway.
Good point! I’ll open a fix for this. Yep! The specific system in question ignores fields that are not set at creation time by default when doing comparison, so if status fields are not included then it will not report a diff.
/assign
I opened a fix for this but CC'ed both you and Let me know if any additional effort is required. Thanks!

Discussion:
"type": "array" } }, <del> "required": [ "acceptedNames", "storedVersions" ], </del> "type": "object" }, "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion": {

"type": "array" } }, <del> "required": [ "acceptedNames", "storedVersions" ], </del> "type": "object" }, "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion": {

// acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. <ins> // +optional </ins> optional CustomResourceDefinitionNames acceptedNames = 2; // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these

// no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. <ins> // +optional </ins> repeated string storedVersions = 3; }

// acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. <ins> // +optional </ins> AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these

// no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. <ins> // +optional </ins> StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` }
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: What you expected to happen: unit tests with coverage succeed 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:
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
Looking at : It is expecting group version string.
fixed in , clean up from

Discussion:
KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}" export KUBE_PANIC_WATCH_DECODE_ERROR <del> # Handle case where OS has sha#sum commands, instead of shasum. if which shasum >/dev/null 2>&1; then SHA1SUM="shasum -a1" elif which sha1sum >/dev/null 2>&1; then SHA1SUM="sha1sum" else echo "Failed to find shasum or sha1sum utility." >&2 exit 1 fi </del> kube::test::find_dirs() { ( cd "${KUBE_ROOT}"

return fi mkdir -p "${KUBE_JUNIT_REPORT_DIR}" <del> # This filename isn't parsed by anything, and we must avoid # exceeding 255 character filename limit. KUBE_TEST_API # barely fits there and in coverage mode test names are # appended to generated file names, easily exceeding # 255 chars in length. So let's just use a sha1 hash of it. local KUBE_TEST_API_HASH KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API////-}"| ${SHA1SUM} |awk '{print $1}')" echo "${KUBE_JUNIT_REPORT_DIR}/junit_${KUBE_TEST_API_HASH}_$(kube::util::sortable_date)" </del> <ins> echo "${KUBE_JUNIT_REPORT_DIR}/junit_$(kube::util::sortable_date)" </ins> } verifyAndSuggestPackagePath() {

fi # Create coverage report directories. <del> KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API////-}"| ${SHA1SUM} |awk '{print $1}')" </del> if [[ -z "${KUBE_COVER_REPORT_DIR}" ]]; then <del> cover_report_dir="/tmp/k8s_coverage/${KUBE_TEST_API_HASH}/$(kube::util::sortable_date)" </del> <ins> cover_report_dir="/tmp/k8s_coverage/$(kube::util::sortable_date)" </ins> else cover_report_dir="${KUBE_COVER_REPORT_DIR}" fi
Change:
<!-- Please only use this template for submitting reports about flaky tests or jobs (pass or fail with no underlying change in code) in Kubernetes CI --Which jobs are flaking: Which test(s) are flaking: Testgrid link: Reason for failure: Anything else we need to know: /cc /sig api-machinery /priority critical-urgent
This flake started to appear after Is this related?
According to this seems to start since 01/11/2020 /cc
this job become failing today /remove-kind flake /kind failing-test fyi any idea about this?
yes, being fixed in can we rollback the enablement of managed field persistence until this is resolved?
/assign
opened revert in to clean up CI signal (current pass rate is ~30%). Can reintroduce once the serialization issue is resolved

Discussion:
// DefaultTrackOnCreateProbability defines the default probability that the field management of an object // starts being tracked from the object's creation, instead of from the first time the object is applied to. <del> const DefaultTrackOnCreateProbability float32 = 0.5 </del> <ins> const DefaultTrackOnCreateProbability float32 = 0.0 </ins> // Managed groups a fieldpath.ManagedFields together with the timestamps associated with each operation. type Managed interface {
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: says: That doesn't work: It doesn't matter whether there is a node "foo" or not. It doesn't seem to contact the API at all. What you expected to happen: Examples form the help texts should work. Anything else we need to know?: Looking at , it seems to want either a or in the argument. Indeed, does work and does the right thing, i.e. set a taint with key and no value. Environment:
i believe there were updates about this at some point. a PR is welcome /remove-kind bug /kind documentation /sig cli side note: Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.7", GitCommit:"", GitTreeState:"clean", BuildDate:"2019-12-11T12:34:17Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} always make sure the client MINOR version is equal or +1, or -1 of the server MINOR version. in this case it's +2, which is unsupported.
/assign bharaththiruveedula
Do you mind if I submmit a PR on this because I met this issue before?
I assigned the issue today itself and already started working on it. I will send the PR by end of today. But thanks for showing the interest.
Are we updating the documentation or the code now? Right now fails but works (because of the "-"), which isn't very consistent at all, so I'd suggest we actually fix kubectl itself to do what the help page says.

Discussion:
taintArgs := []string{} metTaintArg := false for _, s := range args { <del> isTaint := strings.Contains(s, "=") || strings.HasSuffix(s, "-") </del> <ins> isTaint := strings.Contains(s, "=") || strings.Contains(s, ":") || strings.HasSuffix(s, "-") </ins> switch { case !metTaintArg && isTaint: metTaintArg = true

# taint/untaint # Pre-condition: node doesn't have dedicated=foo:PreferNoSchedule taint kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{if eq .key "dedicated"}}{{.key}}={{.value}}:{{.effect}}{{end}}{{end}}' "" # expect no output <del> # taint can add a taint </del> <ins> # taint can add a taint (<key>=<value>:<effect>) </ins> kubectl taint node 127.0.0.1 dedicated=foo:PreferNoSchedule kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{if eq .key "dedicated"}}{{.key}}={{.value}}:{{.effect}}{{end}}{{end}}' "dedicated=foo:PreferNoSchedule" # taint can remove a taint kubectl taint node 127.0.0.1 dedicated- <ins> # taint can add a taint (<key>:<effect>) kubectl taint node 127.0.0.1 dedicated:PreferNoSchedule kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{if eq .key "dedicated"}}{{.key}}={{.value}}:{{.effect}}{{end}}{{end}}' "dedicated=<no value>:PreferNoSchedule" # taint can remove a taint kubectl taint node 127.0.0.1 dedicated- </ins> # Post-condition: node doesn't have dedicated=foo:PreferNoSchedule taint kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{if eq .key "dedicated"}}{{.key}}={{.value}}:{{.effect}}{{end}}{{end}}' "" # expect no output
Change:
As part of promoting TaintBasedEvictions to GA (), the docs around it will need to be updated to reflect the new status. /kind cleanup /sig scheduling
/assign
are you still planning to work on updating these docs?
sry, . assign by mistake. let me unassign.
What's the ETA? Till Friday? /assign
Hi Team - Seth on the 1.18 Docs team here, we have until 2/28 to get placeholder PRs in for docs for this release, please let me know if I can help!
Hi Jan just opened a PR here to reflect this change in the docs: could you please provide review to make sure we've properly listed this as GA?

Discussion:
var apiPodStatus api.PodStatus var podStatus *kubecontainer.PodStatus <ins> // Always generate the kubecontainer.PodStatus to know whether there are // running containers associated with the pod. podStatusPtr, apiPodStatusPtr, err := kl.containerRuntime.GetPodStatusAndAPIPodStatus(pod) if err != nil { glog.Errorf("Unable to get status for pod %q: %v", format.Pod(pod), err) return err } apiPodStatus = *apiPodStatusPtr podStatus = podStatusPtr </ins> if updateType == kubetypes.SyncPodCreate { // This is the first time we are syncing the pod. Record the latency // since kubelet first saw the pod if firstSeenTime is set. if !firstSeenTime.IsZero() { metrics.PodWorkerStartLatency.Observe(metrics.SinceInMicroseconds(firstSeenTime)) } <ins> // kubelet may have just been restarted. Re-use the last known // apiPodStatus. </ins> apiPodStatus = pod.Status apiPodStatus.StartTime = &unversioned.Time{Time: start} kl.statusManager.SetPodStatus(pod, apiPodStatus) <del> podStatus = &kubecontainer.PodStatus{ ID:        pod.UID, Name:      pod.Name, Namespace: pod.Namespace, } glog.V(3).Infof("Not generating pod status for new pod %q", format.Pod(pod)) } else { podStatusPtr, apiPodStatusPtr, err := kl.containerRuntime.GetPodStatusAndAPIPodStatus(pod) if err != nil { glog.Errorf("Unable to get status for pod %q: %v", format.Pod(pod), err) return err } apiPodStatus = *apiPodStatusPtr podStatus = podStatusPtr </del> <ins> glog.V(3).Infof("Reusing api pod status for new pod %q", format.Pod(pod)) </ins> } pullSecrets, err := kl.getPullSecretsForPod(pod)
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: I'm attempting to use an watcher to better re-act to cluster modifications. I've received the below event: What you expected to happen: I would expect the to include attribute. Not sure if it's all node events or just this particular one. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): 1.16 Cloud provider or hardware configuration: bare metal, rancher's rke OS (e.g: ): centos host nodes Kernel (e.g. ): 3.18, 4.4 Install tools: Network plugin and version (if this is a network-related bug): Others:
/sig api-machinery
Just got another from kubelet..
/remove-sig api-machinery /sig node
recording code is here:

Discussion:
// RecordNodeEvent records a event related to a node. func RecordNodeEvent(recorder record.EventRecorder, nodeName, nodeUID, eventtype, reason, event string) { ref := &v1.ObjectReference{ <del> Kind:      "Node", Name:      nodeName, UID:       types.UID(nodeUID), Namespace: "", </del> <ins> APIVersion: "v1", Kind:       "Node", Name:       nodeName, UID:        types.UID(nodeUID), Namespace:  "", </ins> } klog.V(2).Infof("Recording %s event message for node %s", event, nodeName) recorder.Eventf(ref, eventtype, reason, "Node %s event: %s", nodeName, event)

// RecordNodeStatusChange records a event related to a node status change. (Common to lifecycle and ipam) func RecordNodeStatusChange(recorder record.EventRecorder, node *v1.Node, newStatus string) { ref := &v1.ObjectReference{ <del> Kind:      "Node", Name:      node.Name, UID:       node.UID, Namespace: "", </del> <ins> APIVersion: "v1", Kind:       "Node", Name:       node.Name, UID:        node.UID, Namespace:  "", </ins> } klog.V(2).Infof("Recording status change %s event message for node %s", newStatus, node.Name) // TODO: This requires a transaction, either both node status is updated
Change:
/kind bug changed behavior of client-go on connection refused errors, which changed a short wait and an "invalid host/port" error into a long retry wait and a confusing "internal server" error /assign Originally posted by in
/sig api-machinery
/milestone v1.18
I linked
Hello, bug-triage here. Just want to make sure we are still staffed and on-track for v1.18 code freeze
thanks, I will get to this tomorrow.
gentle ping

Discussion:
r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) } if err != nil { <del> // "Connection reset by peer", "Connection refused" or "apiserver is shutting down" are usually a transient errors. </del> <ins> // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. </ins> // Thus in case of "GET" operations, we simply retry it. // We are not automatically retrying "write" operations, as // they are not idempotent.

return err } // For connection errors and apiserver shutdown errors retry. <del> if net.IsConnectionReset(err) || net.IsConnectionRefused(err) { </del> <ins> if net.IsConnectionReset(err) { </ins> // For the purpose of retry, we set the artificial "retry-after" response. // TODO: Should we clean the original response if it exists? resp = &http.Response{
Change:
This helps debugging scheduler's behavior, currently we don't have logs that indicate when the scheduler first saw a pod or a node. The log level should be v=3. /sig scheduling /cc
Do you mean add logging for callbacks in ?
yes, at least for add and delete events
Sure, I can also give this pr, before tomorrow
/assign
We actually have one v=2 log line for a Node being to the cache's tree: But it's probably good to keep this one.

Discussion:
klog.Errorf("scheduler cache AddNode failed: %v", err) } <ins> klog.V(3).Infof("add event for node %q", node.Name) </ins> sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.NodeAdd) }

klog.Errorf("cannot convert to *v1.Node: %v", t) return } <ins> klog.V(3).Infof("delete event for node %q", node.Name) </ins> // NOTE: Updates must be written to scheduler cache before invalidating // equivalence cache, because we could snapshot equivalence cache after the // invalidation and then snapshot the cache itself. If the cache is

} func (sched *Scheduler) addPodToSchedulingQueue(obj interface{}) { <del> if err := sched.SchedulingQueue.Add(obj.(*v1.Pod)); err != nil { </del> <ins> pod := obj.(*v1.Pod) klog.V(3).Infof("add event for unscheduled pod %s/%s", pod.Namespace, pod.Name) if err := sched.SchedulingQueue.Add(pod); err != nil { </ins> utilruntime.HandleError(fmt.Errorf("unable to queue %T: %v", obj, err)) } }

utilruntime.HandleError(fmt.Errorf("unable to handle object in %T: %T", sched, obj)) return } <ins> klog.V(3).Infof("delete event for unscheduled pod %s/%s", pod.Namespace, pod.Name) </ins> if err := sched.SchedulingQueue.Delete(pod); err != nil { utilruntime.HandleError(fmt.Errorf("unable to dequeue %T: %v", obj, err)) }

klog.Errorf("cannot convert to *v1.Pod: %v", obj) return } <ins> klog.V(3).Infof("add event for scheduled pod %s/%s ", pod.Namespace, pod.Name) </ins> if err := sched.SchedulerCache.AddPod(pod); err != nil { klog.Errorf("scheduler cache AddPod failed: %v", err)

klog.Errorf("cannot convert to *v1.Pod: %v", t) return } <ins> klog.V(3).Infof("delete event for scheduled pod %s/%s ", pod.Namespace, pod.Name) </ins> // NOTE: Updates must be written to scheduler cache before invalidating // equivalence cache, because we could snapshot equivalence cache after the // invalidation and then snapshot the cache itself. If the cache is
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: Due to the adal SDK implementation, the AAD token obtained by cloud provider from AzureAD token endpoint would have audience prefix. There is an extensive documentation in . The original contains fixes to kubectl as well as cloud provider. This issue will be targeted just to azure cloud provider. This wouldn't have the same impact as What you expected to happen: Change the SDK usage so that the AAD token's audience claim does not have prefix 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:
/area provider/azure /sig cloud-provider
/cc

Discussion:
env.ServiceManagementEndpoint) } <del> oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, tenantID) </del> <ins> oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, tenantID, nil) </ins> if err != nil { return nil, fmt.Errorf("creating the OAuth config: %v", err) }

token, err := GetServicePrincipalToken(config, env) assert.NoError(t, err) <del> oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, config.TenantID) </del> <ins> oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, config.TenantID, nil) </ins> assert.NoError(t, err) spt, err := adal.NewServicePrincipalToken(*oauthConfig, config.AADClientID, config.AADClientSecret, env.ServiceManagementEndpoint)
Change:
What would you like to be : From looking at our gomod deps we seem to have drifted out of date again and we should update - Why is this needed: Bug fixes, feature adds, validation. /cc
Also cc:
we currently use which is the same as go does not allow referring to a module using a v2+ semver tag unless the module name ends with
opened to add an explanatory comment in our file, which is the best we can do until etcd renames its module to follow semantic import versioning, which requires changing every package import reference
what about v3.3.10+incompatible && the other older etcd deps?
not vendored/linked/used (can verify no code from that dependency is even present in ), just in our graph, so included in replace / directives
uhhh that's weird, we need to dump viper for component config, but no one wanted todo that work.

Discussion:
github.com/xlab/handysort => github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1 github.com/xordataexchange/crypt => github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 go.etcd.io/bbolt => go.etcd.io/bbolt v1.3.3 <del> go.etcd.io/etcd => go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 </del> <ins> go.etcd.io/etcd => go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 // 3cf2f69b5738 is the SHA for git tag v3.4.3 </ins> go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.1.2 go.opencensus.io => go.opencensus.io v0.21.0 go.uber.org/atomic => go.uber.org/atomic v1.3.2