Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium #563

Open
wants to merge 723 commits into
base: py25
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
723 commits
Select commit Hold shift + click to select a range
e3c3c41
Short imports properly.
maruel Oct 16, 2013
bf0a3b2
Merge default @ 856fd6ab5423.
maruel Oct 16, 2013
801db29
Stop sending XMPP notifications to people on the cc list.
maruel Oct 16, 2013
2cf79d4
Upload patch and base files in parallel.
maruel Oct 16, 2013
5433d9b
Merge default @ 355577b0ddd8
maruel Oct 16, 2013
4334c3a
Sort urls, disallow crawling the /search interface
maruel Oct 16, 2013
2cadd92
Add the reason for assert failures
maruel Oct 16, 2013
d9f70c5
Merge default @ 8dc5b352731e
maruel Oct 16, 2013
7bbfaf7
Fix latency calculation incoherency.
maruel Oct 17, 2013
21dbfd8
Merge default @ b03cf30f3124
maruel Oct 17, 2013
0d3beae
Set TryJobResult.requester to request.user.
maruel Oct 17, 2013
d745db9
Added multiline=True for issue reason
hinoka Oct 24, 2013
20878d9
Refactor Model implementation details out of views.py and into models…
riannucci Oct 29, 2013
c8af0ab
Merge default @ b289d7eb758b
riannucci Oct 29, 2013
10a769d
Refactor post_required decorator to be more flexible.
riannucci Oct 29, 2013
5e3d777
Merge default @ 229b7b214391
riannucci Oct 29, 2013
1dc4d63
Use patchset.patches instead of random GQL queries.
riannucci Oct 30, 2013
1510b1f
Merge default @ 8665f2633aea
riannucci Oct 30, 2013
2be99dd
Fix typo/bug in https://codereview.appspot.com/19610043/.
riannucci Oct 30, 2013
c617174
Merge default @ d7447b56e736
riannucci Oct 30, 2013
0fd714e
Improve json_response to allow adjusting the HTTP code.
riannucci Oct 30, 2013
b2064c6
Merge default @ 06b194fe356e
riannucci Oct 30, 2013
55250ff
Move decorators and responses to their own files.
riannucci Oct 30, 2013
d0afe6b
Move decorators and responses to their own files.
riannucci Oct 30, 2013
464dd48
Move decorators and responses to their own files (adds missing files)
riannucci Oct 30, 2013
a472220
Merge default @ 88778e0be667
riannucci Oct 30, 2013
ef488b6
Move _notify_issue and related endpoints to notify_xmpp.py
riannucci Nov 1, 2013
bab7bf6
Merge default @ 61ffe4c50c3c
riannucci Nov 1, 2013
e400832
Remove form-based issue upload/updating.
riannucci Nov 2, 2013
52e9d21
Merge default @ 5142e8db5f91
riannucci Nov 2, 2013
9ba4585
Fix reverse() call in notify_xmpp.
riannucci Nov 2, 2013
cd2ca97
Merge default @ f7246582236b
riannucci Nov 2, 2013
77a4a7b
Issue 21070043: Fix upload.py when the git diff.noprefix option is en…
andialbrecht Nov 2, 2013
03823e1
Added a timeout to the upload.py urllib.open() call.
maruel Nov 4, 2013
f169d5f
Merge default @ 32de48ffdd99.
maruel Nov 4, 2013
417ad04
Fix display bug for tryjob results.
riannucci Nov 4, 2013
6ffefd6
Revert "Fix display bug for tryjob results."
riannucci Nov 5, 2013
5477bda
Improve git similarity detection
maruel Nov 10, 2013
bb73f89
Merge default @ 45476f54945d.
maruel Nov 10, 2013
a95b2b3
Correct a typo in upload.py git section.
isaacl Nov 12, 2013
416280a
Merge default @ 7f692a624f2e
isaacl Nov 12, 2013
f719004
One-Click Revert
rmistry Nov 22, 2013
641f8a4
Remove local_base and various references to it.
riannucci Nov 23, 2013
1b24b9c
Merge default @ 1213:79683c1dba5f
riannucci Nov 23, 2013
abfe8b4
Removing local_base from revert_patchset
rmistry Nov 23, 2013
d9a7fa2
index.yaml: add cc index for issues with +modified sort order
rsc Dec 5, 2013
6fe33f8
Check the commit box for one-click revert CLs after everything is sub…
rmistry Dec 11, 2013
ac3da01
Detect an incompletely uploaded patchset in One-Click revert
rmistry Dec 14, 2013
fa35167
Copy the BUG= line from the original CL for One-Click Revert
rmistry Dec 20, 2013
e9beed8
Add ability to edit patchset titles from issue.html
rmistry Jan 13, 2014
bd1e8b6
Merge default @ 1459d4ad1b36
rmistry Jan 13, 2014
fae206c
Create more descriptive revert messages for One-Click Reverts
rmistry Jan 14, 2014
4ea46b4
Update title of use_uploadpy page.
andialbrecht Jan 18, 2014
455763d
Update job status based just on the final job result
Jan 25, 2014
831da54
Update to Django 1.4.
andialbrecht Jan 27, 2014
be2a679
Block /all from googlebot.
maruel Jan 28, 2014
97ba794
Add a msg to the issue (with the user email) when the CQ box is check…
rmistry Jan 31, 2014
3a47d30
CSS proeprty changes for the edit patchset titles link
rmistry Feb 3, 2014
fd7dacc
merge
rmistry Feb 3, 2014
e4a980c
CSS property changes for the edit patchset titles link
rmistry Feb 3, 2014
4e6a95c
Prevent any @chromium.org or @google.com account from adding a patch
jrobbins-at-chromium Feb 3, 2014
8b0ceb2
New approach to closing rietveld upload security hole.
jrobbins-at-chromium Feb 5, 2014
b0d524b
Handle '\ No newline at end of file' during inversion of patches in R…
rmistry Feb 6, 2014
217be38
merge
rmistry Feb 6, 2014
edf49ca
Support multiple buildbot master for try jobs.
Feb 21, 2014
c9453b0
Removed the unused repos and branches pages and models.
jrobbins-at-chromium Feb 27, 2014
677e505
Automatically check CQ bit after LGTM and uncheck it for 'not LGTM'
rmistry Mar 6, 2014
1035ce3
Backed out changeset 10dc0231d90c
jrobbins-at-chromium Mar 7, 2014
990fbd0
Disable inbound email LGTMs.
jrobbins-at-chromium Mar 7, 2014
e612fb1
Added Makefile target for a staging server.
jrobbins-at-chromium Mar 7, 2014
a95ce7d
Fix to Makefile error.
jrobbins-at-chromium Mar 7, 2014
cbc25b2
Make rietveld uploads somewhat less flakey by using strongly consistent
jrobbins-at-chromium Mar 10, 2014
451e6cc
Make rietveld uploads somewhat less flakey by using strongly consistent
jrobbins-at-chromium Mar 12, 2014
aa2c1fc
Add drafts to patchset_as_dict.
jrobbins-at-chromium Mar 18, 2014
585bef7
Add drafts to patchset_as_dict.
jrobbins-at-chromium Mar 18, 2014
e6c14e2
Reduce contention during uploads by batching put() calls.
jrobbins-at-chromium Mar 18, 2014
f3b063a
Reduce contention during uploads by batching put() calls.
jrobbins-at-chromium Mar 18, 2014
fcc6b26
Sort patches by pathname to avoid randomness.
jrobbins-at-chromium Mar 18, 2014
03148a7
Make pagination link say "Next" to handle all orderings when using cu…
jrobbins-at-chromium Mar 18, 2014
06bd82d
Make pagination link say "Next" to handle all orderings when using cu…
jrobbins-at-chromium Mar 18, 2014
01adf44
Fix to batch put() call because content must be saved before we can r…
jrobbins-at-chromium Mar 19, 2014
442f88c
Fix "Try more bots" for multiple tryserver support.
jrobbins-at-chromium Mar 20, 2014
055cc4b
Autocomplete filter out blocked users via python code rather than que…
jrobbins-at-chromium Mar 20, 2014
8edc848
Autocomplete filter out blocked users via python code rather than que…
jrobbins-at-chromium Mar 20, 2014
23f2e5b
Fix to batch put() call because content must be saved before we can r…
jrobbins-at-chromium Mar 19, 2014
e89eeb0
Update Skia's tryserver URLs in Rietveld to use DNS names instead of IPs
rmistry Mar 25, 2014
f2e160e
Update to Django 1.4.
andialbrecht Jan 27, 2014
a086e11
Remove sketchy SECRET_KEY and replace it with a highly visible except…
jrobbins-at-chromium Mar 25, 2014
05a52b9
Remove sketchy SECRET_KEY and replace it with a highly visible except…
jrobbins-at-chromium Mar 25, 2014
f4b6a74
Order files in a patchset with header files before implementations.
jrobbins-at-chromium Mar 26, 2014
cedee06
Order files in a patchset with header files before implementations.
jrobbins-at-chromium Mar 26, 2014
3d9daf0
Add comment message_id to the JSON API response for patchsets.
jrobbins-at-chromium Mar 26, 2014
8767a9c
Add comment message_id to the JSON API response for patchsets.
jrobbins-at-chromium Mar 26, 2014
ec6f97b
Simplify and further reduce datastore contention during uploads.
jrobbins-at-chromium Mar 26, 2014
c1c9533
Simplify and further reduce datastore contention during uploads.
jrobbins-at-chromium Mar 26, 2014
67f6214
Give upload.py a module-scope logger.
aarongable Apr 4, 2014
ecd63d6
Give upload.py a module-scope logger.
aarongable Apr 4, 2014
bcbebd6
Use preferred host name when sending reminder email.
jrobbins-at-chromium Apr 4, 2014
8ba05ac
Make try jobs timestamps reliably comparable.
jrobbins-at-chromium Apr 4, 2014
c07cffa
Avoid sending email when upload fails.
jrobbins-at-chromium Apr 8, 2014
a56de47
Avoid sending email when upload fails.
jrobbins-at-chromium Apr 8, 2014
99481cb
Add confirmation before deleting code review issues.
jrobbins-at-chromium Apr 8, 2014
1019c67
Add confirmation before deleting code review issues.
jrobbins-at-chromium Apr 8, 2014
b87ab55
Use viewed_account template variable for the user being viewed.
jrobbins-at-chromium Apr 11, 2014
1fa5138
Use viewed_account template variable for the user being viewed.
jrobbins-at-chromium Apr 11, 2014
ec36d1e
Make automatically checking CQ for one-click revert CLs configurable
rmistry Apr 15, 2014
a6cc2a5
Merge
rmistry Apr 15, 2014
7f39820
Escape template variables in javascript expressions with Djangp's esc…
jrobbins-at-chromium Apr 17, 2014
9ba0abc
Escape template variables in javascript expressions with Djangp's esc…
jrobbins-at-chromium Apr 17, 2014
eaeaa46
Use issue and patchset in the try server job even if it is triggered.
jrobbins-at-chromium Apr 17, 2014
44e218a
Only offer revert to likely users, and don't TBR old CLs.
jrobbins-at-chromium Apr 25, 2014
cd3c9d2
Upgrade rietveld from AppEngine db to ndb.
jrobbins-at-chromium Apr 28, 2014
6f6f0bb
Merge.
jrobbins-at-chromium Apr 28, 2014
7679a39
Revert the upgrade from db to ndb in
jrobbins-at-chromium Apr 29, 2014
64978a7
Preparation for db to ndb upgrade.
jrobbins-at-chromium Apr 29, 2014
441f0c4
Roll forward the upgrade from db to ndb.
jrobbins-at-chromium Apr 30, 2014
5ce5a02
Fix for type error: str(Key) vs. Key.
jrobbins-at-chromium May 1, 2014
e681208
Fix for _patchset_as_dict.
jrobbins-at-chromium May 1, 2014
1c5b3ba
Handle case where fetch_page() returns cursor as None.
jrobbins-at-chromium May 1, 2014
29b0aa8
Delete some unused code: rietveld.py and shell.py.
jrobbins-at-chromium May 2, 2014
7036894
Allow more bot checkboxes to be set in one update.
jrobbins-at-chromium May 9, 2014
bdd083a
Merging ndb prep from default to chromium branch.
jrobbins-at-chromium May 12, 2014
05af6a7
First step toward ndb on the chromium branch.
jrobbins-at-chromium May 13, 2014
d2ca212
Merged in ndb changes and fixes from default branch.
jrobbins-at-chromium May 13, 2014
c383a66
Upgrade rietveld chromium branch specific parts to use ndb.
jrobbins-at-chromium May 13, 2014
2f8e56f
Remove unneeded call to get() when comparing two selected versions.
jrobbins-at-chromium May 15, 2014
fca5151
Remove unneeded call to get() when comparing two selected versions.
jrobbins-at-chromium May 15, 2014
158888b
Fix some minor defects in ndb upgrade.
jrobbins-at-chromium May 15, 2014
672646e
Back out one mistaken NDB upgrade detail. The item is a PatchSet
jrobbins-at-chromium May 15, 2014
80bb027
Two more minor ndb defect fixes.
jrobbins-at-chromium May 16, 2014
859ebdf
Two more minor ndb defect fixes.
jrobbins-at-chromium May 16, 2014
72d8c25
More NDB fixes to chromium-branch specific code.
jrobbins-at-chromium May 16, 2014
9e5c782
NDB keys need to be encoded with .urlsafe().
jrobbins-at-chromium May 16, 2014
6250bd5
Skip querying for comments if patch does not exist, and also correctl…
jrobbins-at-chromium May 17, 2014
7a24904
Skip querying for comments if patch does not exist, and also correctl…
jrobbins-at-chromium May 17, 2014
495242a
Make get_pending_try_patchsets avoid underfilling results and more pr…
jrobbins-at-chromium May 20, 2014
6c752ba
Use query iterator in JSON searches to avoid underfilling pages.
jrobbins-at-chromium May 21, 2014
7f49940
Use query iterator in JSON searches to avoid underfilling pages.
jrobbins-at-chromium May 21, 2014
e38b31a
Add 'project' field
jrobbins-at-chromium May 23, 2014
bfa69fb
Add 'project' field
jrobbins-at-chromium May 23, 2014
2b9ab4f
Return the cursor after the last result, even if the next page would …
jrobbins-at-chromium May 27, 2014
b657e56
Return the cursor after the last result, even if the next page would …
jrobbins-at-chromium May 28, 2014
66f6b9a
Fix missing import, and key vs. entity error.
jrobbins-at-chromium Jun 4, 2014
e390a1a
Fix lower_email and lower_nickname on newly created Account entities.
jrobbins-at-chromium Jun 4, 2014
01c61c9
Fix lower_email and lower_nickname on newly created Account entities.
jrobbins-at-chromium Jun 4, 2014
4efd214
Whitespace changes from webrtc clone.
jrobbins-at-chromium Jun 5, 2014
89b27fd
Whitespace and bug tracker autolink changes from webrtc instance.
jrobbins-at-chromium Jun 5, 2014
0341cc1
Add author email addr to notification subject lines for easier filter…
jrobbins-at-chromium Jun 5, 2014
8d34c7c
Add author email addr to notification subject lines for easier filter…
jrobbins-at-chromium Jun 5, 2014
7a4d813
Simplify some ndb queries.
jrobbins-at-chromium Jun 5, 2014
faf3df2
merge
jrobbins-at-chromium Jun 5, 2014
217c944
Support nacl and gyp cq.
jrobbins-at-chromium Jun 6, 2014
8e9240b
Convert gql calls to ndb queries.
jrobbins-at-chromium Jun 6, 2014
a4f25c1
Merge
jrobbins-at-chromium Jun 6, 2014
dde117b
Chromium-branch part of converting GQL to ndb, plus a fix to /convers…
jrobbins-at-chromium Jun 6, 2014
090d999
Really avoid underfilling search and /get_pending_try_patchset result…
jrobbins-at-chromium Jun 11, 2014
5bac3d9
Really avoid underfilling search result pages.
jrobbins-at-chromium Jun 11, 2014
66a8dad
Rietveld old-style cursors for 'tail -f', has_more.
jrobbins-at-chromium Jun 11, 2014
40645df
Fix the Rietveld cron job that deletes stale try jobs.
jrobbins-at-chromium Jun 12, 2014
cf52a17
Accept inbound email with or without the username at the end.
jrobbins-at-chromium Jun 13, 2014
be2f847
Accept inbound email with or without the username at the end.
jrobbins-at-chromium Jun 13, 2014
7a6f2dd
Disable trybot and CQ features for private code reviews.
jrobbins-at-chromium Jun 13, 2014
3d84004
Don't return tryjobs in private issues, and speed up /get_pending_try…
jrobbins-at-chromium Jun 16, 2014
9a0157d
Added absolute timestamp to the messages.
jrobbins-at-chromium Jun 16, 2014
78bc5c9
Added absolute timestamp to the messages.
jrobbins-at-chromium Jun 16, 2014
7d2cfdc
Check the cron request header in the format that we get it.
jrobbins-at-chromium Jun 19, 2014
271b837
Add retry logic when calling oauth.get_client_id().
jrobbins-at-chromium Jun 19, 2014
d95f22d
Add retry logic when calling oauth.get_client_id().
jrobbins-at-chromium Jun 19, 2014
56118f3
Fix background task that calculates deltas.
jrobbins-at-chromium Jun 20, 2014
6936447
Fix background task that calculates deltas.
jrobbins-at-chromium Jun 20, 2014
7428738
Reject requests to set the commit flag and trybots on private issues.
jrobbins-at-chromium Jun 20, 2014
65da71e
Update rietveld unit tests and get them running again.
jrobbins-at-chromium Jun 26, 2014
700f831
Update rietveld unit tests and get them running again.
jrobbins-at-chromium Jun 26, 2014
b0be582
Fix nacl path.
jrobbins-at-chromium Jun 27, 2014
878b4e8
Update rietveld stats to use ndb cursors.
jrobbins-at-chromium Jun 27, 2014
c949c11
Update rietveld stats to use ndb cursors.
jrobbins-at-chromium Jun 27, 2014
9685d88
codereview: preserve first mail subject for entire review thread
rsc Jun 30, 2014
9edef17
codereview: match folded subject lines
rsc Jun 30, 2014
e7acdd1
codereview: fix bug in mail_subject
rsc Jul 1, 2014
53c68a7
Merged 161c4bc39310
jrobbins-at-chromium Jul 1, 2014
356a59d
codereview: fix subject-based threading to use oldest message
rsc Jul 2, 2014
f9c9154
Rename ndb key fields to include "_key" in the name.
jrobbins-at-chromium Jul 2, 2014
a985a9b
Merge
jrobbins-at-chromium Jul 2, 2014
0a32fb2
Merged c07f35ae1d66
jrobbins-at-chromium Jul 2, 2014
9f6ff2b
Fixed one line that was missed in the addition of _key to key fields.
jrobbins-at-chromium Jul 2, 2014
7736f58
Chromium branch changes to rename ndb key fields to have _key in names.
jrobbins-at-chromium Jul 7, 2014
7f77af1
Add 'Ack' button to Rietveld
rmistry Jul 9, 2014
00badf1
Set the TryJobResult requester based on the passed in property.
jrobbins-at-chromium Jul 10, 2014
c1f45b8
Add 'Ack' button to Rietveld
jrobbins-at-chromium Jul 10, 2014
4a9ebc8
Small fix to image serving for added or removed images. When these i…
jrobbins-at-chromium Jul 10, 2014
2153746
Fix handling of cron requests that go to http instead of https.
jrobbins-at-chromium Jul 11, 2014
b761f8c
Change private checkbox to protected and add help text.
jrobbins-at-chromium Jul 15, 2014
570dc50
Change private checkbox to protected and add help text.
jrobbins-at-chromium Jul 15, 2014
288eeed
Display "Project" in the Issue's UI
rmistry Jul 17, 2014
8464351
Display "Project" in the Issue's UI
rmistry Jul 17, 2014
861a6a9
Handle code with ^L characters.
jrobbins-at-chromium Jul 17, 2014
c91d0f8
Handle code with ^L characters.
jrobbins-at-chromium Jul 17, 2014
042a93b
Use transactions when updating Patch entities during upload.
jrobbins-at-chromium Jul 17, 2014
3c9f655
Use transactions when updating Patch entities during upload.
jrobbins-at-chromium Jul 17, 2014
ac3d8c1
Don't calculate deltas when viewing issues because that's done in a t…
jrobbins-at-chromium Jul 17, 2014
99a97d6
Don't calculate deltas when viewing issues because that's done in a t…
jrobbins-at-chromium Jul 17, 2014
688d4ae
Avoid gcl timeouts by doing server-side linting in tasks.
jrobbins-at-chromium Jul 17, 2014
bc771da
Skip really old tryjobs even if issue is still open.
jrobbins-at-chromium Jul 18, 2014
4395d4e
Add ability to search using the Issue's project
rmistry Jul 22, 2014
0809d3f
Add indexes so that users can search by code review base URL.
jrobbins-at-chromium Jul 24, 2014
25cd484
Make issue description preserve whitespace.
jrobbins-at-chromium Jul 25, 2014
31f8733
JSON URLs in chromiumcodereview after tryserver.chromium split.
riannucci Jul 26, 2014
10fc4ad
Handle tryjob requesters that are '' or invalid users.
jrobbins-at-chromium Jul 26, 2014
90b40d6
Fix double newline in issue description after rad9d77cec2eb982c2aa849…
sgraham Jul 27, 2014
b3120de
Add index for just project and modified.
jrobbins-at-chromium Jul 30, 2014
0dc1f09
Limit width of code review metadata column
jrobbins-at-chromium Jul 30, 2014
af68923
Added index for closed, owner, -created.
jrobbins-at-chromium Jul 31, 2014
dcf4912
When getting content for a moved file w/ history, don't convert newli…
jrobbins-at-chromium Aug 5, 2014
7b00ef3
Fix to saving message drafts (the "M" keystroke).
jrobbins-at-chromium Aug 5, 2014
312d69f
Update old except-comma syntax to except-as, and fix an undefined var…
jrobbins-at-chromium Aug 6, 2014
a1646b9
Add help text to search date fields.
jrobbins-at-chromium Aug 7, 2014
d20012b
Provide try master name in tooltip for tryjob bubbles.
jrobbins-at-chromium Aug 8, 2014
b86454b
Record who checked the CQ bit when using 'Quick LGTM & CQ'
rmistry Aug 8, 2014
4bd69d5
merge
rmistry Aug 8, 2014
da31415
Add client.skia trybots
rmistry Aug 11, 2014
7b9d519
Display which patchset the one-click revert button reverted.
rmistry Aug 11, 2014
c82e612
Make style and JS changes take effect immediately after deploying a v…
jrobbins-at-chromium Aug 12, 2014
813133f
Automatically build mapreduce diectory when trying to serve locally.
jrobbins-at-chromium Aug 12, 2014
6bac2d4
Give unique ids to the trybot category divs
rmistry Aug 13, 2014
a012bc5
Fill master field for triggered jobs.
jrobbins-at-chromium Aug 13, 2014
7f1ce22
Log when a patchset is deleted and when reviewers change
rmistry Aug 20, 2014
78c1bb1
merge
rmistry Aug 20, 2014
145aff5
Remove condition for adding TBR= lines in reverted CLs.
jrobbins-at-chromium Aug 20, 2014
e274326
Make lgtm detection have fewer false positives.
jrobbins-at-chromium Aug 20, 2014
9e34d8b
Fix to stats for new lgtm detection.
jrobbins-at-chromium Aug 20, 2014
f1c1718
Set the issue description text to pre-wrap and use CSS instead of inl…
jrobbins-at-chromium Aug 21, 2014
476678f
Allow admins to delete issues through the UI.
jrobbins-at-chromium Aug 21, 2014
b11f707
Fix initial diff email feature by calling put() on auto-generated Mes…
jrobbins-at-chromium Aug 25, 2014
25e5e0e
Delay the creation of the reviewers change log message
jrobbins-at-chromium Aug 26, 2014
5e4c0f3
Delete collaborator unit tests since that feature was removed.
jrobbins-at-chromium Aug 26, 2014
33adc96
Move failing stats tests aside.
jrobbins-at-chromium Aug 26, 2014
e59b31a
Add a test for views_chromium.
jrobbins-at-chromium Aug 27, 2014
7967851
Add the patchset id to one-click revert messages
rmistry Aug 27, 2014
5f83bd7
Create new auto_generated field in Messages and stop logging patchset…
rmistry Aug 27, 2014
4710805
Do not treat auto_generated messages as published messages
rmistry Aug 28, 2014
466d62a
Linkify project name to its review issues
techtonik Aug 29, 2014
6401530
Add ability to display/hide auto generated messages
rmistry Sep 2, 2014
77d950b
Merge
rmistry Sep 2, 2014
5c62d57
Make EXCEPTION tryjob bubbles purple.
jrobbins-at-chromium Sep 2, 2014
c9eef5c
Log patchset deletion messages as auto generated messages
rmistry Sep 2, 2014
b9442e5
Merge
rmistry Sep 2, 2014
1314409
Make Message queries work with old entities that don't have auto_gene…
jrobbins-at-chromium Sep 3, 2014
270e049
Add index needed for change in Message queries.
jrobbins-at-chromium Sep 3, 2014
1814960
Add patchset ID to each message in /api/1234567?messages=true
jrobbins-at-chromium Sep 4, 2014
794564e
Expand last non-generated message
rmistry Sep 8, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ REVISION$
htmlcov$
.DS_Store$
workspace.xml$
mapreduce/.*
73 changes: 62 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
# Makefile to simplify some common AppEngine actions.
# Use 'make help' for a list of commands.

# Helper code to detect SDK location
define DETECT_SDK
import os
locations = [
"../google_appengine",
"/usr/local/google_appengine",
".locally/google_appengine",
]
for path in locations:
if os.path.exists(path):
print(path)
break
endef
# /Helper

APPID?= `cat app.yaml | sed -n 's/^application: *//p'`
STAGEID= $(APPID)-staging

SDK_PATH ?=
SDK_PATH ?= $(shell python -c '$(DETECT_SDK)')

DEV_APPSERVER?= $(if $(SDK_PATH), $(SDK_PATH)/,)dev_appserver.py
DEV_APPSERVER_FLAGS?=

APPCFG?= $(if $(SDK_PATH), $(SDK_PATH)/,)appcfg.py
APPCFG_FLAGS?=

PYTHON?= python2.5
# Set dirty suffix depending on output of "hg status".
dirty=
ifneq ($(shell hg status),)
dirty="-tainted"
endif
VERSION_TAG= `hg parents --template='{rev}:{node|short}'`$(dirty)
# AppEngine version cannot use ':' in its name so use a '-' instead.
VERSION?= `hg parents --template='{rev}-{node|short}'`$(dirty)

PYTHON?= python2.7
COVERAGE?= coverage


Expand All @@ -23,40 +48,66 @@ help:

