Closed Bug 735975 Opened 12 years ago Closed 12 years ago

Get rid of UNEXPECTED_ERROR codes from updater error handling

Categories

(Toolkit :: Application Update, defect)

14 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: bbondy, Assigned: bbondy)

Details

Attachments

(1 file, 1 obsolete file)

UPDATER_STATUS_CODES Telemetry data includes some entries of: UNEXPECTED_ERROR (error code 8).  It would be good to remove this error and replace it with other more specific error codes.
Attached patch Patch v1. (obsolete) — Splinter Review
Other than elevation canceled (which we can't control), UNEXPECTED_ERROR (error code 8) is the second most frequent error behind WRITE_ERROR.
This patch is similar to the last that you just reviewed for WRITE_ERROR, but gets rid of the unhelpful UNEXPECTED_ERROR error codes.

Breakdown of UNEXPECTED_ERROR across the channels:
Nightly: 0.102%
Aurora:  0.208%
Beta: 0.339%
Release: 0.162%

I'll use the same testing process as the last patch for WRITE_ERROR.
Attachment #635011 - Flags: review?(ehsan)
Comment on attachment 635011 [details] [diff] [review]
Patch v1.

Review of attachment 635011 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/update/common/errors.h
@@ +18,5 @@
>  #define CRC_ERROR 4
>  #define PARSE_ERROR 5
>  #define READ_ERROR 6
>  #define WRITE_ERROR 7
> +// #define UNEXPECTED_ERROR 8 // Replaced with errors 38-42

Why not just remove it?

::: toolkit/mozapps/update/nsUpdateService.js
@@ +110,5 @@
>  const STATE_FAILED          = "failed";
>  
>  // From updater/errors.h:
>  const WRITE_ERROR        = 7;
> +// const UNEXPECTED_ERROR   = 8; // Replaced with errors 38-42

Ditto.
Attachment #635011 - Flags: review?(ehsan) → review+
We have a couple other obsolete error odes similar to that format:
// #define MEM_ERROR 1  // Replaced with errors 10-16 (inclusive)
// #define IO_ERROR 2  // Use READ_ERROR or WRITE_ERROR instead
Attached patch Patch v2Splinter Review
Had to update the log file at toolkit/mozapps/update/test/unit/data/partial_log_failure to fix a test failure, carrying forward r+.
Attachment #635011 - Attachment is obsolete: true
Attachment #635155 - Flags: review+
I left the comments mentioned above by the way so no one is tempted to re-use it.  There will still be telemetry reports coming in for the old error code so we have to be sure not to re-use it.  As mentioned it follows the current convention in that file for obsolete error codes, but we can remove all of those at some point in the future when they are flushed out of telemetry.
https://hg.mozilla.org/mozilla-central/rev/a18007180a41
Status: NEW → RESOLVED
Closed: 12 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: