Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 28037010: Improved generation of filter subscription files (Closed)

Created:
Nov. 6, 2013, 2:27 p.m. by Wladimir Palant
Modified:
Nov. 13, 2013, 8:48 a.m.
Reviewers:
Sebastian Noack
Visibility:
Public.

Description

The main goal here was replacing rsync with atomic updates - from what I can tell, the only way of doing this is creating a new directory and changing the symbolic link that points to the data directory. However, I fixed a number of other issues with these ancient scripts, most importantly: * Don't produce unnecessary temporary directories on server, work with in-memory data instead. * Allow specifying multiple sources when combineSubscriptions.py is called directly (this file is used by filter authors for testing).

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fixed review comments #

Patch Set 3 : Different approach to atomic updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -193 lines) Patch
M sitescripts/subscriptions/bin/updateSubscriptionDownloads.py View 1 2 1 chunk +35 lines, -24 lines 0 comments Download
M sitescripts/subscriptions/combineSubscriptions.py View 1 2 1 chunk +171 lines, -169 lines 0 comments Download

Messages

Total messages: 7
Wladimir Palant
Nov. 6, 2013, 2:27 p.m. (2013-11-06 14:27:29 UTC) #1
Sebastian Noack
http://codereview.adblockplus.org/28037010/diff/1/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py File sitescripts/subscriptions/bin/updateSubscriptionDownloads.py (right): http://codereview.adblockplus.org/28037010/diff/1/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py#newcode57 sitescripts/subscriptions/bin/updateSubscriptionDownloads.py:57: shutil.rmtree(destination, True) I would go for shutil.rmtree(destination, ignore_errors=True) instead ...
Nov. 6, 2013, 3:56 p.m. (2013-11-06 15:56:22 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/28037010/diff/1/sitescripts/subscriptions/combineSubscriptions.py File sitescripts/subscriptions/combineSubscriptions.py (right): http://codereview.adblockplus.org/28037010/diff/1/sitescripts/subscriptions/combineSubscriptions.py#newcode102 sitescripts/subscriptions/combineSubscriptions.py:102: lines.insert(0, "! Checksum: %s" % re.sub(r"=", "", base64.b64encode(checksum.digest()))) On ...
Nov. 8, 2013, 3:08 p.m. (2013-11-08 15:08:06 UTC) #3
Sebastian Noack
LGTM
Nov. 9, 2013, 9:50 a.m. (2013-11-09 09:50:16 UTC) #4
Wladimir Palant
Turned out that this approach doesn't work too well. Two issues with it: 1. rsync ...
Nov. 11, 2013, 2:56 p.m. (2013-11-11 14:56:19 UTC) #5
Sebastian Noack
LGTM
Nov. 12, 2013, 6:48 p.m. (2013-11-12 18:48:20 UTC) #6
Wladimir Palant
Nov. 13, 2013, 8:48 a.m. (2013-11-13 08:48:08 UTC) #7
For reference, this was creating files with wrong permissions
(NamedTemporaryFile always sets them to 0600) so an additional change became
necessary: https://hg.adblockplus.org/sitescripts/rev/135d45395e54. However,
things seem to work fine now.

Powered by Google App Engine
This is Rietveld