Problem/Motivation

When creating tests for drush commands realized that copy-local copy for the all scheme stalls after copying public:// when starting private:// files

Unknown root cause at this time.

Workaround: Execute with --scheme=public followed by another run with --scheme=private

Steps to reproduce

drush s3fs:copy-local --scheme=all

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 drush_s3fs_copy_loca-3208175-2.patch5.21 KBcmlara

Comments

cmlara created an issue. See original summary.

cmlara’s picture

StatusFileSize
new5.21 KB

Root cause is that there is a static on the batch variable provided by batch_get() used in S3fsFileMigrationBatch::execute(). This data would remain persisted after we called drush_backend_batch_process() in execute() and be a part of the batch when we called execute() a second time for the private:// scheme. This corrupted the batching.

This can be resolved by moving drush_backend_batch_process() to S3fsCommands.php and calling the execute() commands only to prep the batch.

Reworking a bit of the language from S3fsCommands and cleaned up the tests to match the new logic flow.

cmlara’s picture

Status: Active » Needs review

  • cmlara committed 8175e89 on 8.x-3.x
    Issue #3208175: drush s3fs:copy-local --scheme=all stalls at private://
    
cmlara’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.