Skip to content

Commit

Permalink
[CLN] Add debug for rust storage from config (#2105)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Storage from config debug
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
  • Loading branch information
HammadB authored May 1, 2024
1 parent 7b51ca9 commit e9bfb66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/worker/src/storage/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde::Deserialize;
use std::path::Path;

#[derive(Deserialize)]
#[derive(Deserialize, Debug)]
/// The configuration for the chosen storage.
/// # Options
/// - S3: The configuration for the s3 storage.
Expand All @@ -22,7 +22,7 @@ pub(crate) enum S3CredentialsConfig {
AWS,
}

#[derive(Deserialize)]
#[derive(Deserialize, Debug)]
/// The configuration for the s3 storage type
/// # Fields
/// - bucket: The name of the bucket to use.
Expand All @@ -31,7 +31,7 @@ pub(crate) struct S3StorageConfig {
pub(crate) credentials: S3CredentialsConfig,
}

#[derive(Deserialize)]
#[derive(Deserialize, Debug)]
/// The configuration for the local storage type
/// # Fields
/// - root: The root directory to use for storage.
Expand Down
1 change: 1 addition & 0 deletions rust/worker/src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ impl ChromaError for StorageConfigError {
#[async_trait]
impl Configurable<StorageConfig> for S3Storage {
async fn try_from_config(config: &StorageConfig) -> Result<Self, Box<dyn ChromaError>> {
println!("Creating storage with config: {:?}", config);
match &config {
StorageConfig::S3(s3_config) => {
let client = match &s3_config.credentials {
Expand Down

0 comments on commit e9bfb66

Please sign in to comment.