Skip to content

[release-1.4] Adapt AFS resource weights test to specify memory value#2077

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-1.4from
openshift-cherrypick-robot:cherry-pick-2062-to-release-1.4
Jun 25, 2026
Merged

[release-1.4] Adapt AFS resource weights test to specify memory value#2077
openshift-merge-bot[bot] merged 1 commit into
openshift:release-1.4from
openshift-cherrypick-robot:cherry-pick-2062-to-release-1.4

Conversation

@openshift-cherrypick-robot

@openshift-cherrypick-robot openshift-cherrypick-robot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #2062

/assign MaysaMacedo

Summary by CodeRabbit

  • Tests
    • Enhanced fair sharing validation tests with improved resource weight scenarios to better verify queue admission behavior.

This commit adapts the resource weights to add
a normalized weight for memory to cover the scenario
of specification of memory resources.
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: ab29b59e-1f20-4484-9f11-9265bcc806d3

📥 Commits

Reviewing files that changed from the base of the PR and between e4fc8dc and b665fc1.

📒 Files selected for processing (1)
  • test/e2e/e2e_admission_fair_sharing_test.go

Walkthrough

The resourceWeights e2e fair-sharing subtest is rewritten: ResourceWeights changes from CPU-only (cpu=10, memory=0) to CPU+memory (cpu=2, memory=1/GiB), ClusterQueue memory is reduced from 2Gi to 1Gi, a lq-mem-heavy queue and job-mem-heavy job replace the old CPU-light path, and the post-deletion admission expectation now favors the memory-heavy pending workload.

Changes

resourceWeights Fair-Sharing E2E Rewrite

Layer / File(s) Summary
ResourceWeights config and ClusterQueue capacity
test/e2e/e2e_admission_fair_sharing_test.go
ResourceWeights updated from cpu=10, memory=0 to cpu=2, memory=1/GiB using a computed weightMemory value; ClusterQueue memory capacity reduced from 2Gi to 1Gi.
Queue, job, usage, and admission scenario
test/e2e/e2e_admission_fair_sharing_test.go
Adds lq-mem-heavy LocalQueue and job-mem-heavy admitted job; removes the old CPU-light queue path; expands consumedResources assertions to require non-zero values for both CPU and memory; changes pending-job admission expectation after deletion to favor job-2-pending (memory-heavy queue) over job-1-pending (CPU-heavy queue).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • openshift/kueue-operator#2032: Updates the same resourceWeights test case in e2e_admission_fair_sharing_test.go by changing ClusterQueue resource quantities and expected admission outcomes.
  • openshift/kueue-operator#2062: Modifies the same e2e test with nearly identical changes — CPU/memory weight normalization, 2Gi→1Gi ClusterQueue memory, and updated LocalQueue/job/admission assertions.

Suggested labels

lgtm

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning The test calls checkWorkloadCondition() 7 times, but this function is not defined in the test file (only defined in e2e_preemption_test.go). This is a compilation error. Add checkWorkloadCondition function definition to e2e_admission_fair_sharing_test.go or import it from a shared location.
Microshift Test Compatibility ⚠️ Warning The test should deprioritize the queue with higher weighted CPU usage... in test/e2e/e2e_admission_fair_sharing_test.go uses the kueue.openshift.io/v1 Kueue operator API. Kueue is not support... Add [apigroup:kueue.openshift.io] tag to the test name to automatically skip it on MicroShift, or add [Skipped:MicroShift] label, or guard with exutil.IsMicroShiftCluster() check.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adapting the AFS resource weights test to specify a memory value for the release-1.4 branch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test names in the modified test file are stable and deterministic with no dynamic values, generated suffixes, timestamps, UUIDs, node names, namespace names with random suffixes, IP addr...
Single Node Openshift (Sno) Test Compatibility ✅ Passed New test "should deprioritize the queue with higher weighted CPU usage..." added in PR does not assume multi-node deployment; all jobs can coexist on single node with no affinity/topology constraints.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only a test file (e2e_admission_fair_sharing_test.go). The custom check applies to "deployment manifests, operator code, or controllers," which are not changed here.
Ote Binary Stdout Contract ✅ Passed All stdout write operations are confined to test case contexts (It, BeforeEach, DeferCleanup, Eventually blocks). No process-level stdout writes in main(), init(), BeforeSuite(), AfterSuite(), or t...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Test does not contain IPv4 hardcoded addresses, localhost assumptions, IP parsing, CIDR blocks, or IPv4-only network policies. Operations are cluster-internal via Kubernetes API calls.
No-Weak-Crypto ✅ Passed The modified test file contains no weak cryptography usage, custom crypto implementations, or non-constant-time secret comparisons. The PR modifies a Kubernetes scheduler test unrelated to cryptogr...
Container-Privileges ✅ Passed PR modifies only test code (e2e_admission_fair_sharing_test.go) with no privileged container configurations; all security contexts properly configured with RunAsNonRoot, AllowPrivilegeEscalation=fa...
No-Sensitive-Data-In-Logs ✅ Passed The test file contains only logging of timestamps, auto-generated namespace names, numeric metrics, and configuration values. No passwords, tokens, API keys, PII, session IDs, hostnames, or custome...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@kannon92 kannon92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kannon92, openshift-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD e4fc8dc and 2 for PR HEAD b665fc1 in total

@kannon92

Copy link
Copy Markdown
Contributor

/retest

@kannon92

Copy link
Copy Markdown
Contributor

/override ci/prow/test-e2e-ci-build-upstream-4-21

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

@kannon92: Overrode contexts on behalf of kannon92: ci/prow/test-e2e-ci-build-upstream-4-21

Details

In response to this:

/override ci/prow/test-e2e-ci-build-upstream-4-21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/upgrade-from-4.18-e2e-upgrade-4-18-to-4-19-kueue-1-4 b665fc1 link false /test upgrade-from-4.18-e2e-upgrade-4-18-to-4-19-kueue-1-4
ci/prow/upgrade-from-4.20-e2e-upgrade-4-20-to-4-21-kueue-1-4 b665fc1 link false /test upgrade-from-4.20-e2e-upgrade-4-20-to-4-21-kueue-1-4
ci/prow/upgrade-from-4.19-e2e-upgrade-4-19-to-4-20-kueue-1-4 b665fc1 link false /test upgrade-from-4.19-e2e-upgrade-4-19-to-4-20-kueue-1-4
ci/prow/test-e2e-ci-build-upstream-4-21 b665fc1 link true /test test-e2e-ci-build-upstream-4-21

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 2472e5c into openshift:release-1.4 Jun 25, 2026
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants