Closed Bug 1104867 Opened 10 years ago Closed 9 years ago

Hook up the Send To Extension to the Sync clients system

Categories

(Firefox for iOS :: Sync, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: st3fan, Assigned: fluffyemily, Mentored)

References

Details

Attachments

(2 files, 3 obsolete files)

Hook up the Send To Extension to the Client Provider. This includes implementing the REST call in the Client Provider that pushes the share page to the cloud.
Status: NEW → ASSIGNED
Attached file Pull Request (obsolete) —
Patch that makes the Send To extension push the shared item to your sync data.
Attachment #8528523 - Flags: review?(bnicholson)
Attachment #8528523 - Flags: review?(bnicholson) → review+
Group: mozilla-employee-confidential
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Group: mozilla-employee-confidential
OS: Mac OS X → iOS 7
Product: Firefox for Android → Firefox for iOS
Hardware: x86 → All
Version: Trunk → unspecified
This needs to be be revisted because I don't think this code works or is up to date with what we actually need to do.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm ripping out some of the old code now, and will get to this after Bug 1141845.
Assignee: sarentz → rnewman
Status: REOPENED → ASSIGNED
Depends on: 1141845
Summary: (iOS) Hook up the Send To Extension to the Client Provider → Hook up the Send To Extension to the Sync clients system
Component: General → Sync
OS: iOS 7 → iOS 8
No longer depends on: 1141845
Depends on: 1154551
Depends on: 1154553
Revised summary: This bug involves: * Listing remote clients, fetching if necessary. * Queuing a command for that remote client. We queue so that an immediate failure to send doesn't result in data loss. We also queue so that if our client set is blanked -- as it might be if your password changes or something else odd happens -- the 'wipe' event doesn't lose the tabs you're trying to send. * Uploading the remote client record correctly.
tracking-fennec: --- → ?
tracking-fennec: ? → +
Assignee: rnewman → administration
Mentor: rnewman
Status: ASSIGNED → NEW
tracking-fxios: --- → +
Assignee: administration → etoop
Status: NEW → ASSIGNED
Attached file WIP Feedback Request (obsolete) —
Attachment #8628255 - Flags: feedback?(rnewman)
Attachment #8628255 - Flags: feedback?(rnewman) → feedback+
Attached file WIP Feedback Request (obsolete) —
So, I've updated some of the code (including a complete DB rewrite). It's still a bit messy, but I'm conscious that you're off on PTO from tomorrow and I still haven't figured out how to do the next bit yet (actually sending the data to the clients)! Also, there is a test deleteAllCommands that I can't get to pass and I don't know why. For some reason all the commands are still in the DB after I've deleted them and all the responses are successes.....
Attachment #8628255 - Attachment is obsolete: true
tracking-fennec: + → ---
Attachment #8628965 - Flags: feedback?(rnewman)
Comment on attachment 8628965 [details] WIP Feedback Request St3fan: Can you please give me feedback on this code? See previous comments
Attachment #8628965 - Flags: feedback?(rnewman) → feedback?(sarentz)
I'll try to take a tropical look, too.
Flags: needinfo?(rnewman)
Comments: Split sdweb change out. Less confusion on backout. Trailing comma in 'queries' list is good style; turns a two line change into one line on addition. CommandSyncTable: fix header indenting, remove // on first line. Let TableClient -> TableClients, note that it is defined elsewhere.
Flags: needinfo?(rnewman)
Part of me wants the send logic to hide in RemoteClient, requiring the send extension to grab a client to send to, but 0fg for now. Looking at the sending bit shortly.
The downside of having a not null reference to the clients table is that we can't refer to a client that is ttled or deleted without careful attention in the clients engine. Also, wiping and redownloading clients will either fail with a constraint error or discard commands (or rely on transaction quirks and immediate insertion, which we don't do). That probably needs to weaken.
SQL stuff is super low level. We should kill a lot of lines in there. Next bit: when clients syncs, after download, check if we have outstanding commands. If none, we are done. Otherwise, for each destination client, construct a client record with the outgoing command. Ideally we'd preserve the entire downloaded record payload, but that's harder here. Upload that record with a PUT, specifying IfUnmodifiedSince with the record's last seen modified time. See how we upload ours elsewhere in ClientsSynchronizer. The put might fail with a consistency error (409? 412?), in which case we need to download and re upload. If you choose, you can implement this always as a download-then-upload. On a successful upload, delete the uploaded row from the commands table.
Attachment #8628965 - Flags: feedback?(sarentz)
Attached file Pull request
Attachment #8528523 - Attachment is obsolete: true
Attachment #8628965 - Attachment is obsolete: true
Attachment #8631532 - Flags: review?(rnewman)
Attachment #8631532 - Flags: review?(sarentz)
rnewman: more updates.
simplified db. Removed unused methods. Returned RemoteClient with commands from getCommands() therefore not requiring 2 separate queries in syncronizer
I'll get to this first thing on Monday, Emily.
Flags: needinfo?(rnewman)
Attachment #8631532 - Flags: review?(sarentz)
Comment on attachment 8631532 [details] [review] Pull request Not quite there yet; two bugs with the same root cause. Back to you, Emily!
Flags: needinfo?(rnewman)
Attachment #8631532 - Flags: review?(rnewman) → review-
Attached file Pull request
here we go again
Attachment #8632916 - Flags: review?(rnewman)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → FIXED
Attachment #8632916 - Flags: review?(rnewman) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: