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

feat(BA-533): Add delete path API to storage watcher #3548

Open
wants to merge 2 commits into
base: topic/12-20-feat_enable_per-user_uid_gid_set_for_containers
Choose a base branch
from

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Jan 24, 2025

resolves #3483 (BA-533)

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fregataa fregataa changed the title feat: Add delete path API to storage watcher feat(BA-533): Add delete path API to storage watcher Jan 24, 2025
@fregataa fregataa marked this pull request as ready for review January 24, 2025 17:58
@fregataa fregataa requested a review from HyeockJinKim January 24, 2025 17:58
Comment on lines +687 to +691
elif p.is_file():
if self.watcher is not None:
await self.watcher.request_task(DeletePathTask(p))
else:
await aiofiles.os.remove(p)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe there might be a better way to decide whether the watcher should monitor, rather than using if statements for branching.
At the very least, is there a way to wrap the file removal and write operations at the time of creation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:storage-proxy Related to Storage proxy component size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants