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

fix: Move submission files using shutil.move() #6217

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

jennifer-richards
Copy link
Member

Fixes #6216

The change to rename_submission_files() is not strictly required because both source and dest are in the same directory so cannot be on different filesystems. However, shutil.move() uses os.rename() in this case so I think it's better to use it consistently.

Also switches some os.path.join to pathlib.Path - this works for Python 3.9 and later, which I believe is all we're supporting now, but calling it out in case I'm confused.

@rjsparks
Copy link
Member

this works for Python 3.9 and later, which I believe is all we're supporting now

That is correct.

@rjsparks
Copy link
Member

Quirk of current deployment to keep in mind:

The archive is built from collections using ghostlinkd, which runs over a set of collections of drafts, one of which is the repository. Ghostlinkd necessarily works on a single filesystem (it watches the filesystem and makes hard links to construct the archive. (See https://github.com/ietf-tools/ghostlinkd)

This will change when we move off of a shared filesystem.

@rjsparks rjsparks merged commit c65cd20 into ietf-tools:main Aug 25, 2023
7 checks passed
@jennifer-richards jennifer-richards deleted the move-not-rename branch August 25, 2023 16:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

post_submission makes poor assumptions about file systems
2 participants