Closed Bug 1833395 Opened 2 years ago Closed 2 years ago

Automatic self-update appears to be broken as of 1.3.0rc0

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zeid, Assigned: sheehan)

Details

Attachments

(1 file)

STR:

  • run pip install mozphab==1.3.0rc0
  • make sure that self_last_check is removed from ~/.moz-phab-config
  • make sure that self_auto_update is set to True
  • run a moz-phab command, e.g., moz-phab patch D123456789

Expected result:

  • moz-phab should update to the latest version

Actual result:

  • No self-update runs

Edit: this is also reproducible with version 1.4.0, 1.4.1, 1.4.2.

Assignee: nobody → sheehan

The logic for when a self-update should occur is incorrect, and causes
the check for self-updating to return early instead of correctly
checking for a new moz-phab version. The existing self_update_disabled
variable should have been checked for the False case instead of
the True case in the existing code structure.

Move the logic into a separate function that returns a boolean indicating
if a self-update should be performed and logs the reason for why a
self-update is skipped. Add a test for this new function to verify the
self-update logic is working as expected.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: