Repository: kubernetes-sigs/kueue

Issue:
Add unit tests for slice-only TAS scheduling
<!-- Please only use this template for submitting clean up requests -->

**What would you like to be cleaned**:
In this [PR](https://github.com/kubernetes-sigs/kueue/pull/5905) a fix to slice-only TAS scheduling has been introduced with a e2e test as a confirmation that the fix works. However it was also spotted that we should add lower-level tests for quicker feedback loop. We merged the PR anyway to deliver the fix, but as a follow-up it would be great to add the requested tests:
- Test for validation that Kueue takes into consideration slice-only topology (it was removing the whole `TopologyRequest` before)
- Test for `HasLevel` that it checks slice topology as well (it was checking only main topology before)

**Why is this needed**:
Slice-only topology with rank-ordering required changes with multiple places in the code. We do have e2e test for that, but in the future that might hard to debug failing e2e test. That is why we should introduce lower-level tests for more code-pieces of slice-only TAS scheduling.

Hints from issue comments:
@mimowo: /retitle Add unit tests for slice-only TAS scheduling@mbobrovskyi: /assign

Solution patch:
diff --git a/CHANGELOG/CHANGELOG-0.12.md b/CHANGELOG/CHANGELOG-0.12.md
index c49a78540..e3aa15eca 100644
--- a/CHANGELOG/CHANGELOG-0.12.md
+++ b/CHANGELOG/CHANGELOG-0.12.md
@@ -1,3 +1,14 @@
+## v0.12.8
+
+Changes since `v0.12.7`:
+
+## Changes by Kind
+
+### Bug or Regression
+
+- FS: Fixing a bug where a preemptor ClusterQueue was unable to reclaim its nominal quota when the preemptee ClusterQueue can borrow a large number of resources from the parent ClusterQueue / Cohort (#6619, @pajakd)
+- TAS: Fix a bug where new Workloads starve, caused by inadmissible workloads frequently requeueing due to unrelated Node LastHeartbeatTime update events. (#6636, @utam0k)
+
 ## v0.12.7
 
 Changes since `v0.12.6`:
diff --git a/CHANGELOG/CHANGELOG-0.13.md b/CHANGELOG/CHANGELOG-0.13.md
index be8ff2ba5..f0e5bfa6d 100644
--- a/CHANGELOG/CHANGELOG-0.13.md
+++ b/CHANGELOG/CHANGELOG-0.13.md
@@ -1,3 +1,15 @@
+## v0.13.3
+
+Changes since `v0.13.2`:
+
+## Changes by Kind
+
+### Bug or Regression
+
+- FS: Fixing a bug where a preemptor ClusterQueue was unable to reclaim its nominal quota when the preemptee ClusterQueue can borrow a large number of resources from the parent ClusterQueue / Cohort (#6617, @pajakd)
+- KueueViz: Fix CORS configuration for development environments (#6603, @yankay)
+- TAS: Fix a bug where new Workloads starve, caused by inadmissible workloads frequently requeueing due to unrelated Node LastHeartbeatTime update events. (#6570, @utam0k)
+
 ## V0.13.2
 
 Changes since `v0.13.1`:
diff --git a/Makefile b/Makefile
index 89d7c13d3..eda9e0d27 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ LD_FLAGS += -X '$(version_pkg).BuildDate=$(shell date -u +%Y-%m-%dT%H:%M:%SZ)'
 
 # Update these variables when preparing a new release or a release branch.
 # Then run `make prepare-release-branch`
-RELEASE_VERSION=v0.13.2
+RELEASE_VERSION=v0.13.3
 RELEASE_BRANCH=main
 # Application version for Helm and npm (strips leading 'v' from RELEASE_VERSION)
 APP_VERSION := $(shell echo $(RELEASE_VERSION) | cut -c2-)
diff --git a/README.md b/README.md
index 1616864f3..e6a61760a 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,7 @@ Read the [overview](https://kueue.sigs.k8s.io/docs/overview/) and watch the Kueu
 To install the latest release of Kueue in your cluster, run the following command:
 
 ```shell
-kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.2/manifests.yaml
+kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.3/manifests.yaml
 ```
 
 The controller runs in the `kueue-system` namespace.
diff --git a/SECURITY-INSIGHTS.yaml b/SECURITY-INSIGHTS.yaml
index 94a084b99..d93db25c1 100644
--- a/SECURITY-INSIGHTS.yaml
+++ b/SECURITY-INSIGHTS.yaml
@@ -1,11 +1,11 @@
 header:
   schema-version: 1.0.0
   expiration-date: '2024-09-28T01:00:00.000Z'
-  last-updated: '2025-08-11'
-  last-reviewed: '2025-08-11'
-  commit-hash: "2fb89c587565f18284775f0849f030c41b8a6980"
+  last-updated: '2025-08-22'
+  last-reviewed: '2025-08-22'
+  commit-hash: "0d74c06edafeb143736e7e6768cba24635a33cf7"
   project-url: 'https://github.com/kubernetes-sigs/kueue'
-  project-release: "0.13.2"
+  project-release: "0.13.3"
   changelog: 'https://github.com/kubernetes-sigs/kueue/tree/main/CHANGELOG'
   license: 'https://github.com/kubernetes-sigs/kueue/blob/main/LICENSE'
 project-lifecycle:
@@ -28,7 +28,7 @@ documentation:
   - 'https://kueue.sigs.k8s.io/docs/'
 distribution-points:
   - >-
-    https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.2/manifests.yaml
+    https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.3/manifests.yaml
 security-artifacts:
   threat-model:
     threat-model-created: false
@@ -62,5 +62,5 @@ dependencies:
   dependencies-lists:
     - 'https://github.com/kubernetes-sigs/kueue/blob/main/go.mod'
   sbom:
-    - sbom-file: https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.2/kueue-v0.13.2.spdx.json
+    - sbom-file: https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.3/kueue-v0.13.3.spdx.json
       sbom-format: SPDX
diff --git a/charts/kueue/Chart.yaml b/charts/kueue/Chart.yaml
index 58bc89a9f..79e05cb9d 100644
--- a/charts/kueue/Chart.yaml
+++ b/charts/kueue/Chart.yaml
@@ -16,9 +16,9 @@ type: application
 # NOTE: Do not modify manually. In Kueue, the version and appVersion are
 # overridden to GIT_TAG when building the artifacts, including the helm charts,
 # via Makefile.
-version: 0.13.2
+version: 0.13.3
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to
 # follow Semantic Versioning. They should reflect the version the application is using.
 # It is recommended to use it with quotes.
-appVersion: "v0.13.2"
+appVersion: "v0.13.3"
diff --git a/charts/kueue/README.md b/charts/kueue/README.md
index fd99de5e3..f51484c84 100644
--- a/charts/kueue/README.md
+++ b/charts/kueue/README.md
@@ -1,6 +1,6 @@
 # kueue
 
-![Version: 0.13.2](https://img.shields.io/badge/Version-0.13.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.13.2](https://img.shields.io/badge/AppVersion-v0.13.2-informational?style=flat-square)
+![Version: 0.13.3](https://img.shields.io/badge/Version-0.13.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.13.3](https://img.shields.io/badge/AppVersion-v0.13.3-informational?style=flat-square)
 
 Kueue is a set of APIs and controller for job queueing. It is a job-level manager that decides when a job should be admitted to start (as in pods can be created) and when it should stop (as in active pods should be deleted).
 
@@ -28,7 +28,7 @@ $ helm install kueue kueue/ --create-namespace --namespace kueue-system
 Or use the charts pushed to `oci://registry.k8s.io/kueue/charts/kueue`:
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" --create-namespace --namespace=kueue-system
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" --create-namespace --namespace=kueue-system
 ```
 
 For more advanced parametrization of Kueue, we recommend using a local overrides file, passed via the `--values` flag. For example:
@@ -50,7 +50,7 @@ controllerManager:
 ```
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" \
   --create-namespace --namespace=kueue-system \
   --values overrides.yaml
 ```
@@ -58,7 +58,7 @@ helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
 You can also use the `--set` flag. For example, to enable a feature gate (e.g., `TopologyAwareScheduling`):
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" \
   --create-namespace --namespace=kueue-system \
   --set "controllerManager.featureGates[0].name=TopologyAwareScheduling" \
   --set "controllerManager.featureGates[0].enabled=true"
diff --git a/charts/kueue/README.md.gotmpl b/charts/kueue/README.md.gotmpl
index 53f012a68..d025f1a42 100644
--- a/charts/kueue/README.md.gotmpl
+++ b/charts/kueue/README.md.gotmpl
@@ -30,7 +30,7 @@ $ helm install kueue kueue/ --create-namespace --namespace kueue-system
 Or use the charts pushed to `oci://registry.k8s.io/kueue/charts/kueue`:
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" --create-namespace --namespace=kueue-system
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" --create-namespace --namespace=kueue-system
 ```
 
 For more advanced parametrization of Kueue, we recommend using a local overrides file, passed via the `--values` flag. For example:
@@ -52,7 +52,7 @@ controllerManager:
 ```
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" \
   --create-namespace --namespace=kueue-system \
   --values overrides.yaml
 ```
@@ -60,7 +60,7 @@ helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
 You can also use the `--set` flag. For example, to enable a feature gate (e.g., `TopologyAwareScheduling`):
 
 ```bash
-helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.2" \
+helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version="0.13.3" \
   --create-namespace --namespace=kueue-system \
   --set "controllerManager.featureGates[0].name=TopologyAwareScheduling" \
   --set "controllerManager.featureGates[0].enabled=true"
diff --git a/cmd/kueueviz/INSTALL.md b/cmd/kueueviz/INSTALL.md
index 1c41c6076..28d69959d 100644
--- a/cmd/kueueviz/INSTALL.md
+++ b/cmd/kueueviz/INSTALL.md
@@ -3,7 +3,7 @@
 KueueViz can be installed using `kubectl` with the following command:
 
 ```
-kubectl create -f https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.2/kueueviz.yaml
+kubectl create -f https://github.com/kubernetes-sigs/kueue/releases/download/v0.13.3/kueueviz.yaml
 ```
 If you are using `kind` and that you don't have an `ingress` controller, you can use `port-forward` to 
 configure and run `KueueViz`:
@@ -23,7 +23,7 @@ by ensuring that `enableKueueViz` is set to `true`:
 
 ```
 helm upgrade --install kueue oci://registry.k8s.io/kueue/charts/kueue \
-  --version="0.13.2"
+  --version="0.13.3"
   --namespace kueue-system \
   --set enableKueueViz=true \
   --create-namespace
@@ -44,7 +44,7 @@ kind create cluster
 kind get kubeconfig > kubeconfig
 export KUBECONFIG=$PWD/kubeconfig
 helm install kueue oci://us-central1-docker.pkg.dev/k8s-staging-images/charts/kueue \
-            --version="0.13.2" --create-namespace --namespace=kueue-system
+            --version="0.13.3" --create-namespace --namespace=kueue-system
 ```
 
 ## Build
diff --git a/cmd/kueueviz/frontend/package-lock.json b/cmd/kueueviz/frontend/package-lock.json
index 1c6f03642..d19f355b6 100644
--- a/cmd/kueueviz/frontend/package-lock.json
+++ b/cmd/kueueviz/frontend/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "kueueviz-frontend",
-  "version": "0.13.2",
+  "version": "0.13.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "kueueviz-frontend",
-      "version": "0.13.2",
+      "version": "0.13.3",
       "license": "Apache 2.0",
       "dependencies": {
         "@emotion/react": "^11.14.0",
diff --git a/cmd/kueueviz/frontend/package.json b/cmd/kueueviz/frontend/package.json
index d63069d76..510a4ffed 100644
--- a/cmd/kueueviz/frontend/package.json
+++ b/cmd/kueueviz/frontend/package.json
@@ -1,6 +1,6 @@
 {
   "name": "kueueviz-frontend",
-  "version": "0.13.2",
+  "version": "0.13.3",
   "private": true,
   "description": "Frontend dashboard for visualizing Kueue status",
   "main": "src/index.jsx",
diff --git a/site/hugo.toml b/site/hugo.toml
index 582adebe2..fa1956023 100644
--- a/site/hugo.toml
+++ b/site/hugo.toml
@@ -99,10 +99,10 @@ ignoreFiles = []
   # The major.minor version tag for the version of the docs represented in this
   # branch of the repository. Used in the "version-banner" partial to display a
   # version number for this doc set.
-  version = "v0.13.2"
+  version = "v0.13.3"
 
   # Version of Kueue without the leading "v", as used for Helm charts.
-  chart_version = "0.13.2"
+  chart_version = "0.13.3"
 
   # Flag used in the "version-banner" partial to decide whether to display a
   # banner on every page indicating that this is an archived version of the docs.



Test patch:
diff --git a/pkg/controller/jobs/job/job_controller_test.go b/pkg/controller/jobs/job/job_controller_test.go
index 7d8a63093..ff2e105fa 100644
--- a/pkg/controller/jobs/job/job_controller_test.go
+++ b/pkg/controller/jobs/job/job_controller_test.go
@@ -393,6 +393,81 @@ func TestPodSets(t *testing.T) {
 			},
 			enableTopologyAwareScheduling: true,
 		},
+		"with slice-only topology": {
+			job: (*Job)(
+				jobTemplate.Clone().
+					Parallelism(3).
+					PodAnnotation(kueuealpha.PodSetSliceRequiredTopologyAnnotation, "cloud.com/block").
+					PodAnnotation(kueuealpha.PodSetSliceSizeAnnotation, "1").
+					Obj(),
+			),
+			wantPodSets: []kueue.PodSet{
+				*utiltesting.MakePodSet(kueue.DefaultPodSetName, 3).
+					PodSpec(jobTemplate.Clone().Spec.Template.Spec).
+					Annotations(map[string]string{
+						kueuealpha.PodSetSliceRequiredTopologyAnnotation: "cloud.com/block",
+						kueuealpha.PodSetSliceSizeAnnotation:             "1",
+					}).
+					PodIndexLabel(ptr.To(batchv1.JobCompletionIndexAnnotation)).
+					SliceRequiredTopologyRequest("cloud.com/block").
+					SliceSizeTopologyRequest(1).
+					Obj(),
+			},
+			enableTopologyAwareScheduling: true,
+		},
+		"with slice-only topology if TAS is disabled": {
+			job: (*Job)(
+				jobTemplate.Clone().
+					Parallelism(3).
+					PodAnnotation(kueuealpha.PodSetSliceRequiredTopologyAnnotation, "cloud.com/block").
+					PodAnnotation(kueuealpha.PodSetSliceSizeAnnotation, "1").
+					Obj(),
+			),
+			wantPodSets: []kueue.PodSet{
+				*utiltesting.MakePodSet(kueue.DefaultPodSetName, 3).
+					PodSpec(jobTemplate.Clone().Spec.Template.Spec).
+					Annotations(map[string]string{
+						kueuealpha.PodSetSliceRequiredTopologyAnnotation: "cloud.com/block",
+						kueuealpha.PodSetSliceSizeAnnotation:             "1",
+					}).
+					Obj(),
+			},
+			enableTopologyAwareScheduling: false,
+		},
+		"with slice-only topology – only podset slice required topology annotation": {
+			job: (*Job)(
+				jobTemplate.Clone().
+					Parallelism(3).
+					PodAnnotation(kueuealpha.PodSetSliceRequiredTopologyAnnotation, "cloud.com/block").
+					Obj(),
+			),
+			wantPodSets: []kueue.PodSet{
+				*utiltesting.MakePodSet(kueue.DefaultPodSetName, 3).
+					PodSpec(jobTemplate.Clone().Spec.Template.Spec).
+					Annotations(map[string]string{
+						kueuealpha.PodSetSliceRequiredTopologyAnnotation: "cloud.com/block",
+					}).
+					Obj(),
+			},
+			enableTopologyAwareScheduling: true,
+		},
+		"with slice-only topology – only podset slice size annotation": {
+			job: (*Job)(
+				jobTemplate.Clone().
+					Parallelism(3).
+					PodAnnotation(kueuealpha.PodSetSliceSizeAnnotation, "1").
+					Obj(),
+			),
+			wantPodSets: []kueue.PodSet{
+				*utiltesting.MakePodSet(kueue.DefaultPodSetName, 3).
+					PodSpec(jobTemplate.Clone().Spec.Template.Spec).
+					Annotations(map[string]string{
+						kueuealpha.PodSetSliceSizeAnnotation: "1",
+					}).
+					Obj(),
+			},
+			enableTopologyAwareScheduling: true,
+		},
 		"without preferred topology annotation if TAS is disabled": {
 			job: (*Job)(
 				jobTemplate.Clone().
diff --git a/pkg/util/testing/wrappers.go b/pkg/util/testing/wrappers.go
index 3b14765a5..3272119e4 100644
--- a/pkg/util/testing/wrappers.go
+++ b/pkg/util/testing/wrappers.go
@@ -464,6 +464,22 @@ func (p *PodSetWrapper) PodSetGroup(name string) *PodSetWrapper {
 	return p
 }
 
+func (p *PodSetWrapper) SliceRequiredTopologyRequest(level string) *PodSetWrapper {
+	if p.TopologyRequest == nil {
+		p.TopologyRequest = &kueue.PodSetTopologyRequest{}
+	}
+	p.TopologyRequest.PodSetSliceRequiredTopology = &level
+	return p
+}
+
+func (p *PodSetWrapper) SliceSizeTopologyRequest(size int32) *PodSetWrapper {
+	if p.TopologyRequest == nil {
+		p.TopologyRequest = &kueue.PodSetTopologyRequest{}
+	}
+	p.TopologyRequest.PodSetSliceSize = &size
+	return p
+}
+
 func (p *PodSetWrapper) PreferredTopologyRequest(level string) *PodSetWrapper {
 	if p.TopologyRequest == nil {
 		p.TopologyRequest = &kueue.PodSetTopologyRequest{}
diff --git a/test/e2e/kueueviz/package-lock.json b/test/e2e/kueueviz/package-lock.json
index b9df2da63..a18730072 100644
--- a/test/e2e/kueueviz/package-lock.json
+++ b/test/e2e/kueueviz/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "kueueviz-frontend-tests",
-  "version": "0.13.2",
+  "version": "0.13.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "kueueviz-frontend-tests",
-      "version": "0.13.2",
+      "version": "0.13.3",
       "devDependencies": {
         "@testing-library/cypress": "^10.0.3",
         "cypress": "^14.5.4",
diff --git a/test/e2e/kueueviz/package.json b/test/e2e/kueueviz/package.json
index b35460c0d..3562b27ac 100644
--- a/test/e2e/kueueviz/package.json
+++ b/test/e2e/kueueviz/package.json
@@ -1,6 +1,6 @@
 {
   "name": "kueueviz-frontend-tests",
-  "version": "0.13.2",
+  "version": "0.13.3",
   "scripts": {
     "cypress:run": "cypress run --headless",
     "check-unused": "depcheck"