jiebi/CodeConvo huggingface dataset:
Change:
"net" "net/http" "os" <ins> "path" </ins> "strconv" "time"

Discussion:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: What happened: When running on a new VM, I get the following error: error: failed to run Kubelet: rootDirectory "/var/lib/kubelet" does not exist What you expected to happen: Previously, if this root directory did not exist, kubelet would automatically create it with the appropriate permissions. How to reproduce it (as minimally and precisely as possible): $ git clone $ cd kubernetes $ git checkout $ make WHAT=cmd/kubelet $ sudo ./output/dockerized/bin/linux/amd64/kubelet --fail-swap-on=false This invocation exits immediately with the above error about not existing. Anything else we need to know?: I believe this recently-merged PR is the cause: If I revert this PR's commit locally, and repeat the above steps, then gets automatically created when I start up kubelet: $ git revert $ make WHAT=cmd/kubelet $ sudo ./output/dockerized/bin/linux/amd64/kubelet --fail-swap-on=false This invocation stays running, and if I check in another window, has automatically been created. This discrepancy is currently breaking our . If the correct answer is that autocreation of the root directory was never supposed to be a supported feature and just happened to work, then we can update that expectation elsewhere to explicitly create the root directory first, but this does seem like a regression. Environment: Kubernetes version (use ): upstream/master HEAD (at ) Cloud provider or hardware configuration**: The same happens on my local desktop and a GCE VM with Ubuntu OS (e.g. from /etc/os-release): Ubuntu 14.04 on my desktop, 16.04 on GCE Kernel (e.g. ): 4.4.0-83-generic on my desktop, 4.4.0-21-generic on GCE Install tools: building/running directly from the source code using the above steps Others:
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list .

The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig node
cc
/kind bug /area kubelet
/cc for
I am sure about the sequence of this? When cadvisor checks the directory, should this directory already exist?
figured out where exactly we create the directories. please see the PR
For default , we may create it if needed. But what if a customized value?
The behavior looks to be the same. There is a default root directory, but it can be overridden with a CLI flag. The code for directory creation is here, and uses the after CLI args have been resolved:
Thanks for the clarification. Actually . So we may remove the duplicated in . WDYT?
i am not comfortable with the duplicate from setupDataDirs as someone can use Kubelet directly without using the code under (and without using cadvisor). So we should let it be
SGTM. Thanks.
Change:
} } <ins> func TestGetNodeClassificationByLabels(t *testing.T) { const machine01 = "machine01" const machine02 = "machine02" const zoneA = "zoneA" zone1 := map[string]string{ "zone": zoneA, } labeledNodes := map[string]map[string]string{ machine01: zone1, } expectedNonLabeledNodes := []string{machine02} serviceAffinity := ServiceAntiAffinity{label: "zone"} newLabeledNodes, noNonLabeledNodes := serviceAffinity.getNodeClassificationByLabels(makeLabeledNodeList(labeledNodes)) noLabeledNodes, newnonLabeledNodes := serviceAffinity.getNodeClassificationByLabels(makeNodeList(expectedNonLabeledNodes)) label, _ := newLabeledNodes[machine01] if label != zoneA && len(noNonLabeledNodes) != 0 { t.Errorf("Expected only labeled node with label zoneA and no noNonLabeledNodes") } if len(noLabeledNodes) != 0 && newnonLabeledNodes[0] != machine02 { t.Errorf("Expected only non labled nodes") } } </ins> func makeLabeledNodeList(nodeMap map[string]map[string]string) []*v1.Node { nodes := make([]*v1.Node, 0, len(nodeMap)) for nodeName, labels := range nodeMap {

Discussion:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Kubernetes version (use ): master What happened: The functionality is hidden in a large function, and not explicit, testable. What you expected to happen: The logic of should read more clearly, with tests for individual filters.
has a PR for this .
Few more things include removing limits in entries like
yeah, im not sure why the thing is there, after all they are just appending to the slice and the limit wont have an effect , from what i can tell, will it? probably good idea to remove unless im missing something.
Its part of part of PR too.
Change:
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) }

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: In the to acquire AAD token, because of the inclusion of the API version in the URLs for authorization, the returned token is not compatible with many AAD scenarios like OIDC and On-Behalf-Of flow. There is a long list of issues documenting this problem: The fix is pretty simple, use with set to . This incompatible behavior impacts What you expected to happen: Follow the to acquire AAD token How to reproduce it (as minimally and precisely as possible): use kubectl to get AAD token, paste token into and verify the audience claim Anything else we need to know?: Environment: Kubernetes version (use ): all versions 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
The label(s) cannot be applied, because the repository doesn't have them <detailsIn response to : /area provider-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
/area provider/azure
/sig cli
/sig cloud-provider
/assign
Change:
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) }

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: 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
Change:
setupLocalVolumeProvisioner(config) volumePath = path.Join( hostBase, discoveryDir, fmt.Sprintf("vol-%v", string(uuid.NewUUID()))) <ins> setupLocalVolumeProvisionerMountPoint(config, volumePath) </ins> }) AfterEach(func() { <ins> cleanupLocalVolumeProvisionerMountPoint(config, volumePath) </ins> cleanupLocalVolumeProvisioner(config, volumePath) cleanupStorageClass(config) })

Discussion:
The local PV provisioner is being updated to discover only real mount points (and not directories), that resolves some other related issues. The related e2e tests using the local PV provisioner need to be updated accordingly.
/assign
/sig storage
FYI:
Change:
"k8s.io/component-base/metrics/legacyregistry" ) <ins> type TB interface { Logf(format string, args ...any) Errorf(format string, args ...any) Fatalf(format string, args ...any) } </ins> // CollectAndCompare registers the provided Collector with a newly created // pedantic Registry. It then does the same as GatherAndCompare, gathering the // metrics from the pedantic Registry.

Discussion:
We have many "test only" packages through out the project, containing fixtures, helpers, utilities, etc... These test libraries are not intended for use in production binaries. They often lack rigorous review and sufficient testing for use in production binaries. We should make sure they don't accidentally get pulled in. Strawman proposal, test only packages must import "testing". Blank import is sufficient: Then write a presubmit that fails if we find symbol in the release binary. This approach is trivial and fairly effective although a more sophisticated approach could print a dep chain.
/assign
I hope I will be able to contribute once this gets marked as .
/triage accepted
I think that will be enough a new script or a check in the building scripts /cc since he has experience from the providerless building effort
I got what we want to achieve here but I'm little confused about: If I execute: after adding the import then only it is giving - what do we want to achieve by executing this command exactly? I got what it is doing. I've opened a thread in slack as well:
Hello! Is there anyone working on this issue at the moment? If not and the issue it's still relevant, I would like to work on it if possible. Thank you.
I opened a PR in the meantime, if it's not needed anymore, I can close it.
Change:
// Load takes a byte slice and deserializes the contents into Config object. // Encapsulates deserialization without assuming the source is a file. func Load(data []byte) (*clientcmdapi.Config, error) { <del> config := &clientcmdapi.Config{} </del> <ins> config := clientcmdapi.NewConfig() // if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input) if len(data) == 0 { return config, nil } </ins> if err := clientcmdlatest.Codec.DecodeInto(data, config); err != nil { return nil, err }

Discussion:
I tried viewing a .kubeconfig file and view is now broken: I'm planning to take a look, but in case I get sidetracked, I wanted to be sure that it was noted. in case this bites you too.
Change:
# See the License for the specific language governing permissions and # limitations under the License. <del> all: serve_hostname </del> <ins> # Cross-build the serve_hostname image # # Usage: #       [TAG=v1.5] [PREFIX=gcr.io/google_containers] [TEST_REGISTRY=b.gcr.io/k8s_authenticated_test] [ARCH=amd64] [BASEIMAGE=busybox] make all .PHONY: all push container clean TAG ?= v1.5 REGISTRY ?= gcr.io/google_containers TEST_REGISTRY ?= b.gcr.io/k8s_authenticated_test # Architectures supported: amd64, arm, arm64 and ppc64le ARCH ?= amd64 ALL_ARCH = amd64 arm arm64 ppc64le GOARM=6 TEMP_DIR := $(shell mktemp -d) GOLANG_VERSION = 1.6.3 BIN = serve_hostname SRCS = serve_hostname.go IMAGE = $(REGISTRY)/$(BIN)-$(ARCH) TEST_IMAGE = $(TEST_REGISTRY)/$(BIN)-$(ARCH) </ins> <del> TAG = v1.4 PREFIX = gcr.io/google_containers TEST_PREFIX = b.gcr.io/k8s_authenticated_test </del> <ins> # Set default base image dynamically for each arch ifeq ($(ARCH),amd64) BASEIMAGE?=busybox endif ifeq ($(ARCH),arm) BASEIMAGE?=armel/busybox endif ifeq ($(ARCH),arm64) BASEIMAGE?=aarch64/busybox endif ifeq ($(ARCH),ppc64le) BASEIMAGE?=ppc64le/busybox endif </ins> <del> serve_hostname: serve_hostname.go CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' ./serve_hostname.go </del> <ins> # If you want to build AND push all containers, see the 'all-push' rule. all: all-container </ins> <del> container: serve_hostname docker build -t $(PREFIX)/serve_hostname:$(TAG) . if [ -n "$(TEST_PREFIX)" ]; then  docker tag -f $(PREFIX)/serve_hostname:$(TAG) $(TEST_PREFIX)/serve_hostname:$(TAG);  </del> <ins> sub-container-%: $(MAKE) ARCH=$* container sub-push-%: $(MAKE) ARCH=$* push all-container: $(addprefix sub-container-,$(ALL_ARCH)) all-push: $(addprefix sub-push-,$(ALL_ARCH)) build: bin/$(BIN)-$(ARCH) bin/$(BIN)-$(ARCH): $(SRCS) # Copy the content in this dir to the temp dir cp ./* $(TEMP_DIR) docker run -it -v $(TEMP_DIR):/build  golang:$(GOLANG_VERSION)  /bin/bash -c " cd /build &&  CGO_ENABLED=0 GOARM=$(GOARM) GOARCH=$(ARCH) go build -a -installsuffix cgo --ldflags '-w' -o $(BIN) ./$(SRCS)" container: .container-$(ARCH) .container-$(ARCH): bin/$(BIN)-$(ARCH) # Set the base image cd $(TEMP_DIR) && sed -i.bak 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile docker build -t $(IMAGE):$(TAG) $(TEMP_DIR) if [ -n "$(TEST_REGISTRY)" ]; then  docker tag $(IMAGE):$(TAG) $(TEST_IMAGE):$(TAG) ; </ins> fi <del> push: gcloud docker push $(PREFIX)/serve_hostname:$(TAG) if [ -n "$(TEST_PREFIX)" ]; then  gcloud docker push $(TEST_PREFIX)/serve_hostname:$(TAG);  </del> <ins> push: .push-$(ARCH) .push-$(ARCH): .container-$(ARCH) gcloud docker push $(IMAGE):$(TAG) if [ -n "$(TEST_REGISTRY)" ]; then  gcloud docker push $(TEST_IMAGE):$(TAG) ; </ins> fi clean: <del> rm -f serve_hostname </del> <ins> rm -rf $(BIN) </ins>

Discussion:
cross-build , Supported arch are: amd64(default) arm arm64 ppc64le PR is . This issue and PR() is an effort to achieve multiarch Kubernetes()
Done.
Change:
} // DialFromEndpointContainer executes a curl via kubectl exec in an endpoint container. <del> func (config *NetworkingTestConfig) DialFromEndpointContainer(protocol, targetIP string, targetPort, maxTries, minTries int, expectedEps sets.String) { config.DialFromContainer(protocol, echoHostname, config.EndpointPods[0].Status.PodIP, targetIP, EndpointHTTPPort, targetPort, maxTries, minTries, expectedEps) </del> <ins> func (config *NetworkingTestConfig) DialFromEndpointContainer(protocol, targetIP string, targetPort, maxTries, minTries int, expectedEps sets.String) error { return config.DialFromContainer(protocol, echoHostname, config.EndpointPods[0].Status.PodIP, targetIP, EndpointHTTPPort, targetPort, maxTries, minTries, expectedEps) </ins> } // DialFromTestContainer executes a curl via kubectl exec in a test container. <del> func (config *NetworkingTestConfig) DialFromTestContainer(protocol, targetIP string, targetPort, maxTries, minTries int, expectedEps sets.String) { config.DialFromContainer(protocol, echoHostname, config.TestContainerPod.Status.PodIP, targetIP, testContainerHTTPPort, targetPort, maxTries, minTries, expectedEps) </del> <ins> func (config *NetworkingTestConfig) DialFromTestContainer(protocol, targetIP string, targetPort, maxTries, minTries int, expectedEps sets.String) error { return config.DialFromContainer(protocol, echoHostname, config.TestContainerPod.Status.PodIP, targetIP, testContainerHTTPPort, targetPort, maxTries, minTries, expectedEps) </ins> } // DialEchoFromTestContainer executes a curl via kubectl exec in a test container. The response is expected to match the echoMessage. <del> func (config *NetworkingTestConfig) DialEchoFromTestContainer(protocol, targetIP string, targetPort, maxTries, minTries int, echoMessage string) { </del> <ins> func (config *NetworkingTestConfig) DialEchoFromTestContainer(protocol, targetIP string, targetPort, maxTries, minTries int, echoMessage string) error { </ins> expectedResponse := sets.NewString() expectedResponse.Insert(echoMessage) var dialCommand string