run: serve

serve: update_revision
serve: update_revision mapreduce
@echo "---[Starting SDK AppEngine Server]---"
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) .

serve_remote: update_revision
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) --address 0.0.0.0 .
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) --host 0.0.0.0 --admin_host 0.0.0.0 .

serve_email: update_revision
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) --enable_sendmail .

serve_remote_email: update_revision
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) --enable_sendmail --address 0.0.0.0 .
$(DEV_APPSERVER) $(DEV_APPSERVER_FLAGS) --enable_sendmail --host 0.0.0.0 --admin_host 0.0.0.0 .

update_revision:
@echo "---[Updating REVISION]---"
@echo "`hg id -n`:`hg id -i`" >REVISION
@echo "$(VERSION_TAG)" >REVISION

update: update_revision
update: update_revision mapreduce update_backend
@echo "---[Updating $(APPID)]---"
$(APPCFG) $(APPCFG_FLAGS) update . --application $(APPID) --version $(VERSION)
$(APPCFG) $(APPCFG_FLAGS) update . --oauth2 --application $(APPID) --version $(VERSION)

update_backend: update_revision mapreduce
@echo "---[Updating backend $(APPID)]---"
$(APPCFG) $(APPCFG_FLAGS) backends update . --oauth2 --application $(APPID) --version $(VERSION)

