@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a "--force" argument to "bin/config done"

Summary:
Ref T11922. When we deploy on Saturday I need to rebuild all the cluster indexes, but some instances won't have anything indexed so they won't actually trigger the activity.

Add a `--force` flag that just clears an activity even if the activity is not required.

Test Plan: Ran `bin/config done reindex --force` several times.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11922

Differential Revision: https://secure.phabricator.com/D16970

+22 -5
+22 -5
src/applications/config/management/PhabricatorConfigManagementDoneWorkflow.php
··· 11 11 ->setArguments( 12 12 array( 13 13 array( 14 + 'name' => 'force', 15 + 'short' => 'f', 16 + 'help' => pht( 17 + 'Mark activities complete even if there is no outstanding '. 18 + 'need to complete them.'), 19 + ), 20 + array( 14 21 'name' => 'activities', 15 22 'wildcard' => true, 16 23 ), ··· 18 25 } 19 26 20 27 public function execute(PhutilArgumentParser $args) { 28 + $is_force = $args->getArg('force'); 29 + 21 30 $activities = $args->getArg('activities'); 22 31 if (!$activities) { 23 32 throw new PhutilArgumentUsageException( ··· 29 38 'activityType = %s', 30 39 $type); 31 40 if (!$activity) { 32 - throw new PhutilArgumentUsageException( 33 - pht( 34 - 'Activity "%s" is not currently marked as required, so there '. 35 - 'is no need to complete it.', 36 - $type)); 41 + if ($is_force) { 42 + echo tsprintf( 43 + "%s\n", 44 + pht( 45 + 'Activity "%s" did not need to be marked as complete.', 46 + $type)); 47 + } else { 48 + throw new PhutilArgumentUsageException( 49 + pht( 50 + 'Activity "%s" is not currently marked as required, so there '. 51 + 'is no need to complete it.', 52 + $type)); 53 + } 37 54 } else { 38 55 $activity->delete(); 39 56 echo tsprintf(