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

Add option to archive the workdir #980

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

arhall0
Copy link
Collaborator

@arhall0 arhall0 commented Dec 16, 2024

Adds the option to archive the workdir when using beeflow submit by adding the --archive-workdir flag. Checks the workdir isn't too large: too large file size (>1000 MB), contains too many files (>10,000), contains too many directories (>1000). If it is, prompts user to verify.

Could potentially add a config option for this to always attempt to archive the workdir. Currently that isn't implemented.

@arhall0 arhall0 added enhancement New feature or request WIP Work in progress labels Dec 16, 2024
@arhall0 arhall0 linked an issue Dec 16, 2024 that may be closed by this pull request
@@ -312,6 +314,51 @@ def is_parent(parent, path):
if os.path.commonpath([os.path.realpath('/var/tmp'), workdir]) == os.path.realpath('/var/tmp'):
error_exit("Workflow working directory cannot be in \"/var/tmp\"")

# TODO: this should be in a function somewhere
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried to find some kind of python package that would do this logic, but didn't come up with anything.

I'm not sure the best place to put this function. It should likely also have some tests.

@arhall0 arhall0 self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workdir Should be Added to the Archive (Potentially)
1 participant