New issue
Advanced search Search tips

Issue 878603 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

imageloader: meaningful return for method call

Project Member Reported by xiaochu@chromium.org, Aug 28

Issue description

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.
 
Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.

Sign in to add a comment