fix: resolve dead code and unused import warnings across 9 crates#155
Merged
fix: resolve dead code and unused import warnings across 9 crates#155
Conversation
These three subcommands were missing from the argv[0] symlink dispatch block, making their main() wrappers dead code. Also removes an unused std::io::Read import in image.rs.
Drop unused `std::io::Read` import in credential parsing and remove a `media_type` clone that was never consumed (the actual check reads directly from the manifest). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…e_nodes Co-authored-by: Cursor <cursoragent@cursor.com>
…vocations Remove unused CString and tracing::error imports. Include plugin .so path in debug/warn log lines so operators can identify the source file when a hook fails or is missing. Co-authored-by: Cursor <cursoragent@cursor.com>
Move QosLimits import into the test module where it is actually used. JobState was entirely unused. Co-authored-by: Cursor <cursoragent@cursor.com>
…e to "any" The inline gres formatting in to_core_job_spec already defaulted to "any" when no GPU type was specified. Align gpu_request_to_gres with this behavior so the scheduler always receives a typed gres string (e.g. "gpu:any:4" instead of "gpu:4"), which avoids ambiguity during GRES matching on nodes that advertise typed GPU resources. Co-authored-by: Cursor <cursoragent@cursor.com>
The state field on JobsQuery was deserialized but never used, causing a dead_code warning. Parse the comma-separated state parameter into JobState values and pass them to the gRPC request so the filter works. Co-authored-by: Cursor <cursoragent@cursor.com>
The effective_priority function in fairshare.rs was a pass-through to spur_sched::priority::effective_priority with no added logic. Remove it and drop the now-unused spur-sched dependency from spurdbd. Co-authored-by: Cursor <cursoragent@cursor.com>
Add debug_fail helper and cluster baseline preamble so CI logs capture node states, queue, and daemon logs when tests fail. Co-authored-by: Cursor <cursoragent@cursor.com>
05bceeb to
a2e5362
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Systematic cleanup of Rust compiler warnings (dead code, unused imports, unused variables) across the spur codebase. Each crate is addressed in a separate commit.
What was fixed
spur-cli5f75e37exec,image,netcommands + remove unused importspur-net13ce8fdoci.rsspur-ffi0118a88std::ptrimportspur-schedc39db07partitionsparameter fromfind_suitable_nodesspur-spank7e8a102spur-core022b1efQosLimitsandJobStateimports fromqos.rsspur-k8s4017a04gpu_request_to_gresin CRD conversion (was duplicating logic), default GPU type to"any"spurrestd64ff2a1statequery param into theget_jobsfilter — it was deserialized but silently ignoredspurdbdec7de77effective_prioritywrapper that just delegated tospur_sched::priority::effective_priority, drop unusedspur-scheddepWarning status after this branch
spur-clispur-netspur-ffispur-schedspur-spankspur-corespur-k8sspurrestdspurdbdcompute_fairshare+period_start— planned code awaiting wiringspurdspurctldspur-testsDeferred to follow-up
spurdbd(2 warnings):compute_fairshareandUsageRecord.period_startare scaffolded for fair-share scheduling but not wired yet. The wiring work is onfeat/fairshare-wiringand will be revisited separately.spurd(23),spurctld(25),spur-tests(3): Will be addressed in a follow-up PR.