Skip to content

Conversation

@ikreymer
Copy link
Member

@ikreymer ikreymer commented Oct 9, 2023

Refactor the storage API to be consistent with other ops classes:

  • StorageOps class that unifies all storage related operations (except no db use)
  • Keep list of configured default storages (1 by default) in memory
  • Avoid having to use k8s to look up storage configurations

- create StorageOps class similar to other ops classes
- init storages list in StorageOps, no longer require lookup up default storages via CrawlManager
- convert all storage functions to members, add storageops to operator
crawls: just return empty list if not a crawl (eg. upload)
@ikreymer ikreymer requested a review from tw4l October 9, 2023 20:57
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Thanks, this is good cleanup and a nice step toward having multiple configured storages!

Edit: After discussing offline, removing my other suggestions/comments here as I think they will be better handled all at once in a separate PR introducing replication.

@ikreymer ikreymer merged commit 16e7a1d into main Oct 10, 2023
@ikreymer ikreymer deleted the storage-ops-refactor branch October 10, 2023 22:04
ikreymer added a commit that referenced this pull request Oct 11, 2023
- fix refactor typo
- add type hints for all storageops apis
ikreymer added a commit that referenced this pull request Oct 11, 2023
* storage ops: follow up to #1257:
- fix refactor typo
- add type hints for all storageops apis (add mypy_boto3_s3 and types_aiobotocore_s3 for type hints)
tw4l pushed a commit that referenced this pull request Oct 12, 2023
* storage ops: follow up to #1257:
- fix refactor typo
- add type hints for all storageops apis (add mypy_boto3_s3 and types_aiobotocore_s3 for type hints)
tw4l pushed a commit that referenced this pull request Oct 18, 2023
* storage ops: follow up to #1257:
- fix refactor typo
- add type hints for all storageops apis (add mypy_boto3_s3 and types_aiobotocore_s3 for type hints)
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.

3 participants