Discussion:
What would you like to be : Right now we poll one node at a time for intra-pod tests. We ultimately fail a test if any one node is unreachable. If we instead polled all nodes, multiple times, and collected the number of times a node was unreachable, this would tell us what % of nodes on the cluster were broken, rather then just telling us the first node that was broken. not break the testing contract (were still verifying intra-pod connectivity, just doing so in a way that gives us holistic cluster info) Why is this needed: I described why this would make triage alot easier, and in general make it easier to see why tests are failing, here ... i'll collect a little more data on this to justify the decision .... as this is a conformance test so the bar for modification is higher (even if the test itself isnt changing) then regular tests.
/sig network
/assign
/triage unresolved Comment when the issue is assessed and confirmed. I am a bot run by vllry. ‍
/remove-triage unresolved
Change:
const ( replace_long = `Replace a resource by filename or stdin. <del> JSON and YAML formats are accepted.` </del> <ins> JSON and YAML formats are accepted. Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.` </ins> replace_example = `// Replace a pod using the data in pod.json. $ kubectl replace -f ./pod.json

Discussion:
The current documentation is very vague and doesn't explain what can be updated in this way. Can I rename or stop the pod, change number of replicas in RC etc. For example it seems to be impossible to change pod name:
cc
After an in person discussion with we think the docs should point people to the swagger-ui to find if a field is mutable. I'll add this point into the docs.
Change:
container_memory_working_set_bytes{container="container_b",namespace="namespace_a",pod="pod_a"} 1000 1624396278302 # HELP container_start_time_seconds [STABLE] Start time of the container since unix epoch in seconds # TYPE container_start_time_seconds gauge <del> container_start_time_seconds{container="container_a",namespace="namespace_a",pod="pod_a"} 1.6243962483020916e+09 1624396248302 container_start_time_seconds{container="container_a",namespace="namespace_b",pod="pod_b"} 1.6243956783020916e+09 1624395678302 container_start_time_seconds{container="container_b",namespace="namespace_a",pod="pod_a"} 1.6243961583020916e+09 1624396158302 </del> <ins> container_start_time_seconds{container="container_a",namespace="namespace_a",pod="pod_a"} 1.6243962483020916e+09 container_start_time_seconds{container="container_a",namespace="namespace_b",pod="pod_b"} 1.6243956783020916e+09 container_start_time_seconds{container="container_b",namespace="namespace_a",pod="pod_a"} 1.6243961583020916e+09 </ins> # HELP container_swap_usage_bytes [ALPHA] Current amount of the container swap usage in bytes. Reported only on non-windows systems # TYPE container_swap_usage_bytes gauge container_swap_usage_bytes{container="container_a",namespace="namespace_a",pod="pod_a"} 1000 1624396278302

Discussion:
When scrape kubelet resource metrics provided by /metrics/resource, got response like this The metric containerstarttimeseconds's timestamp should not equals to container start time As above No response v1.24.7 Volc Engine No response No response No response No response_
I would like to take this up, after triage/accepted I just wanted to know then what time should be needed to be set there? /assign
the metric should not have a timestamp
If not timestamp, then what value and data type should I assign for the containerstarttime_seconds metric?
check
no need to change the value and data type, just remove the timestamp for the metric datapoint
Sure got it, raising a PR for the same!
If you have already done it, then why the PR is blocked and why I am redoing it again? Just curious to know!
Why do you think it's blocked and why are you redoing it before figuring this out?
/sig node
/triage accepted /priority important-longterm
/assign (since you sent a PR)
Change:
podtolerationrestriction.PluginName,     // PodTolerationRestriction eventratelimit.PluginName,               // EventRateLimit extendedresourcetoleration.PluginName,   // ExtendedResourceToleration <del> label.PluginName,                        // PersistentVolumeLabel </del> setdefault.PluginName,                   // DefaultStorageClass storageobjectinuseprotection.PluginName, // StorageObjectInUseProtection gc.PluginName,                           // OwnerReferencesPermissionEnforcement

Discussion:
In 1.30, the PersistentVolumeLabel admission plugin blocks creation of in-tree AzureDisk and vSphere PVs: The reason is that the cloud provider was removed (), but the admission plugin still calls GetCloudProvider there, which fails: The PV should be admitted + created. Enable PersistentVolumeLabel admission plugin. For example, when running local-up- Create AzureDisk PV on any 1.30 cluster, you don't need Azure cloud: /sig storage /priority important-soon <detailsToday's master </details<detailsAzure </detailsNo response <detailslocal-up- </details<details</details<details</details
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
I am fixing the worst bug in and I plan to backport it to 1.30. However, we should consider removing the whole PersistentVolumeLabel admission plugin. Most of the cloud providers were removed, only GCE remains and IMO even that one will be removed sooner or later. The admission plugin has no way to get volume zone + region and is therefore useless. The admission said (in 1.26, where we had all in-tree cloud providers): Such webhook never materialized for AWS, Azure nor vSphere and I am not aware of any plans for GCE.
It did materialize in So removing it from k/k is the best way forward.