upload: update

deploy: update

update_indexes:
$(APPCFG) $(APPCFG_FLAGS) update_indexes .
$(APPCFG) $(APPCFG_FLAGS) update_indexes . --oauth2 --application $(APPID)

vacuum_indexes:
$(APPCFG) $(APPCFG_FLAGS) vacuum_indexes .
$(APPCFG) $(APPCFG_FLAGS) vacuum_indexes . --oauth2 --application $(APPID)

test:
$(PYTHON) tests/run_tests.py $(SDK_PATH)
$(PYTHON) tests/run_tests.py

coverage:
$(COVERAGE) run --branch tests/run_tests.py $(SDK_PATH)
$(COVERAGE) html --include="codereview/*"

# Checkout mapreduce library and apply a little patch.
# See https://code.google.com/p/appengine-mapreduce/issues/detail?id=174
mapreduce:
svn co -r 491 http://appengine-mapreduce.googlecode.com/svn/trunk/python/src/mapreduce
cd mapreduce/ && patch < ../mapreduce.patch


# AppEngine apps can be tested locally and in non-default versions upload to
# the main app-id, but it is still sometimes useful to have a completely
# separate app-id. E.g., for testing inbound email, load testing, or something
# that might clutter the real datastore.
stage: update_revision mapreduce stage_backend
@echo "---[Staging $(STAGEID)]---"
$(APPCFG) $(APPCFG_FLAGS) update . --oauth2 --application $(STAGEID) --version $(VERSION)

