Closed Bug 966244 Opened 7 years ago Closed 7 years ago

[NetworkStats API] Alarms are not updated after clearStats

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3T+, firefox28 wontfix, firefox29 wontfix, firefox30 fixed, b2g-v1.3 affected, b2g-v1.3T fixed, b2g-v1.4 fixed)

RESOLVED FIXED
1.4 S1 (14feb)
blocking-b2g 1.3T+
Tracking Status
firefox28 --- wontfix
firefox29 --- wontfix
firefox30 --- fixed
b2g-v1.3 --- affected
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed

People

(Reporter: albert, Assigned: albert)

References

Details

Attachments

(3 files, 2 obsolete files)

The data limit of alarms is not updated when stats are cleared.

STR.
 1. Browser some page (i.e. 1,5M)
 2.Set "Alert me when used" to "2M";
 3.Clear mobile data.
 3.Then browser some page (i.e. 1,5M);
 4.It pop up message before the data has used 2M

EXPECTED BEHAVIOUR:
 Alarms fires at "2M"
ACTUAL BEHAVIOUR:
 Alarms fires before reach "2M"
Assignee: nobody → acperez
Blocks: 858017
nominating to v1.3? since it is an issue related to NetworkStats API already uplifted to v1.3. Thanks!
blocking-b2g: --- → 1.3?
QA,

Please check for regression. Doesn't indicate a blocker though
Keywords: qawanted
triage: 1.3+ for new API bug. it could be worse to backout the new API so the better path forward is to fix bugs related to the new API
blocking-b2g: 1.3? → 1.3+
Whiteboard: ETA: 2/11
Attached patch Patch (obsolete) — Splinter Review
Keywords: qawanted
Attached patch Patch (obsolete) — Splinter Review
Attachment #8370785 - Attachment is obsolete: true
Attachment #8373257 - Flags: review?(gene.lian)
Comment on attachment 8373257 [details] [diff] [review]
Patch

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

Looks nice but I hope to have more eyes on this, since it's v1.3+.
Attachment #8373257 - Flags: review?(jshih)
Attachment #8373257 - Flags: review?(gene.lian)
Attachment #8373257 - Flags: review+
Comment on attachment 8373257 [details] [diff] [review]
Patch

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

looks good to me! Only one small question ;)

::: dom/network/src/NetworkStatsDB.jsm
@@ +1008,5 @@
>      }, aResultCb);
> +  },
> +
> +  _resetAlarms: function _resetAlarms(aNetworkId, aResultCb) {
> +    let self = this;

what is this |self| use for?
Attachment #8373257 - Flags: review?(jshih) → review+
(In reply to John Shih from comment #7)
> Comment on attachment 8373257 [details] [diff] [review]
> Patch
> 
> Review of attachment 8373257 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> looks good to me! Only one small question ;)
> 
> ::: dom/network/src/NetworkStatsDB.jsm
> @@ +1008,5 @@
> >      }, aResultCb);
> > +  },
> > +
> > +  _resetAlarms: function _resetAlarms(aNetworkId, aResultCb) {
> > +    let self = this;
> 
> what is this |self| use for?

Not needed, I'll remove |self|
Attached patch PatchSplinter Review
Change from comment 7
Attachment #8373257 - Attachment is obsolete: true
Attachment #8373965 - Flags: review+
Keywords: checkin-needed
Blocks: 965305
Attached patch Update testsSplinter Review
Attachment #8374382 - Flags: review?(gene.lian)
Attachment #8374382 - Flags: review?(gene.lian) → review+
Keywords: checkin-needed
Depends on: 965319
https://hg.mozilla.org/mozilla-central/rev/e45ee2a23960
https://hg.mozilla.org/mozilla-central/rev/7f78e32554a2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: ETA: 2/11
Target Milestone: --- → 1.4 S1 (14feb)
I backed these out of 1.3 because it depends on bug 965319, which I backed out because it depended on bug 922926, which I backed out because it wasn't supposed to land on 1.3:

https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/d98758fcb8e5
Flags: needinfo?(acperez)
I'm also renominating this to discuss in triage again why this is needed.
blocking-b2g: 1.3+ → 1.3?
I clear ni until clarified 1.3?
Flags: needinfo?(acperez)
Patch is needed for Tarako version
blocking-b2g: 1.3? → 1.3T?
traige: 1.3T+ to get this into tarako for usage app memory saving
blocking-b2g: 1.3T? → 1.3T+
Hi Ying Xu, heard that you will be doing uplifts to 1.3T branch. After you completed the uplift, can you please set status-b2g-v1.3T to fixed? please let us know if you have problems with it. thanks
Flags: needinfo?(ying.xu)
Attached patch Patch for 1.3tSplinter Review
Flags: needinfo?(ying.xu)
You need to log in before you can comment on or make changes to this bug.