Warn strongly if the rsync file syncer is not in use

Created on 19 April 2023, over 1 year ago
Updated 2 June 2023, over 1 year ago

Problem/Motivation

Travis Carden wrote:

Okay, so first of all, why donā€™t we create a backup copy of the original codebase and try to restore from it if committing the stage directory doesnā€™t work? I think thatā€™s a good idea on one level, but it would be vulnerable to the same problem it would exist to correct--namely, the file syncer just failed to sync from the staging directory, so we use the same file syncer to sync from the backup directory. Assuming the ambient conditions havenā€™t changed (in the ~seconds) between the two operations, the restore operation seems just as likely to fail for the same reason as the commit. (You know what would be nice? A Git-based file syncer that could just test for a dirty working directory to see if the site is in a broken state and restore it via `git reset --hard`. Maybe someday, huh? :)

Second, does Composer Stager know how far along it is in the copying process? No, it doesnā€™t. In the case of the rsync file syncer, I donā€™t know if thereā€™s a way it could know. In the case of the PHP file syncer, such an ability could conceivably be added.

Turns out that we don't particularly encourage the use of rsync, which does perform integrity checks. I think it's great that we have a fallback mechanism (the "PHP" file syncer), but if rsync is available, we really should recommend using it! Because rsync always performs integrity checks, and in a much more performant way than we ever could. Plus, they have decades of battle hardening!

Furthermore, since šŸ“Œ Add symlink support to Composer Stager 2.0, require that version, and simplify UX & tests accordingly Fixed , it is already a requirement to use the rsync file syncer anyway if there are >0 symlinks to directories present in the codebase.

Steps to reproduce

N/A

Proposed resolution

  1. Status report entry that strongly recommends the use of rsync and warns the user if that's not being used.
  2. Detect presence of rsync during installation and then automatically switch to rsync instead of php file syncer (which is the sensible default: it always works).

Remaining tasks

User interface changes

API changes

None.

Data model changes

None.

šŸ“Œ Task
Status

Fixed

Version

3.0

Component

Package Manager

Created by

šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024