User Manual: Remove old files for when deploying #7
No reviewers
Labels
No Label
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/blender-devops#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Blendify/blender-devops:manual-doc-rsync-delete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This ensures deleted files do not remain on the server and can still be indexed by search engines.
Similar to
832a15101c
Fixes blender/blender-manual#104500
@ -217,3 +217,3 @@
source_path = f"{builder.build_path}/{doc_format}/{locale}/"
dest_path = f"{connect_id}:{version_remote_path}/"
worker.utils.rsync(source_path, dest_path, exclude_paths=[".doctrees"])
# Exclude zip files so `--delete` does not delete existing archives
The comment can become more descriptive. It is possibly to deduct that
detete=True
and--exclude=*.zip
will preserve archives. But why is it needed? What the existing archives referred from the comment exactly are?There are html and epub zip files in the same folder, for downloading the manual. The epub zip in particular is uploaded by a builder that runs in parallel with this one.
Brecht is on sabbatical. I'm taking care of things he was responsible before.
The change is probably fine, but it would be very good to have a bit more explanation. See the inlined comment.
@ -218,2 +218,3 @@
dest_path = f"{connect_id}:{version_remote_path}/"
worker.utils.rsync(source_path, dest_path, exclude_paths=[".doctrees"])
# Exclude zip files so `--delete` does not delete existing archives
worker.utils.rsync(source_path, dest_path, exclude_paths=[".doctrees", ".*zip"], delete=True, delete_path_check=docs_remote_path)
I have not tested, but the pattern looks wrong and the folder could be more specific:
.*.zip
->*.zip
docs_remote_path
->version_remote_path
Should be good to go now.
@brecht @Sergey can this get reviewed and merged?
@Blendify Brecht is on sabbatical. There is also some internal stuff which keeps Bart busy. However, with 4.3 tracks getting under control now we should be able to tackle this PR.
The code looks correct now. Bart will help with deployment to UATEST and PROD, Iv've synced up with him in the blender-coders.