-
Notifications
You must be signed in to change notification settings - Fork 494
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
NAS-129400 / 24.10 / Remove kubernetes implementation #13841
Conversation
) | ||
if not dataset: | ||
test_path = os.path.join('/mnt', dataset_name) | ||
if await self.middleware.run_in_thread(os.path.exists, test_path): |
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.
You're creating 2 threads everytime this method is called to perform a shutil.move
which is unnecessary.
This is prone to TOCTOU issues as well so you can simply do shutil.move
and catch FileNotFoundError
since it'll fail if test_path
doesn't exist.
994d7a2
to
7428fd8
Compare
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.
LGTM!
This PR has been merged and conversations have been locked. |
This PR adds changes removing kubernetes integration and adding basic integration for new catalog management.
(Docker is not configurable with these changes atm and neither are we creating it's state atm (mounting apps dataset changes will be reflected in the next PR as well), those changes will be introduced in another PR)