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

B2-119 Make persistent test buckets auto-clean files #316

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

joao-vieira-leao-reef
Copy link

@joao-vieira-leao-reef joao-vieira-leao-reef commented Jan 14, 2025

Builds on previous work with Persistent Buckets. This now keeps track of used folders in the persistent bucket and cleans files without having to wait for B2's lifecycle rules.

  • used random folder generation to track used files through testing sessions
  • extended clean_files function to allow for cleaning some folders from a bucket without deleting it

- used random folder generation to track used files through testing sessions
- extended clean_files function to allow for cleaning some folders from a bucket without deleting it
@@ -131,6 +132,10 @@ def bucket_name_part(length: int) -> str:
logger.info('name_part: %s', name_part)
return name_part

T = TypeVar('T')
def wrap_iterables(generators: list[Iterable[T]]):

Choose a reason for hiding this comment

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

why not itertools.chain?

Choose a reason for hiding this comment

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

tried that before, itertools.chain was returning a iterator of iterators instead. I could try again and see what went wrong though

@pull pull bot merged commit cf9efa2 into reef-technologies:master Jan 14, 2025
51 of 62 checks passed
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