Merge lp:~diegosarmentero/ubuntuone-client/farewell-u1 into lp:ubuntuone-client

Proposed by Diego Sarmentero
Status: Merged
Approved by: dobey
Approved revision: 1411
Merged at revision: 1404
Proposed branch: lp:~diegosarmentero/ubuntuone-client/farewell-u1
Merge into: lp:ubuntuone-client
Diff against target: 252 lines (+74/-58)
3 files modified
tests/status/test_aggregator.py (+13/-13)
ubuntuone/status/aggregator.py (+8/-0)
ubuntuone/syncdaemon/main.py (+53/-45)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-client/farewell-u1
Reviewer Review Type Date Requested Status
dobey (community) Approve
Manuel de la Peña (community) Approve
Review via email: mp+214519@code.launchpad.net

Commit message

- Show a message when the client is started indicating that the service will be suspended on June 1st.
- After June 1st, don't contact the server.

Description of the change

Farewell Ubuntu One File Service

To post a comment you must log in.
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (384.3 KiB)

The attempt to merge lp:~diegosarmentero/ubuntuone-client/farewell-u1 into lp:ubuntuone-client failed. Below is the output from the failed tests.

*** Running test suite for tests ***
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/contrib
creating build/lib.linux-x86_64-2.7/contrib/testing
copying contrib/testing/testcase.py -> build/lib.linux-x86_64-2.7/contrib/testing
copying contrib/testing/__init__.py -> build/lib.linux-x86_64-2.7/contrib/testing
creating build/lib.linux-x86_64-2.7/ubuntuone
creating build/lib.linux-x86_64-2.7/ubuntuone/platform
creating build/lib.linux-x86_64-2.7/ubuntuone/platform/credentials
copying ubuntuone/platform/credentials/ipc_service.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/credentials
copying ubuntuone/platform/credentials/dbus_service.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/credentials
copying ubuntuone/platform/credentials/__init__.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/credentials
creating build/lib.linux-x86_64-2.7/ubuntuone/platform/filesystem_notifications
creating build/lib.linux-x86_64-2.7/ubuntuone/platform/filesystem_notifications/notify_processor
copying ubuntuone/platform/filesystem_notifications/notify_processor/linux.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/filesystem_notifications/notify_processor
copying ubuntuone/platform/filesystem_notifications/notify_processor/common.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/filesystem_notifications/notify_processor
copying ubuntuone/platform/filesystem_notifications/notify_processor/__init__.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/filesystem_notifications/notify_processor
creating build/lib.linux-x86_64-2.7/ubuntuone/proxy
copying ubuntuone/proxy/common.py -> build/lib.linux-x86_64-2.7/ubuntuone/proxy
copying ubuntuone/proxy/tunnel_client.py -> build/lib.linux-x86_64-2.7/ubuntuone/proxy
copying ubuntuone/proxy/tunnel_server.py -> build/lib.linux-x86_64-2.7/ubuntuone/proxy
copying ubuntuone/proxy/logger.py -> build/lib.linux-x86_64-2.7/ubuntuone/proxy
copying ubuntuone/proxy/__init__.py -> build/lib.linux-x86_64-2.7/ubuntuone/proxy
creating build/lib.linux-x86_64-2.7/ubuntuone/status
copying ubuntuone/status/notification.py -> build/lib.linux-x86_64-2.7/ubuntuone/status
copying ubuntuone/status/logger.py -> build/lib.linux-x86_64-2.7/ubuntuone/status
copying ubuntuone/status/aggregator.py -> build/lib.linux-x86_64-2.7/ubuntuone/status
copying ubuntuone/status/__init__.py -> build/lib.linux-x86_64-2.7/ubuntuone/status
creating build/lib.linux-x86_64-2.7/ubuntuone/platform/notification
copying ubuntuone/platform/notification/linux.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/notification
copying ubuntuone/platform/notification/windows.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/notification
copying ubuntuone/platform/notification/__init__.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/notification
creating build/lib.linux-x86_64-2.7/ubuntuone/platform/tools
copying ubuntuone/platform/tools/linux.py -> build/lib.linux-x86_64-2.7/ubuntuone/platform/tools
copying ubuntuone/platform/tools/__init__.py -> bu...

Revision history for this message
dobey (dobey) wrote :

88 + if datetime.date.today() != end_date:

So on June 2 and every day not June 1 2014, we'll start trying to connect again? And pop the notification every time syncdaemon starts up?

Do we really need to pop the notification *every* time syncdaemon starts up? We've already sent e-mails to everyone, made a blog post, and it's been picked up on several news sites. On June 1, all the existing connections will drop and it will just fail to connect anyway.

Revision history for this message
dobey (dobey) :
review: Needs Fixing
1407. By Diego Sarmentero

fixing date comparison

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

> 88 + if datetime.date.today() != end_date:
>
> So on June 2 and every day not June 1 2014, we'll start trying to connect
> again? And pop the notification every time syncdaemon starts up?
>
> Do we really need to pop the notification *every* time syncdaemon starts up?
> We've already sent e-mails to everyone, made a blog post, and it's been picked
> up on several news sites. On June 1, all the existing connections will drop
> and it will just fail to connect anyway.

Fixed

1408. By Diego Sarmentero

considering same date too

Revision history for this message
dobey (dobey) wrote :

This branch seems to be introducing the test failure. I built the current package in pbuilder for saucy, and it built just fine. After adding this patch to create a new package to upload for SRU, and attempting to build it, I am getting the same test failures on saucy.

review: Needs Fixing
Revision history for this message
dobey (dobey) wrote :

88 + if datetime.date.today() >= end_date:

Now the check is backwards. It should be today <= end.

1409. By Diego Sarmentero

fix date comparison

1410. By Diego Sarmentero

disable on june 1st

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

> 88 + if datetime.date.today() >= end_date:
>
> Now the check is backwards. It should be today <= end.

Fixed.
But the tests from trunk are failing for me in the same way here.

Revision history for this message
dobey (dobey) wrote :

The tests are failing because this branch causes an extra notification to pop, so all the expectations are wrong in the tests.

I've proposed https://code.launchpad.net/~dobey/ubuntuone-client/farewell-u1/+merge/215303 to merge into this branch. If you merge it in, the tests should pass again. It works for me in the package.

1411. By Diego Sarmentero

merging lp:~dobey/ubuntuone-client/farewell-u1 branch to fix tests

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

> The tests are failing because this branch causes an extra notification to pop,
> so all the expectations are wrong in the tests.
>
> I've proposed https://code.launchpad.net/~dobey/ubuntuone-
> client/farewell-u1/+merge/215303 to merge into this branch. If you merge it
> in, the tests should pass again. It works for me in the package.

