Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 800449, Bug 805337, Bug 799063 - Show progress, convey sync failure to UI, convert failed syncs to offline message display, use mutexes on syncs #82

Merged
merged 24 commits into from Nov 27, 2012

Conversation

asutherland
Copy link
Contributor

https://bugzilla.mozilla.org/show_bug.cgi?id=800449
https://bugzilla.mozilla.org/show_bug.cgi?id=805337
https://bugzilla.mozilla.org/show_bug.cgi?id=799063

Not up for review yet. This covers a few inter-related bugs related to synchronization and proper error generation. I need to finish up the conversion of the failed sync to an offline messages display; the unit test exists and happily fails right now.

Conflicts:
	data/lib/mailapi/mailslice.js
This is primarily fall-out from:
- Hopefully finally getting rid of all timezone issues by always having
  messages generated clustered around noon of the current timezone.  We
  use age_incr_every to still have multiple messages per day where
  required.
- Fix fallout from syncs running mutexed, including logging changes to
  support expectations on this.
Conflicts:
	data/lib/mailapi/testhelper.js
	test/unit/test_mail_html.js
…failures

The timezone parsing bug may have caused me to standardize the tests to
have bad normalized values.  I will investigate now and renormalize.
(In my previous set of timezone-greening tests, I had screwed up the
timezone logic and did not leverage the ability to easily inspect what
we crammed into the server.  I inspect this time.  Mea culpa.  Although,
NB: none of this stuff has hit the tree yet, so not too much mea culpa!)
Conflicts:
	data/lib/mailapi/activesync/folder.js
	data/lib/mailapi/testhelper.js

Primary conflicts were:
- extraFlag versus extraFlags for expanding view uses
- added progress to be passed to activesync enumerate folders
@asutherland
Copy link
Contributor Author

f? / review heads-up @mozsquib . The review should be coming not too far in the future (but holiday/weekend/etc take priority over this/that! :)

My added test passes, all IMAP tests are once again green, all activesync tests are green, and my first pass at IMAP smoke testing seemed correct. ActiveSync-wise, while I'm reasonably confident that the progress bar stuff works to the limited extent we get events, I have not yet tried out the failure cases where we can no longer talk to the server for ActiveSync.

This review is bested buds with the UI changes at: mozilla-b2g/gaia#6484

@asutherland
Copy link
Contributor Author

r? @mozsquib (upgrading from feedback request)

progress(0.1 + 0.7 * (bytesSoFar/totalBytes));
}
else {
progress(0.1 + 0.7 * Math.min(1.0, bytesSoFar / 1000000));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would make more sense as:

if (!totalBytes)
  totalBytes = Math.max(1000000, bytesSoFar);
progress(0.1 + 0.7 * bytesSoFar / totalBytes);

@jimporter
Copy link
Contributor

Aside from my comment above, this looks good, and the tests pass. r=me

- date-related regression from passing a timestamp instead of a Date
- port 8080 is what DEBUG=1 uses; use 8880 instead!
- modules need s/$/$_/ because of changes made elsewhere
asutherland added a commit that referenced this pull request Nov 27, 2012
Bug 800449, Bug 805337, Bug 799063 - Show progress, convey sync failure to UI, convert failed syncs to offline message display, use mutexes on syncs. r=squib, a=blocking-basecamp
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants