jiebi/CodeConvo huggingface dataset:
Change:
Per the comments in v1beta1 Event: The field claimed to be optional, but an error is dumped if it's illegal - including the case: This doesn't look right as it means the caller which passes in Related field will always get an err, for example, the scheduler binding event: If appropriate, I'm gonna raise a PR to tolerate the nil case. please advice.
/sig scheduling /sig api-machinery
/assign I'll update the log to info or warning cc
It shouldn't be warning - it's a valid and allowed case. I'm wondering if we even should be logging info, but maybe we can for now.
/assign

Discussion:
} refRelated, err := reference.GetReference(recorder.scheme, related) if err != nil { <del> klog.Errorf("Could not construct reference to: '%#v' due to: '%v'.", related, err) </del> <ins> klog.V(9).Infof("Could not construct reference to: '%#v' due to: '%v'.", related, err) </ins> } if !util.ValidateEventType(eventtype) { klog.Errorf("Unsupported event type: '%v'", eventtype)
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Add package to include (+nslookup) tool in Agnhost image. Why is this needed: is important tool used in most of the network testing suite. [Issue Source]: /area conformance /sig testing /assign
Seems already exist in agnhost:2.4.
E2E failing with is not found.
Do we still need this? I could add this if needed.
Yes, we are looking to use for most of the network testing aspects and having it in agnhost is very useful.
supposed to fix this issue. (based on PR description) /open
PR was also included in , but already merged, but ` has not been built and pushed as it should.

Discussion:
# - iproute2: includes ss used in NodePort tests # from iperf image # install necessary packages: iperf, bash <del> RUN apk --update add curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/*  </del> <ins> RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/*  </ins> && ln -s /usr/bin/iperf /usr/local/bin/iperf  && ls -altrh /usr/local/bin/iperf

The image was created for testing purposes, reducing the need for having different test cases for the same tested behaviour. <ins> ## Developer notes We've introduced versioning into the `agnhost` binary for debugging purposes (e.g.: if the image and binary versions do not match, see [here](https://github.com/kubernetes/kubernetes/pull/79667#discussion_r304198370)). Whenever the image `VERSION` is bumped, the `Version` in `agnhost.go` will also have to be bumped. </ins> ## Usage The `agnhost` binary has several subcommands which are can be used to test different

<del> 2.4 </del> <ins> 2.5 </ins>

) func main() { <del> rootCmd := &cobra.Command{Use: "app"} </del> <ins> rootCmd := &cobra.Command{Use: "app", Version: "2.5"} </ins> rootCmd.AddCommand(auditproxy.CmdAuditProxy) rootCmd.AddCommand(connect.CmdConnect) rootCmd.AddCommand(crdconvwebhook.CmdCrdConversionWebhook)
Change:
What happened: When we build with make to build k8s, it will use 'amd64' in the container names. This is not the case for bazel builds, which are still using something like 'kube-apiserver' instead of 'kube-apiserver-amd64' What you expected to happen: Images build with make or bazel should have 'amd64' in the container name How to reproduce it (as minimally and precisely as possible): make quick-release cat inside tar "RepoTags": ["" make bazel-release cat inside tar "RepoTags": [""
/sig cluster-lifecycle /assign
+1 we need to standardize both builds to generate the same. +1 to add to the bazel build
FYI
+1, cc
bazel / docker build parity SGTM.
+1. Perhaps we should document a standard, like: All docker images that are arch specific should have the arch in the name Arch is only able to be omitted when it's a manifest-based tag (multi-arch) Document legacy exceptions, and hopefully bring them into compliance /cc
i like it. where is the best spot to doc this?
-- please doc as updates to:
Created

Discussion:
}, } <del> # In the bash-based build (build/lib/release.sh), the images built for amd64 do not use # an arch in their name (but other arches do), and the GCE cluster scripts # (which sideload the images via tarfiles) expect there not to be an arch. </del> # When pushing to gcr.io, we want to use an arch, since the archless name is now used for a # manifest list. Bazel doesn't support manifest lists (yet), so we can't do that either. <del> # For now, we use the archless name for the image tars saved in the server tarball, # to satisfy GCE and other similar providers. (If one were to pull the images via the manifest # list, the arch wouldn't appear in the name either.) </del> [multi_arch_container( name = binary, architectures = SERVER_PLATFORMS["linux"],

)), # Since the multi_arch_container macro replaces the {ARCH} format string, # we need to escape the stamping vars. <del> # Also see comment above about why the push tags use ARCH while the # non-push tags do not. </del> docker_push_tags = ["{{STABLE_DOCKER_PUSH_REGISTRY}}/%s-{ARCH}:{{STABLE_DOCKER_TAG}}" % binary], <del> docker_tags = ["{{STABLE_DOCKER_REGISTRY}}/%s:{{STABLE_DOCKER_TAG}}" % binary], </del> <ins> docker_tags = ["{{STABLE_DOCKER_REGISTRY}}/%s-{ARCH}:{{STABLE_DOCKER_TAG}}" % binary], </ins> stamp = True, symlinks = { # Some cluster startup scripts expect to find the binaries in /usr/local/bin,
Change:
In : It seems that nodes are only used in the case there are no predicates. This call can be moved inside . Moving it there saves us from creating the node slice unless it is necessary. Checking if there are no nodes (line 202 below) can be done using . /kind cleanup /sig scheduling
I can work on this

Discussion:
return result, prefilterStatus.AsError() } <del> nodes := nodeLister.ListNodes() if err != nil { return result, err } if len(nodes) == 0 { </del> <ins> numNodes := g.cache.NodeTree().NumNodes() if numNodes == 0 { </ins> return result, ErrNoNodesAvailable }

trace.Step("Basic checks done") startPredicateEvalTime := time.Now() <del> filteredNodes, failedPredicateMap, err := g.findNodesThatFit(pluginContext, pod, nodes) </del> <ins> filteredNodes, failedPredicateMap, err := g.findNodesThatFit(pluginContext, pod, nodeLister) </ins> if err != nil { return result, err }

if len(filteredNodes) == 0 { return result, &FitError{ Pod:              pod, <del> NumAllNodes:      len(nodes), </del> <ins> NumAllNodes:      numNodes, </ins> FailedPredicates: failedPredicateMap, } }

// Filters the nodes to find the ones that fit based on the given predicate functions // Each node is passed through the predicate functions to determine if it is a fit <del> func (g *genericScheduler) findNodesThatFit(pluginContext *framework.PluginContext, pod *v1.Pod, nodes []*v1.Node) ([]*v1.Node, FailedPredicateMap, error) { </del> <ins> func (g *genericScheduler) findNodesThatFit(pluginContext *framework.PluginContext, pod *v1.Pod, nodeLister algorithm.NodeLister) ([]*v1.Node, FailedPredicateMap, error) { </ins> var filtered []*v1.Node failedPredicateMap := FailedPredicateMap{} if len(g.predicates) == 0 { <del> filtered = nodes </del> <ins> filtered = nodeLister.ListNodes() </ins> } else { allNodes := int32(g.cache.NodeTree().NumNodes()) numNodesToFind := g.numFeasibleNodesToFind(allNodes)

nodes := makeNodeList([]string{"3", "2", "1"}) scheduler := makeScheduler(predicates, nodes) <del> _, predicateMap, err := scheduler.findNodesThatFit(nil, &v1.Pod{}, nodes) </del> <ins> _, predicateMap, err := scheduler.findNodesThatFit(nil, &v1.Pod{}, schedulertesting.FakeNodeLister(nodes)) </ins> if err != nil { t.Errorf("unexpected error: %v", err)

scheduler := makeScheduler(predicates, nodes) pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1", UID: types.UID("1")}} <del> _, predicateMap, err := scheduler.findNodesThatFit(nil, pod, nodes) </del> <ins> _, predicateMap, err := scheduler.findNodesThatFit(nil, pod, schedulertesting.FakeNodeLister(nodes)) </ins> if err != nil { t.Errorf("unexpected error: %v", err)
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: kube-controller-manager should not panic. How to reproduce it (as minimally and precisely as possible): Kubernetes 1.12.6, , and Anything else we need to know?: It's running and , and logs says: Don't see any notable errors in . Is that because it's running the old ? Basically, is expecting , but somehow it's getting which I assume Environment: Kubernetes version (use ): v1.12.6 Cloud provider or hardware configuration: AWS EC2 OS (e.g: ): Amazon Linux 2 Kernel (e.g. ): 4.14.109-99.92.amzn2.x86_64
Could be related to , but this happens with all the patches from the issue /sig scalability /cc
/sig autoscaling /assign can you triage please?
/sig-remove scalabilty
/sig remove scalability
/sig scalability remove
/remove-sig scalability
API returned v1.Status instead of v1beta2.MetricValueList. We should check what is the type of the object
/sig instrumention
/assign
/sig instrumentation
seems promising. Is it missing anything?
I've root-caused the issue. Explained here -
Yep, should address the issue.

Discussion:
import ( "fmt" <ins> "reflect" </ins> "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" <del> serializer "k8s.io/apimachinery/pkg/runtime/serializer" </del> <ins> "k8s.io/apimachinery/pkg/runtime/serializer" </ins> "k8s.io/client-go/rest" "k8s.io/client-go/util/flowcontrol"

return nil, err } <del> res := metricObj.(*v1beta2.MetricValueList) </del> <ins> var res *v1beta2.MetricValueList var ok bool if res, ok = metricObj.(*v1beta2.MetricValueList); !ok { return nil, fmt.Errorf("the custom metrics API server didn't return MetricValueList, the type is %v", reflect.TypeOf(metricObj)) } </ins> if len(res.Items) != 1 { return nil, fmt.Errorf("the custom metrics API server returned %v results when we asked for exactly one", len(res.Items)) }

return nil, err } <del> res := metricObj.(*v1beta2.MetricValueList) </del> <ins> var res *v1beta2.MetricValueList var ok bool if res, ok = metricObj.(*v1beta2.MetricValueList); !ok { return nil, fmt.Errorf("the custom metrics API server didn't return MetricValueList, the type is %v", reflect.TypeOf(metricObj)) } </ins> return res, nil }
Change:
What happened: Follow the "README", I hit below issue, the command there need a prefix "http" or "https". What you expected to happen: clone a fake repo successfully. How to reproduce it (as minimally and precisely as possible): follow the "README" here. create a pod create a service git clone localhost:8000 Anything else we need to know?: Environment: Kubernetes version (use ): latest Cloud provider or hardware configuration: OS (e.g: ): all Kernel (e.g. ): all
/assign
/sig testing
/kind documentation

Discussion:
### fake-gitserver <del> Fakes a git server. When doing `git clone localhost:8000`, you will clone an empty git repo named `8000` on local. You can also use `git clone localhost:8000 my-repo-name` to rename that repo. </del> <ins> Fakes a git server. When doing `git clone http://localhost:8000`, you will clone an empty git repo named `localhost` on local. You can also use `git clone http://localhost:8000 my-repo-name` to rename that repo. Access to the service with the backing pod will show you below information. ```console curl -w "n" http://localhost:8000 I am a fake git server ``` </ins> Usage:

var CmdFakeGitServer = &cobra.Command{ Use:   "fake-gitserver", Short: "Fakes a git server", <del> Long: `When doing "git clone localhost:8000", you will clone an empty git repo named "8000" on local. You can also use "git clone localhost:8000 my-repo-name" to rename that repo.`, </del> <ins> Long: `When doing "git clone http://localhost:8000", you will clone an empty git repo named "localhost" on local. You can also use "git clone http://localhost:8000 my-repo-name" to rename that repo.`, </ins> Args: cobra.MaximumNArgs(0), Run:  main, }
Change:
<!-- Please only use this template for submitting reports about failing tests in Kubernetes CI jobs --Which jobs are failing: ci-kubernetes-e2e-gci-gce-alpha-features Which test(s) are failing: BeforeSuite Since when has it been failing: Failing since 7/18 The failure seems to have been introduced in is the only PR within that window that modifies any cluster configuration. This PR is related to Testgrid link: Reason for failure: kube-proxy is stuck in a pending state /milestone v1.16 /priority critical-urgent /kind failing-test /sig testing /sig cluster-lifecycle /cc
almost definitely related to the image change E0725 05:54:40. 1368 ] container start failed: ErrImagePull: rpc error: code = Unknown desc = Error response from daemon: manifest for not found
/assign
hmm, we should watch to ensure that actually fixed it /reopen
Reopened this issue. <detailsIn response to : hmm, we should watch to ensure that actually fixed it /reopen 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
Cluster came up in the most recent run, however it looks like tests may fail (it's not done yet). That should be a new issue though. /close
Closing this issue. <detailsIn response to : Cluster came up in the most recent run, however it looks like tests may fail (it's not done yet). That should be a new issue though. 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:
effect: "NoSchedule" containers: - name: kube-proxy <del> image: {{pillar['kube_docker_registry']}}/kube-proxy:{{pillar['kube-proxy_docker_tag']}} </del> <ins> image: {{pillar['kube_docker_registry']}}/kube-proxy-amd64:{{pillar['kube-proxy_docker_tag']}} </ins> resources: requests: cpu: {{ cpurequest }}

<ins> # Please keep kube-proxy configuration in-sync with: # cluster/addons/kube-proxy/kube-proxy-ds.yaml </ins> apiVersion: v1 kind: Pod metadata:
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Report request throttling by the kubelet by default (i. e. V=3) Why is this needed: Request throttling can have serious consequences, but it is reported (in ) at V=4, so not by default. While attempting to probe limits of how many pods per node we could run, we hit a situation where the test pods would go Pending and eventually fail. After investigation, it turned out that the pod was being started by the kubelet, but that status update was not provided to the apiserver in a timely manner, resulting in the pod-to-pod network not coming up, so a pod attempting to connect would time out and fail. The delay was root caused to throttling by the kubelet; raising the KubeAPIBurst and KubeAPIQPS limits resolved the issue. The throttling was caused by fetching secrets for each pod, which was in its own namespace. The subjects of pods/node, namespaces/node, and throttling parameters are complex and I do not propose to solve them here (those are scalability issues that have to be approached carefully). However, being able to easily identify that throttling is taking place without having to restart the kubelet at higher verbosity would help administrators identify the possibility of this issue. My test attempted to create 500 pods across 3 nodes (OpenShift allows 250 pods/node). Running at V=5, I captured a histogram of the throttling delay in seconds. There were 7881 throttling events reported total over perhaps a 45 minute period, with a somewhat bimodal (in this case) distribution:
/sig node /sig scalability
Thanks for filing the pr to fix :)
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
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
/remove-lifecycle rotten

Discussion:
} if latency := time.Since(now); latency > longThrottleLatency { <del> klog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) </del> <ins> klog.V(3).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) </ins> } return err
Change:
What would you like to be : a default normalize score function in the scheduling framework. the plugin and log an error when the normalizing phase returns an invalid range of scores. Why is this needed: Per discussion in , we should enforce the range of score returned by the scoring plugin. /sig scheduling /priority important-soon /assign

Discussion:
importpath = "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1", visibility = ["//visibility:public"], deps = [ <ins> "//pkg/scheduler/api:go_default_library", </ins> "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//pkg/scheduler/util:go_default_library",

errCh.SendErrorWithCancel(err, cancel) return } <del> for i := range nodeScoreList { nodeScoreList[i].Score = nodeScoreList[i].Score * weight </del> <ins> for i, nodeScore := range nodeScoreList { // return error if score plugin returns invalid score. if nodeScore.Score > MaxNodeScore || nodeScore.Score < MinNodeScore { err := fmt.Errorf("score plugin %q returns an invalid score %q, it should in the range of [MinNodeScore, MaxNodeScore] after normalizing", pl.Name(), nodeScore.Score) errCh.SendErrorWithCancel(err, cancel) return } nodeScoreList[i].Score = nodeScore.Score * weight </ins> } })

}, err: true, }, <ins> { name:    "Score plugin return score greater than MaxNodeScore", plugins: plugin1And2, input: PluginToNodeScores{ scorePlugin1: { { Name:  "node1", Score: MaxNodeScore + 1, }, { Name:  "node2", Score: 3, }, }, scorePlugin2: { { Name:  "node1", Score: MinNodeScore, }, { Name:  "node2", Score: 5, }, }, }, err: true, }, { name:    "Score plugin return score less than MinNodeScore", plugins: plugin1And2, input: PluginToNodeScores{ scorePlugin1: { { Name:  "node1", Score: MaxNodeScore, }, { Name:  "node2", Score: 3, }, }, scorePlugin2: { { Name:  "node1", Score: MinNodeScore - 1, }, { Name:  "node2", Score: 5, }, }, }, err: true, }, </ins> } for _, tt := range tests {

v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" <ins> schedulerapi "k8s.io/kubernetes/pkg/scheduler/api" </ins> internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" )

