Skip to content

Conversation

@rescrv
Copy link
Contributor

@rescrv rescrv commented Oct 20, 2025

Description of changes

During bug-bash it was given feedback that update-metadata is
unergonomic. Step toward improving it.

Test plan

CI

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Contributor

Add From<T> Implementations for UpdateMetadataValue

This PR improves the ergonomics of the UpdateMetadataValue enum in rust/types/src/metadata.rs by adding From<T> trait implementations for several primitive and struct types. These changes make it easier and clearer to convert Rust primitive types and SparseVector instances into UpdateMetadataValue, streamlining metadata update workflows as requested by recent feedback.

Key Changes

• Added impl From<bool> for UpdateMetadataValue
• Added impl From<i64> for UpdateMetadataValue
• Added impl From<i32> for UpdateMetadataValue (casts to i64)
• Added impl From<f64> for UpdateMetadataValue
• Added impl From<f32> for UpdateMetadataValue (casts to f64)
• Added impl From<String> for UpdateMetadataValue
• Added impl From<&str> for UpdateMetadataValue
• Added impl From<SparseVector> for UpdateMetadataValue

Affected Areas

UpdateMetadataValue enum and conversions in rust/types/src/metadata.rs

This summary was automatically generated by @propel-code-bot

@rescrv rescrv requested a review from jasonvigil October 20, 2025 23:32
Copy link
Contributor

@jasonvigil jasonvigil left a comment

Choose a reason for hiding this comment

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

🥳

@rescrv rescrv merged commit ed1b2bf into main Oct 21, 2025
62 checks passed
@rescrv rescrv deleted the rescrv/update-metadata-value branch October 21, 2025 01:16
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.

4 participants