New issue
Advanced search Search tips

Issue 761279 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Eliminate YAML for internal storage format.

Project Member Reported by hungte@chromium.org, Sep 1 2017

Issue description

The factory code used YAML a lot because it was considered as "easy to read and edit".

As time goes by, we've learned that (1) YAML is not supported well in python (2) YAML spec is not strict, and many implementations have their own hacks (3) The 'easy' of YAML also leads to error, for example we often see people writing 0719 as PID/VID in HWID file, and can't realize it is actually 1317 (base=8 due to leading 0).

Here's the new policy for factory code:

Everything stored as config should be either Python AST or JSON.

YAML is allowed for human editing, but should be converted to AST or JSON for internal storage. For example, "umpire edit" may still open an editor to edit configs in YAML, but the internal (after saved) format stored should be AST or JSON.

This applies to all newer code in future. For legacy code, we'll track the migration by this issue.

Note "HWID Database file" won't be changed soon because there are other services, maintained by other team, reading it. But the ultimate goal is the same - we should output a more strict formatted data, for example JSON, for them.
 
Labels: Hotlist-GoodFirstBug
Owner: fshao@chromium.org
Status: Assigned (was: Untriaged)
Note I'm not sure if this is still true, for example I think we may have already changed umpire to use JSON?

Sign in to add a comment