Skip ) <ins> const ( // MaxNodeScore is the maximum score a Score plugin is expected to return. MaxNodeScore int = schedulerapi.MaxPriority // MinNodeScore is the minimum score a Score plugin is expected to return. MinNodeScore int = 0 ) </ins> // Status indicates the result of running a plugin. It consists of a code and a // message. When the status code is not `Success`, the status message should // explain why.

return 0, framework.NewStatus(framework.Error, fmt.Sprintf("injecting failure for pod %v", p.Name)) } <del> score := 10 </del> <ins> score := 1 </ins> if sp.numScoreCalled == 1 { // The first node is scored the highest, the rest is scored lower. sp.highScoreNode = nodeName <del> score = 100 </del> <ins> score = framework.MaxNodeScore </ins> } return score, nil }
Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : Consolidate ) into Score plugin set in config API. Why is this needed: NormalizeScore extension point is implemented in . We decided to treat NormalizeScore as an "optional" step of Score plugin, see . However, we deferred the removal of due to API review delays. Now that PR was merged. We can start the actual removal from the API and start the API review process. /sig scheduling
/assign

Discussion:
// Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet <del> // NormalizeScore is a list of plugins that should be invoked after the scoring phase to normalize scores. NormalizeScore *PluginSet </del> // Reserve is a list of plugins invoked when reserving a node to run the pod. Reserve *PluginSet

