Skip to content

chore(model,rpc): move conversion to/from RPC to rpc crate#1779

Draft
poroh wants to merge 1 commit into
NVIDIA:mainfrom
poroh:rpc-conversion-in-rpc-crate
Draft

chore(model,rpc): move conversion to/from RPC to rpc crate#1779
poroh wants to merge 1 commit into
NVIDIA:mainfrom
poroh:rpc-conversion-in-rpc-crate

Conversation

@poroh
Copy link
Copy Markdown
Contributor

@poroh poroh commented May 18, 2026

Description

Move all conversion to RPC crate. Model dependency is compiled under "model" feature flag.
Handful of types required custom conversion trait (RpcTryFrom/RpcFrom) because these conversions are defined for external types (like Option<rpc::Instance>).

Dependency from DB to RPC is still in place, so, compilation speed up is not there yet.

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@poroh poroh requested a review from a team as a code owner May 18, 2026 19:47
pub history: Vec<StateHistoryRecord>,
}

impl TryFrom<DpaInterfaceSnapshotPgJson> for DpaInterface {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review note: this conversion was wrongly moved to RPC.

Static,
}

impl From<AddressSelectionStrategy> for AllocationType {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review note: this was wrongly moved to RPC.

Err(_) => "".to_owned(),
};
stdout_str = stdout_str + &message;
stdout_str += message.as_str();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review note: for some unknown reasons compiler started complain on inability to add &String to String.

tracing::debug!("family_indicator is {0}", spec_version);

let vendor = vendor_1.clone() + &vendor_2;
let vendor = vendor_1.clone() + vendor_2.as_str();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review note: for some unknown reasons compiler started complain on inability to add &String to String.

@poroh poroh force-pushed the rpc-conversion-in-rpc-crate branch from 9ab1437 to 59b9ca9 Compare May 18, 2026 19:57
@poroh poroh marked this pull request as draft May 18, 2026 20:46
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 18, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Signed-off-by: Dmitry Porokh <dporokh@nvidia.com>
@poroh poroh force-pushed the rpc-conversion-in-rpc-crate branch from 59b9ca9 to 7ade8ca Compare May 19, 2026 00:18
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.

1 participant