stage_backend: update_revision mapreduce
@echo "---[Staging backend $(STAGEID)]---"
$(APPCFG) $(APPCFG_FLAGS) backends update . --oauth2 --application $(STAGEID) --version $(VERSION)

stage_indexes:
$(APPCFG) $(APPCFG_FLAGS) update_indexes . --oauth2 --application $(STAGEID)
31 changes: 18 additions & 13 deletions README
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Welcome to Rietveld
-------------------

This project shows how to create a somewhat substantial web application
using Django on Google App Engine. It requires Django version 1.2.
This project shows how to create a somewhat substantial web
application using Django on Google App Engine. It requires Python 2.7
and Django version 1.3 (although a previous version using Python 2.5
and Django 1.2 can still be found in the py25 branch in the repository).

In addition, I hope it will serve as a practical tool for the Python
developer community, and hopefully for other open source communities.
Expand All @@ -21,7 +23,7 @@ Links

Mondrian video: http://www.youtube.com/watch?v=sMql3Di4Kgc
Google App Engine: http://code.google.com/appengine/
Live app: http://codereview.appspot.com
Live app: http://codereview.chromium.org
About code review: http://en.wikipedia.org/wiki/Code_review
Django: http://djangoproject.com
Python: http://python.org
Expand All @@ -43,20 +45,21 @@ can then run the server using
(assuming you're on Linux or Mac OS X). On Windows just use Google
App Engine Launcher.

Rietveld uses Django 1.2 libraries. They are included in App Engine
SDK version 1.4.2 and above.
Please make sure that you have the most recent version of the App Engine SDK
installed when running Rietveld locally. That's the version that runs in the
production environment too and Rietveld often uses new features.

The server is only accessible on http://localhost:8080. The server in
the Google App Engine SDK is not designed for serving real traffic.
The App Engine FAQ at http://code.google.com/appengine/kb/general.html
The App Engine FAQ at https://developers.google.com/appengine/kb/general
says about this: "You can override this using the -a <hostname> flag
when running it, but doing so is not recommended because the SDK has
not been hardened for security and may contain vulnerabilities."

To deploy your own instance of the app to Google App Engine:

1. Register your own application ID on the App Engine admin site.
2. Edit app.yaml to use this app ID instead of 'codereview-hr'.
2. Edit app.yaml to use this app ID instead of 'chromiumcodereview'.
3. Upload using

make update VERSION=123
Expand All @@ -65,15 +68,17 @@ To deploy your own instance of the app to Google App Engine:
you'll get a error message from "appcfg.py update" (called by "make
update") complaining you don't have the right to administer this app.

*** Don't update the Python runtime in app.yaml to Python 2.7!
Currently Rietveld doesn't support Python 2.7 on App Engine due to
some thread-safety issues (see
http://code.google.com/p/rietveld/issues/detail?id=348).

The VERSION=xxx argument sets the version; the version from the
app.yaml is not used. This is to support a convention used for the
main Rietveld instance (codereview.appspot.com) whereby we never
main Rietveld instance (codereview.chromium.org) whereby we never
deploy to the same version twice; the version must be manually picked
by the developer doing the deployment. If you don't like this, just
edit the Makefile to remove "--version $(VERSION)" and edit app.yaml
to hardcode a version number.

Administration
--------------

Various jobs to administer an instance are collected in admin_tasks.py. These
jobs can be run by an instance administrator by visiting http://<your-
instance>/mapreduce/.
9 changes: 2 additions & 7 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ Patch Sets
Edit patch set message
Delete patch sets

Repositories and Branches
-------------------------

Get rid of the repository feature in favor of always using upload.py?
Edit/Delete Repository?
Automatically add Repository entries when a new project uploads stuff?

Searching, Organizing
---------------------

Expand Down Expand Up @@ -67,3 +60,5 @@ Software Engineering
--------------------

Unittests
Move library.py to codereview/templatetags/codereview.py to match the default
Django project layout.
29 changes: 29 additions & 0 deletions admin_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Collection of mapreduce jobs."""

import logging
from mapreduce import operation as op
from codereview.models import Account, Issue


def delete_unused_accounts(account):
"""Delete accounts for uses that don't participate in any reviews."""
email = account.user.email()
if Issue.query(Issue.owner_email == email).get():
return
if Issue.query(Issue.cc == email).get():
return
if Issue.query(Issue.reviewers == email).get():
return
logging.warn('Deleting %s' % email)
yield op.db.Delete(account)


def update_account_schema(account):
"""Update schema for all Accounts by saving them back to the datastore."""

# Make sure we don't alter the modified time of any accounts. Because of how
# mapreduce is designed, we just set this to False on every function
# invocation (since there's no convenient once-per-instance place to do it).
Account.modified.auto_now = False

yield op.db.Put(account)
50 changes: 43 additions & 7 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
application: codereview-hr
application: chromiumcodereview-hr
version: use-version-arg
runtime: python
runtime: python27
api_version: 1
threadsafe: false

includes:
- mapreduce/include.yaml

default_expiration: 7d # This is good for images, which never change

# The commented "secure: always" handler can't be enabled for appspot.com
# applications with a custom domain, since GAE doesn't support HTTPS on custom
# domains at the moment.
handlers:

- url: /(robots.txt|favicon.ico)
Expand All @@ -16,24 +23,53 @@ handlers:
upload: static/robots.txt

- url: /static/upload.py
script: main.py
script: main.application
# secure: always

# These are fetched with the rietveld version number in the URL.
- url: /static/(script.js|styles.css)
static_files: static/\1
upload: static/(script.js|styles.css)
expiration: 1h # Shorter expiration, these change often
# secure: always

- url: /static
static_dir: static
# secure: always

# Admin-only URLs like tasks or cron jobs. See cron.yaml and queue.yaml.
- url: /restricted/.*
script: main.application
login: admin

# These seem to be hit over http and cannot deal with a 302 to https.
- url: /_ah/(start|stop)
script: backends.app
login: admin

- url: .*
script: main.py
- url: /.*
script: main.application
# secure: always

admin_console:
pages:
- name: Client ID and Secret Settings
url: /restricted/set-client-id-and-secret

inbound_services:
- mail
- xmpp_message
- warmup

builtins:
- appstats: on
# To reenable appstats, do not forget to update appengine_config.py too.
#- appstats: on
- remote_api: on

libraries:
- name: django
version: 1.4
- name: webapp2
version: 2.5.2

env_variables:
DJANGO_SETTINGS_MODULE: 'settings'
20 changes: 12 additions & 8 deletions appengine_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
import logging
import os
import re
import sys

from google.appengine.ext.appstats import recording

logging.info('Loading %s from %s', __name__, __file__)

# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
# If reenabling appstats, do not forget to reeanble it in app.yaml too.
#app = recording.appstats_wsgi_middleware(app)
return app

# Custom Appstats path normalization.
Expand All @@ -31,12 +33,14 @@ def appstats_normalize_path(path):
return path[:i] + '/X'
return re.sub(r'\d+', 'X', path)

# Declare the Django version we need.
from google.appengine.dist import use_library
use_library('django', '1.2')
# Segregate Appstats by runtime (python vs. python27).
appstats_KEY_NAMESPACE = '__appstats_%s__' % os.getenv('APPENGINE_RUNTIME')

# Django 1.2 requires DJANGO_SETTINGS_MODULE environment variable to be set
# http://code.google.com/appengine/docs/python/tools/libraries.html#Django
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
# NOTE: All "main" scripts must import webapp.template before django.
# Enable Interactive Playground.
appstats_SHELL_OK = True

# Enable RPC cost calculation.
appstats_CALC_RPC_COSTS = True

# Enable third-party imports
sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
23 changes: 23 additions & 0 deletions backends.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import webapp2

class BackendHandler(webapp2.RequestHandler):
def get(self):
pass

app = webapp2.WSGIApplication(routes=[
(r'/_ah/.*', BackendHandler),
])
4 changes: 4 additions & 0 deletions backends.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
backends:
- name: mapreduce-backend
instances: 10
options: dynamic
Loading