out.Filter = (*config.PluginSet)(unsafe.Pointer(in.Filter)) out.PostFilter = (*config.PluginSet)(unsafe.Pointer(in.PostFilter)) out.Score = (*config.PluginSet)(unsafe.Pointer(in.Score)) <del> out.NormalizeScore = (*config.PluginSet)(unsafe.Pointer(in.NormalizeScore)) </del> out.Reserve = (*config.PluginSet)(unsafe.Pointer(in.Reserve)) out.Permit = (*config.PluginSet)(unsafe.Pointer(in.Permit)) out.PreBind = (*config.PluginSet)(unsafe.Pointer(in.PreBind))

out.Filter = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Filter)) out.PostFilter = (*v1alpha1.PluginSet)(unsafe.Pointer(in.PostFilter)) out.Score = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Score)) <del> out.NormalizeScore = (*v1alpha1.PluginSet)(unsafe.Pointer(in.NormalizeScore)) </del> out.Reserve = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Reserve)) out.Permit = (*v1alpha1.PluginSet)(unsafe.Pointer(in.Permit)) out.PreBind = (*v1alpha1.PluginSet)(unsafe.Pointer(in.PreBind))

// Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet `json:"score,omitempty"` <del> // NormalizeScore is a list of plugins that should be invoked after the scoring phase to normalize scores. NormalizeScore *PluginSet `json:"normalizeScore,omitempty"` </del> // Reserve is a list of plugins invoked when reserving a node to run the pod. Reserve *PluginSet `json:"reserve,omitempty"`

*out = new(PluginSet) (*in).DeepCopyInto(*out) } <del> if in.NormalizeScore != nil { in, out := &in.NormalizeScore, &out.NormalizeScore *out = new(PluginSet) (*in).DeepCopyInto(*out) } </del> if in.Reserve != nil { in, out := &in.Reserve, &out.Reserve *out = new(PluginSet)