-
Notifications
You must be signed in to change notification settings - Fork 415
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
Refactor storage factory initialization #3709
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For #3443 I need to be able to perform initialization on storage factory level and in order to do that I need access to the config parameters during initialization rather than during storage resolution. This PR moves the storage config parameters to the storage initializer.
guilload
approved these changes
Aug 4, 2023
quickwit/quickwit-storage/src/object_storage/azure_blob_storage.rs
Outdated
Show resolved
Hide resolved
#[derive(Default)] | ||
pub struct AzureBlobStorageFactory; | ||
pub struct AzureBlobStorageFactory { | ||
storage_config: StorageConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use an AzureStorageConfig
directly?
quickwit/quickwit-storage/src/object_storage/s3_compatible_storage_resolver.rs
Outdated
Show resolved
Hide resolved
…e.rs Co-authored-by: Adrien Guillo <[email protected]>
…rage_resolver.rs Co-authored-by: Adrien Guillo <[email protected]>
mgattozzi
added a commit
to mgattozzi/quickwit
that referenced
this pull request
Aug 10, 2023
In quickwit-oss#3709 there was a refactor that removed `StorageConfig` from the scope of the changed file in this commit. This was fine as the function `register` in StorageResolveBuilder did not need it anymore. However, the docs alluded to registering both a factory and a config. When running `make build-docs` for a different change I ran into this causing the command to fail. This change updates the docs so that they can build properly again.
fulmicoton
pushed a commit
that referenced
this pull request
Aug 11, 2023
In #3709 there was a refactor that removed `StorageConfig` from the scope of the changed file in this commit. This was fine as the function `register` in StorageResolveBuilder did not need it anymore. However, the docs alluded to registering both a factory and a config. When running `make build-docs` for a different change I ran into this causing the command to fail. This change updates the docs so that they can build properly again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For #3443 I need to be able to perform initialization on storage factory level and in order to do that I need access to the config parameters during initialization rather than during storage resolution. This PR moves the storage config parameters to the storage initializer.
How was this PR tested?
By running existing tests.