Skip to content

chore(ci): clippy cleanups#55

Merged
sgopinath1 merged 1 commit into
ROCm:mainfrom
sgopinath1:clippy_fixes
Jun 2, 2026
Merged

chore(ci): clippy cleanups#55
sgopinath1 merged 1 commit into
ROCm:mainfrom
sgopinath1:clippy_fixes

Conversation

@sgopinath1

Copy link
Copy Markdown
Collaborator

Resolve Clippy warnings without allow(dead_code) or allow(too_many_arguments): use parameter structs for session/Spur client calls, expose unused DB/API fields, trim OIDC types, and apply small lint fixes (trim/split_whitespace, needless borrows, WS ping).

Pin spur-proto to the ROCm/spur v0.3.0 git tag instead of tracking main so Cargo.lock is stable and cargo clippy --locked works.

Also align frontend Session/UserProfile types with the API.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on resolving Rust Clippy warnings and stabilizing dependency resolution, while also aligning API/DB models and frontend types as fields are exposed/trimmed (sessions, users, OIDC).

Changes:

  • Refactors session/spur client call sites to use parameter structs and introduces NewSession for DB insertion.
  • Exposes additional session/user fields across backend models and frontend API typings (e.g., partition, pod_name, spur_account, auth_provider, last_login_at).
  • Pins spur-proto to the ROCm/spur v0.3.0 git tag and adjusts CI to run cargo clippy --locked.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/api/client.ts Aligns frontend Session/UserProfile types with API fields.
crates/spur-cloud-common/src/session_types.rs Renames SessionState::from_str to parse and removes unused default helper.
crates/spur-cloud-api/src/update.rs Adds debug logging when spawning startup update checks.
crates/spur-cloud-api/src/terminal/ws_handler.rs Minor WS ping cleanup and adjusts retry assertions to satisfy lints.
crates/spur-cloud-api/src/spur_client.rs Introduces parameter structs for Spur operations; adds user/account fields to submitted JobSpec.
crates/spur-cloud-api/src/routes/users.rs Small lint cleanups for SSH key parsing and base64 encoding.
crates/spur-cloud-api/src/routes/sessions.rs Uses NewSession, updates Spur client calls to parameter structs, and adds native-host user lookup.
crates/spur-cloud-api/src/models/user.rs Exposes spur_account, auth_provider, and last_login_at on UserProfile.
crates/spur-cloud-api/src/models/session.rs Adds NewSession helper and exposes partition/pod_name on SessionDetail.
crates/spur-cloud-api/src/main.rs Updates SessionState parsing call sites to parse.
crates/spur-cloud-api/src/db/user_repo.rs Removes unused repo functions to satisfy dead-code lints.
crates/spur-cloud-api/src/db/session_repo.rs Refactors create_session to take a NewSession struct and removes unused get_session.
crates/spur-cloud-api/src/auth/okta.rs Adds issuer validation for Okta ID tokens.
crates/spur-cloud-api/src/auth/oidc_common.rs Trims OIDC discovery/token types and adds iss + issuer validation helper.
Cargo.toml Pins spur-proto to tag v0.3.0.
Cargo.lock Updates lockfile to reflect pinned spur-proto and transitive dependency changes.
.github/workflows/ci.yml Updates Clippy job to use --locked.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/spur-cloud-api/src/routes/sessions.rs
Comment thread crates/spur-cloud-api/src/routes/sessions.rs
Comment thread frontend/src/api/client.ts
Comment thread .github/workflows/ci.yml Outdated
Resolve Clippy warnings without allow(dead_code) or
allow(too_many_arguments): use parameter structs for session/Spur
client calls, expose unused DB/API fields, trim OIDC types, and apply
small lint fixes (trim/split_whitespace, needless borrows, WS ping).

Pin spur-proto to the ROCm/spur v0.3.0 git tag instead of tracking
main so Cargo.lock is stable and `cargo clippy --locked` works.

Also align frontend Session/UserProfile types with the API.
@sgopinath1 sgopinath1 merged commit be85ec6 into ROCm:main Jun 2, 2026
4 of 5 checks passed
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.

3 participants