Skip to content

RHOAIENG-54719 fix list_local_queues KeyError on missing status#1058

Merged
openshift-merge-bot[bot] merged 1 commit into
project-codeflare:mainfrom
DavidAdaRH:RHOAIENG-54719
May 18, 2026
Merged

RHOAIENG-54719 fix list_local_queues KeyError on missing status#1058
openshift-merge-bot[bot] merged 1 commit into
project-codeflare:mainfrom
DavidAdaRH:RHOAIENG-54719

Conversation

@DavidAdaRH
Copy link
Copy Markdown
Contributor

@DavidAdaRH DavidAdaRH commented Apr 14, 2026

Issue link

https://redhat.atlassian.net/browse/RHOAIENG-54719

What changes have been made

  • list_local_queues() (kueue.py): stop indexing lq["status"] directly. Use lq_status = lq.get("status") or {} before checking flavors, so missing or null status does not raise KeyError, queues still appear (usually without a flavors key until Kueue reconciles).

  • Tests (test_kueue.py): test_list_local_queues_no_status covers no status, status: None, and normal flavor filtering.

Verification steps

  • Unit tests: poetry run pytest src/codeflare_sdk/common/kueue/test_kueue.py -q
  • Manual (cluster with Kueue): create a LocalQueue, call list_local_queues(namespace=...) immediately (or run the verification notebook); confirm no KeyError and entries without flavors when status is not ready yet.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@DavidAdaRH DavidAdaRH self-assigned this Apr 14, 2026
@DavidAdaRH DavidAdaRH added test-guided-notebooks Run PR check to verify Guided notebooks test-ui-notebooks Run PR check to verify UI notebooks test-additional-notebooks labels Apr 14, 2026
@openshift-ci openshift-ci Bot requested review from Fiona-Waters and dimakis April 14, 2026 14:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.52%. Comparing base (d2ae1fb) to head (9431491).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1058   +/-   ##
=======================================
  Coverage   96.52%   96.52%           
=======================================
  Files          23       23           
  Lines        2271     2272    +1     
=======================================
+ Hits         2192     2193    +1     
  Misses         79       79           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@kryanbeane kryanbeane left a comment

Choose a reason for hiding this comment

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

nice one David, lgtm👍🏻

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kryanbeane

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 May 18, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit deca5d4 into project-codeflare:main May 18, 2026
20 of 38 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. test-additional-notebooks test-guided-notebooks Run PR check to verify Guided notebooks test-ui-notebooks Run PR check to verify UI notebooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants