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

Refactor storage factory initialization #3709

Merged
merged 8 commits into from
Aug 5, 2023
Merged

Conversation

imotov
Copy link
Collaborator

@imotov imotov commented Aug 4, 2023

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.

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.
@imotov imotov requested a review from guilload August 4, 2023 01:18
#[derive(Default)]
pub struct AzureBlobStorageFactory;
pub struct AzureBlobStorageFactory {
storage_config: StorageConfig,
Copy link
Member

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?

@imotov imotov enabled auto-merge (squash) August 4, 2023 23:47
@imotov imotov merged commit e1ff124 into main Aug 5, 2023
3 checks passed
@imotov imotov deleted the imotov/refactor-storage-factory branch August 5, 2023 00:22
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants