You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CKS: an upgrade records each node's Kubernetes version as raw kubectl output, with a leading v and a trailing newline #14629
After a CKS cluster is upgraded, each upgraded node's Kubernetes version (kubernetes_cluster_vm_map.kubernetes_node_version, shown as kubernetesnodeversion in listKubernetesClusters) is stored as the raw output of an SSH command: v1.33.1\n, with a v and a trailing newline. Nodes created by the cluster's create or scale paths store 1.33.1.
Clients that print the field get a stray line break, and the two forms don't compare equal.
Cause: KubernetesClusterUtil.clusterNodeVersionMatches(...) (the SSH variant, used by KubernetesClusterUpgradeWorker) saves clusterVersionMatchesAndValue.second(), which is the whole output of
That includes the newline, and anything the command wrote to stderr, such as a sudo warning.
versions
4.21.0.0 and later (since #9102), including 4.22 and main.
The steps to reproduce the bug
Create a CKS cluster at one Kubernetes version.
Upgrade it to a newer version with upgradeKubernetesCluster.
listKubernetesClusters id=<cluster> and look at kubernetesnodeversion for each VM, or SELECT HEX(kubernetes_node_version) FROM kubernetes_cluster_vm_map WHERE cluster_id = <id>.
Upgraded nodes have v<version>\n; nodes added by a later scale-up have <version>.
What to do about it?
Once the node is found at the target version, record that version (the semantic version of the upgrade), the same form the create path records.
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
After a CKS upgrade, each upgraded node's Kubernetes version is stored as raw kubectl output, so it includes a leading v and a trailing newline (for example v1.33.1\n). Nodes added by create or scale store 1.33.1. Clients that print the field see a stray line break, and the two forms do not compare equal.
📊 Assessment
Dimension
Value
Reasoning
Type
type:bug
Stored data format is inconsistent between upgrade and create/scale
Component
component:cks
Upgrade worker and KubernetesClusterUtil
Severity
Severity:Minor
Mostly cosmetic in API output, but comparisons break
Labels
type:bug, component:cks, Severity:Minor
Coding agent
Suitable
Fix is specified: record the target version, not the command output
Reproduction: upgrade a CKS cluster, then check kubernetesnodeversion in listKubernetesClusters, or kubernetes_node_version in kubernetes_cluster_vm_map.
The report also notes that stderr from the SSH command (for example a sudo warning) can end up in the same field.
Activity
github-actions commentedon Nov 10, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🎯 Triage report
After a CKS upgrade, each upgraded node's Kubernetes version is stored as raw
kubectloutput, so it includes a leadingvand a trailing newline (for examplev1.33.1\n). Nodes added by create or scale store1.33.1. Clients that print the field see a stray line break, and the two forms do not compare equal.📊 Assessment
KubernetesClusterUtil🔗 Similar issues
💡 Notes and suggestions
kubernetesnodeversioninlistKubernetesClusters, orkubernetes_node_versioninkubernetes_cluster_vm_map.sudowarning) can end up in the same field.Add this agentic workflow to your repo
To install this agentic workflow, run