Skip to content

Conversation

@itsomri
Copy link
Collaborator

@itsomri itsomri commented Nov 11, 2025

Description

This PR makes the KAI operator use the scheduler conf object instead of an internal object. It also fixes serialization to and from YAML by using the k8s yaml package and time.Duration types, instead of the native go int representation. Behavior should remain the same.

Checklist

Note: Ensure your PR title follows the Conventional Commits format (e.g., feat(scheduler): add new feature)

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated CHANGELOG.md (if needed)
  • Updated documentation (if needed)

Breaking Changes

N/A

Additional Notes

N/A

davidLif
davidLif previously approved these changes Nov 11, 2025
davidLif
davidLif previously approved these changes Nov 11, 2025
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/env-tests/timeaware 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache 35.14% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api 29.85% (-31.69%) 💀 💀 💀
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/fake 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/prometheus 19.15% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util 80.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/env-tests/timeaware/timeaware.go 0.00% (ø) 150 0 150
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (ø) 34 18 16
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/cache.go 53.79% (ø) 132 71 61
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/defaults.go 50.00% (-5.88%) 30 (-4) 15 (-4) 15 👎
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/interface.go 13.51% (-86.49%) 37 (+32) 5 32 (+32) 💀 💀 💀 💀 💀
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/fake/fake_with_history.go 0.00% (ø) 51 0 51
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/prometheus/prometheus.go 19.15% (ø) 94 18 76
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf/scheduler_conf.go 0.00% (ø) 15 0 15
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util/scheduler_conf_util.go 80.00% (ø) 40 32 8

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/usage_params_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util/scheduler_conf_util_test.go

@itsomri itsomri enabled auto-merge (squash) November 11, 2025 15:43
@itsomri itsomri force-pushed the omric/refactor-scheduler-conf-unmarshall branch from 0b04d2f to 7ad90c5 Compare November 11, 2025 15:43
@itsomri itsomri merged commit 4f003fc into main Nov 11, 2025
4 checks passed
@itsomri itsomri deleted the omric/refactor-scheduler-conf-unmarshall branch November 11, 2025 16:14
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/env-tests/timeaware 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache 35.14% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api 29.85% (-31.69%) 💀 💀 💀
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/fake 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/prometheus 19.15% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util 80.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/env-tests/timeaware/timeaware.go 0.00% (ø) 150 0 150
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (ø) 34 18 16
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/cache.go 53.79% (ø) 132 71 61
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/defaults.go 50.00% (-5.88%) 30 (-4) 15 (-4) 15 👎
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/interface.go 13.51% (-86.49%) 37 (+32) 5 32 (+32) 💀 💀 💀 💀 💀
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/fake/fake_with_history.go 0.00% (ø) 51 0 51
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/prometheus/prometheus.go 19.15% (ø) 94 18 76
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf/scheduler_conf.go 0.00% (ø) 15 0 15
github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util/scheduler_conf_util.go 80.00% (ø) 40 32 8

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/cache/usagedb/api/usage_params_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/scheduler/conf_util/scheduler_conf_util_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants