Currently imageloader D-Bus methods returns true always. But a better way is to return true only on success and otherwise returns a proper brillo error message. Given the current big user base of imageloader, a migration plan is necessary to support compatibility.
Proposal:
phase 0: identify all callers. a quick search in platform2 reveals container_utils. of course chrome is the major work.
phase 1: migrate callers to parse both 'success' response parameter and return value. this should be a non-op since
phase 2: return meaningful error/success in imageloader methods - return value and 'success' response should be the same.
phase 3: migrate callers (chrome, platform2/container_utils, etc.) to not parse 'result' response and instead use the return of imageloader methods solely.
phase 4: remove 'success' parameter in imageloader.
Alternative:
1. duplicate all APIs
2. migrate caller to new APIs.
3. change old APIs to mirror new API implementation
4. migrate caller back to old API names.
I have some other features to finish before I have cycles to work on this. Feel free to take over this feature.
Comment 1 by benhenry@google.com
, Jan 11