Thanks, done!

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/status/test_aggregator.py'
--- tests/status/test_aggregator.py 2012-11-15 13:23:43 +0000
+++ tests/status/test_aggregator.py 2014-04-11 14:08:45 +0000
@@ -943,7 +943,7 @@
943 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,943 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
944 is_public, public_url)944 is_public, public_url)
945 self.assertEqual(945 self.assertEqual(
946 1, len(self.status_frontend.notification.notifications_shown))946 2, len(self.status_frontend.notification.notifications_shown))
947947
948 def test_file_unpublished(self):948 def test_file_unpublished(self):
949 """A file unpublished event is processed."""949 """A file unpublished event is processed."""
@@ -955,7 +955,7 @@
955 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,955 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
956 is_public, public_url)956 is_public, public_url)
957 self.assertEqual(957 self.assertEqual(
958 1, len(self.status_frontend.notification.notifications_shown))958 2, len(self.status_frontend.notification.notifications_shown))
959959
960 def test_download_started(self):960 def test_download_started(self):
961 """A download was added to the queue."""961 """A download was added to the queue."""
@@ -1053,7 +1053,7 @@
1053 self.fakevm.volumes[SHARE_ID] = share1053 self.fakevm.volumes[SHARE_ID] = share
1054 self.listener.handle_VM_SHARE_CREATED(SHARE_ID)1054 self.listener.handle_VM_SHARE_CREATED(SHARE_ID)
1055 self.assertEqual(1055 self.assertEqual(
1056 1, len(self.status_frontend.notification.notifications_shown))1056 2, len(self.status_frontend.notification.notifications_shown))
10571057
1058 def test_already_subscribed_new_udf_available(self):1058 def test_already_subscribed_new_udf_available(self):
1059 """A new udf that was already subscribed."""1059 """A new udf that was already subscribed."""
@@ -1061,14 +1061,14 @@
1061 udf.subscribed = True1061 udf.subscribed = True
1062 self.listener.handle_VM_UDF_CREATED(udf)1062 self.listener.handle_VM_UDF_CREATED(udf)
1063 self.assertEqual(1063 self.assertEqual(
1064 0, len(self.status_frontend.notification.notifications_shown))1064 1, len(self.status_frontend.notification.notifications_shown))
10651065
1066 def test_new_udf_available(self):1066 def test_new_udf_available(self):
1067 """A new udf is available for subscription."""1067 """A new udf is available for subscription."""
1068 udf = UDF()1068 udf = UDF()
1069 self.listener.handle_VM_UDF_CREATED(udf)1069 self.listener.handle_VM_UDF_CREATED(udf)
1070 self.assertEqual(1070 self.assertEqual(
1071 1, len(self.status_frontend.notification.notifications_shown))1071 2, len(self.status_frontend.notification.notifications_shown))
10721072
1073 def test_two_new_udfs_available(self):1073 def test_two_new_udfs_available(self):
1074 """A new udf is available for subscription."""1074 """A new udf is available for subscription."""
@@ -1077,14 +1077,14 @@
1077 udf2 = UDF()1077 udf2 = UDF()
1078 self.listener.handle_VM_UDF_CREATED(udf2)1078 self.listener.handle_VM_UDF_CREATED(udf2)
1079 self.assertEqual(1079 self.assertEqual(
1080 2, len(self.status_frontend.notification.notifications_shown))1080 3, len(self.status_frontend.notification.notifications_shown))
10811081
1082 def test_server_connection_lost(self):1082 def test_server_connection_lost(self):
1083 """The client connected to the server."""1083 """The client connected to the server."""
1084 self.status_frontend.aggregator.connected = True1084 self.status_frontend.aggregator.connected = True
1085 self.listener.handle_SYS_CONNECTION_LOST()1085 self.listener.handle_SYS_CONNECTION_LOST()
1086 self.assertEqual(1086 self.assertEqual(
1087 0, len(self.status_frontend.notification.notifications_shown))1087 1, len(self.status_frontend.notification.notifications_shown))
1088 self.assertFalse(self.status_frontend.aggregator.connected)1088 self.assertFalse(self.status_frontend.aggregator.connected)
10891089
1090 def test_server_connection_made(self):1090 def test_server_connection_made(self):
@@ -1092,7 +1092,7 @@
1092 self.status_frontend.aggregator.connected = False1092 self.status_frontend.aggregator.connected = False
1093 self.listener.handle_SYS_CONNECTION_MADE()1093 self.listener.handle_SYS_CONNECTION_MADE()
1094 self.assertEqual(1094 self.assertEqual(
1095 0, len(self.status_frontend.notification.notifications_shown))1095 1, len(self.status_frontend.notification.notifications_shown))
1096 self.assertTrue(self.status_frontend.aggregator.connected)1096 self.assertTrue(self.status_frontend.aggregator.connected)
10971097
1098 def test_set_show_all_notifications(self):1098 def test_set_show_all_notifications(self):
@@ -1117,7 +1117,7 @@
1117 self.listener.handle_SYS_QUOTA_EXCEEDED(1117 self.listener.handle_SYS_QUOTA_EXCEEDED(
1118 volume_id=UDF_ID, free_bytes=0)1118 volume_id=UDF_ID, free_bytes=0)
1119 self.assertEqual(1119 self.assertEqual(
1120 0, len(self.status_frontend.notification.notifications_shown))1120 1, len(self.status_frontend.notification.notifications_shown))
1121 mocker.restore()1121 mocker.restore()
1122 mocker.verify()1122 mocker.verify()
11231123
@@ -1138,7 +1138,7 @@
1138 self.listener.handle_SYS_QUOTA_EXCEEDED(1138 self.listener.handle_SYS_QUOTA_EXCEEDED(
1139 volume_id=ROOT_ID, free_bytes=0)1139 volume_id=ROOT_ID, free_bytes=0)
1140 self.assertEqual(1140 self.assertEqual(
1141 0, len(self.status_frontend.notification.notifications_shown))1141 1, len(self.status_frontend.notification.notifications_shown))
1142 mocker.restore()1142 mocker.restore()
1143 mocker.verify()1143 mocker.verify()
11441144
@@ -1162,15 +1162,15 @@
1162 self.fakevm.volumes[SHARE_ID] = share1162 self.fakevm.volumes[SHARE_ID] = share
1163 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)1163 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
1164 self.assertEqual(1164 self.assertEqual(
1165 1, len(self.status_frontend.notification.notifications_shown))1165 2, len(self.status_frontend.notification.notifications_shown))
1166 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)1166 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
1167 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)1167 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
1168 self.assertEqual(1168 self.assertEqual(
1169 1, len(self.status_frontend.notification.notifications_shown))1169 2, len(self.status_frontend.notification.notifications_shown))
1170 self.status_frontend.aggregator.clock.advance(aggregator.ONE_DAY + 1)1170 self.status_frontend.aggregator.clock.advance(aggregator.ONE_DAY + 1)
1171 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)1171 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
1172 self.assertEqual(1172 self.assertEqual(
1173 2, len(self.status_frontend.notification.notifications_shown))1173 3, len(self.status_frontend.notification.notifications_shown))
1174 mocker.restore()1174 mocker.restore()
1175 mocker.verify()1175 mocker.verify()
11761176
11771177
=== modified file 'ubuntuone/status/aggregator.py'
--- ubuntuone/status/aggregator.py 2013-03-20 21:33:53 +0000
+++ ubuntuone/status/aggregator.py 2014-04-11 14:08:45 +0000
@@ -51,6 +51,8 @@
51Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)51Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)
5252
53UBUNTUONE_TITLE = Q_("Ubuntu One")53UBUNTUONE_TITLE = Q_("Ubuntu One")
54UBUNTUONE_END = Q_("Ubuntu One file services will be "
55 "shutting down on June 1st, 2014.\nThanks for your support.")
54NEW_UDFS_SENDER = Q_("New cloud folder(s) available")56NEW_UDFS_SENDER = Q_("New cloud folder(s) available")
55FINAL_COMPLETED = Q_("File synchronization completed.")57FINAL_COMPLETED = Q_("File synchronization completed.")
5658
@@ -827,6 +829,12 @@
827 self.syncdaemon_service = service829 self.syncdaemon_service = service
828 self.sync_menu = None830 self.sync_menu = None
829 self.start_sync_menu()831 self.start_sync_menu()
832 self.farewell_ubuntuone_sync()
833
834 def farewell_ubuntuone_sync(self):
835 """Show notification about the upcoming end of UbuntuOne sync."""
836 self.notification.send_notification(
837 UBUNTUONE_TITLE, UBUNTUONE_END)
830838
831 def start_sync_menu(self):839 def start_sync_menu(self):
832 """Create the sync menu and register the progress listener."""840 """Create the sync menu and register the progress listener."""
833841
=== modified file 'ubuntuone/syncdaemon/main.py'
--- ubuntuone/syncdaemon/main.py 2013-02-04 16:04:19 +0000
+++ ubuntuone/syncdaemon/main.py 2014-04-11 14:08:45 +0000
@@ -31,6 +31,7 @@
31import logging31import logging
32import os32import os
33import sys33import sys
34import datetime
3435
35from dirspec.utils import user_home36from dirspec.utils import user_home
36from twisted.internet import defer, reactor, task37from twisted.internet import defer, reactor, task
@@ -106,51 +107,58 @@
106 if not throttling_enabled:107 if not throttling_enabled:
107 throttling_enabled = user_config.get_throttling()108 throttling_enabled = user_config.get_throttling()
108109
109 self.logger.info("Starting Ubuntu One client version %s",110 end_date = datetime.date(2014, 6, 1)
110 clientdefs.VERSION)111 if datetime.date.today() < end_date:
111 self.logger.info("Using %r as root dir", self.root_dir)112 self.logger.info("Starting Ubuntu One client version %s",
112 self.logger.info("Using %r as data dir", self.data_dir)113 clientdefs.VERSION)
113 self.logger.info("Using %r as shares root dir", self.shares_dir)114 self.logger.info("Using %r as root dir", self.root_dir)
114 self.db = tritcask.Tritcask(tritcask_dir)115 self.logger.info("Using %r as data dir", self.data_dir)
115 self.vm = volume_manager.VolumeManager(self)116 self.logger.info("Using %r as shares root dir", self.shares_dir)
116 self.fs = filesystem_manager.FileSystemManager(117 self.db = tritcask.Tritcask(tritcask_dir)
117 data_dir, partials_dir, self.vm, self.db)118 self.vm = volume_manager.VolumeManager(self)
118 self.event_q = event_queue.EventQueue(self.fs, ignore_files,119 self.fs = filesystem_manager.FileSystemManager(
119 monitor_class=monitor_class)120 data_dir, partials_dir, self.vm, self.db)
120 self.fs.register_eq(self.event_q)121 self.event_q = event_queue.EventQueue(
121122 self.fs, ignore_files, monitor_class=monitor_class)
122 # subscribe VM to EQ, to be unsubscribed in shutdown123 self.fs.register_eq(self.event_q)
123 self.event_q.subscribe(self.vm)124
124 self.vm.init_root()125 # subscribe VM to EQ, to be unsubscribed in shutdown
125126 self.event_q.subscribe(self.vm)
126 # we don't have the oauth tokens yet, we 'll get them later127 self.vm.init_root()
127 self.action_q = action_queue.ActionQueue(self.event_q, self,128
128 host, port,129 # we don't have the oauth tokens yet, we 'll get them later
129 dns_srv, ssl,130 self.action_q = action_queue.ActionQueue(self.event_q, self,
130 disable_ssl_verify,131 host, port,
131 read_limit, write_limit,132 dns_srv, ssl,
132 throttling_enabled)133 disable_ssl_verify,
133 self.hash_q = hash_queue.HashQueue(self.event_q)134 read_limit, write_limit,
134 events_nanny.DownloadFinishedNanny(self.fs, self.event_q, self.hash_q)135 throttling_enabled)
135136 self.hash_q = hash_queue.HashQueue(self.event_q)
136 # call StateManager after having AQ137 events_nanny.DownloadFinishedNanny(self.fs, self.event_q,
137 self.state_manager = StateManager(self, handshake_timeout)138 self.hash_q)
138139
139 self.sync = sync.Sync(self)140 # call StateManager after having AQ
140 self.lr = local_rescan.LocalRescan(self.vm, self.fs,141 self.state_manager = StateManager(self, handshake_timeout)
141 self.event_q, self.action_q)142
142143 self.sync = sync.Sync(self)
143 self.external = SyncdaemonService(main=self,144 self.lr = local_rescan.LocalRescan(self.vm, self.fs,
144 send_events=broadcast_events)145 self.event_q, self.action_q)
145 self.external.oauth_credentials = oauth_credentials146
146 if user_config.get_autoconnect():147 self.external = SyncdaemonService(main=self,
147 self.external.connect(autoconnecting=True)148 send_events=broadcast_events)
148149 self.external.oauth_credentials = oauth_credentials
149 self.status_listener = None150 if user_config.get_autoconnect():
150 self.start_status_listener()151 self.external.connect(autoconnecting=True)
151152
152 self.mark = task.LoopingCall(self.log_mark)153 self.status_listener = None
153 self.mark.start(mark_interval)154 self.start_status_listener()
155
156 self.mark = task.LoopingCall(self.log_mark)
157 self.mark.start(mark_interval)
158 else:
159 if reactor.running:
160 reactor.stop()
161 sys.exit(0)
154162
155 def start_status_listener(self):163 def start_status_listener(self):
156 """Start the status listener if it is configured to start."""164 """Start the status listener if it is configured to start."""

Subscribers

People subscribed via source and target branches