Drop legacy candidate ordering helpers

This commit is contained in:
fawney19
2026-04-27 14:54:56 +08:00
parent 8d2cbf32df
commit 2101a4ecc7
7 changed files with 23 additions and 235 deletions

View File

@@ -1,6 +1,6 @@
pub(super) use aether_scheduler_core::{
build_scheduler_affinity_cache_key_for_api_key_id, candidate_affinity_hash, candidate_key,
compare_affinity_order, matches_affinity_target, SchedulerAffinityTarget,
matches_affinity_target, SchedulerAffinityTarget,
};
use crate::data::auth::GatewayAuthApiKeySnapshot;

View File

@@ -381,7 +381,6 @@ fn scheduler_candidate_runtime_paths_depend_on_scheduler_core_and_state_trait()
);
for pattern in [
"candidate_affinity_hash",
"compare_affinity_order",
"matches_affinity_target",
"candidate_key",
] {
@@ -483,14 +482,12 @@ fn scheduler_candidate_runtime_paths_depend_on_scheduler_core_and_state_trait()
assert!(
workspace_file_exists("crates/aether-scheduler-core/src/candidate/selection.rs"),
"core candidate/selection.rs should host legacy selection compatibility helpers"
"core candidate/selection.rs should host legacy minimal selection compatibility helper"
);
let core_candidate_selection =
read_workspace_file("crates/aether-scheduler-core/src/candidate/selection.rs");
for expected in [
"build_minimal_candidate_selection",
"collect_selectable_candidates_from_keys",
"reorder_candidates_by_scheduler_health",
"apply_scheduler_candidate_ranking",
] {
assert!(
@@ -498,6 +495,16 @@ fn scheduler_candidate_runtime_paths_depend_on_scheduler_core_and_state_trait()
"core candidate/selection.rs should host compatibility helper {expected}"
);
}
for forbidden in [
"collect_selectable_candidates_from_keys",
"reorder_candidates_by_scheduler_health",
"compare_candidates_by_priority_mode",
] {
assert!(
!core_candidate_selection.contains(forbidden),
"core candidate/selection.rs should not keep removed legacy helper {forbidden}"
);
}
let affinity_cache = read_workspace_file("apps/aether-gateway/src/cache/scheduler_affinity.rs");
assert!(