Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: add Rust SQLite impl of log #3577

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

codetheweb
Copy link
Contributor

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Copy link
Contributor Author

codetheweb commented Jan 28, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

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)

@codetheweb codetheweb force-pushed the feat-log-interface-push-logs branch from a9ccc20 to e5b3a38 Compare January 28, 2025 18:43
@codetheweb codetheweb force-pushed the feat-log-interface-push-logs branch from e5b3a38 to 0d7ffbc Compare January 28, 2025 22:27
@codetheweb codetheweb force-pushed the feat-log-interface-push-logs branch from 0d7ffbc to eff727f Compare January 28, 2025 22:42
@codetheweb codetheweb force-pushed the feat-log-interface-push-logs branch from eff727f to 206fb61 Compare January 28, 2025 23:07
Copy link
Contributor

@rescrv rescrv left a comment

Choose a reason for hiding this comment

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

Partial review as it looks like there's some TODOs left.

InvalidEmbedding(bytemuck::PodCastError),
#[error("Failed to parse metadata: {0}")]
InvalidMetadata(#[from] serde_json::Error),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to embed types like bytemuck, sqlx, and serde_json? They aren't serializable. Errors might be nice to have go across the network.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thought about this a bit more and I'm not sure how applicable this is since many of our current errors aren't serializable either
however they all have .to_string() which is trivial to serialize

rust/log/src/sqlite_log.rs Outdated Show resolved Hide resolved
@codetheweb codetheweb force-pushed the feat-sqlite-log branch 3 times, most recently from 48d298e to 86bb7d3 Compare January 29, 2025 00:31
@codetheweb codetheweb changed the base branch from feat-log-interface-push-logs to graphite-base/3577 January 29, 2025 00:38
@codetheweb codetheweb force-pushed the feat-sqlite-log branch 4 times, most recently from 5406e83 to 0b5f332 Compare January 29, 2025 01:27
@codetheweb codetheweb changed the base branch from graphite-base/3577 to main January 29, 2025 01:34
}

#[cfg(test)]
mod tests {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: need to fix tests once we can run migrations from Rust

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.

2 participants