New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 773805 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Refector autoupdate.py to remove 999999.0.0 constant.

Project Member Reported by dgarr...@chromium.org, Oct 11 2017

Issue description

In src/platform/dev/autoupdate.py, there is code that uses a static (and valid) build version number (999999.0.0) as a sentinal value. This number was raised from 9999.0.0 when it conflicted with live ChromeOS builds and broke the lab.

  @staticmethod
  def _GetVersionFromDir(image_dir):
    """Returns the version of the image based on the name of the directory."""
    latest_version = os.path.basename(image_dir)
    parts = latest_version.split('-')
    # If we can't get a version number from the directory, default to a high
    # number to allow the update to happen
    # TODO(phobbs) refactor this.
    return parts[1] if len(parts) == 3 else "999999.0.0"


We should not use valid build versions as a sentinal value, but do something cleaner instead.
 

Comment 1 by nxia@chromium.org, Oct 13 2017

Cc: akes...@chromium.org
An OKR candidate ?
Labels: Hotlist-Fixit
Cc: gu...@chromium.org
Status: Unconfirmed (was: Untriaged)
It sounds like this will become a problem around the time I might die.

It SHOULD probably be fixed, but it literally won't be my problem.

Sign in to add a comment