mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
Drop legacy candidate ordering helpers
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user