Commit Graph

603 Commits

Author SHA1 Message Date
acrefoot 7ecace0066 Improve deployment locking tool; now with color
(imported from commit e02056ee43e748c29ce59fc9558f1b324d01bb8a)
2014-01-22 16:40:45 -05:00
Zev Benjamin 3b8f45a78b Teach {un}block-deployments how to {un}block deployments to prod
(imported from commit b2b292ede08a6bfc6d8804fedbefa4e622130a18)
2014-01-21 15:43:42 -05:00
Tim Abbott a8825e1c5d Fix linting for zerver/lib/tornado_ioloop_logging.py with older pyflakes.
(imported from commit 998d95df05acdc610336bf6da48fafd8c129e52e)
2014-01-14 11:43:06 -05:00
Steve Howell eaeb097026 Rename tools/PythonProxy.py to tools/python-proxy.
(imported from commit c3f7efa200109f7e778d3cd55a8442b4fc7f7139)
2014-01-14 11:16:12 -05:00
Steve Howell 88f5a89c93 Avoid touching changed_files when prev_deploy is None.
(imported from commit d72d2c34fb5301a6ffdc134bb6ea0db78ef80938)
2014-01-11 16:38:50 -05:00
Luke Faraone e8632635d0 Distribute "get_streams" endpoint in API.
We changed our endpoint from "get_public_streams" in August, but the
API call whitelist was not updated.

(imported from commit 293c1da8e43c24ad8188ed2096a47992ad3a2c89)
2014-01-11 15:52:21 -05:00
Steve Howell 1ad82b1f70 Make run-dev.py watch for template changes.
Have run-dev.py watch for template changes by calling
`./tools/compile-handlebars-templates forever`.  This doesn't
have much effect until the subsequent commit, but it does
alert users to broken templates.

(imported from commit 3fa5f403cabe0057f6f43180f1d09db669d98682)
2014-01-10 21:39:04 -05:00
Steve Howell d256994528 Add "forever" option to tools/compile-handlebars-templates.
The "forever" option causes the tool to continue looking for
template changes and, when they happen, to recompile them.

(imported from commit 2fa719a205f02c7c90cc071f99252148a888654f)
2014-01-10 21:39:03 -05:00
Steve Howell 1f82cb2138 Created tools/compile-handlebars-templates
(imported from commit 731e6a0a663dccaa8e6667a8a8ffdbf9ae208e52)
2014-01-10 21:39:03 -05:00
Steve Howell 22dcf2e883 Never use compiled handlebars templates from the previous deploy.
Before this change, we were compiling handlebars templates but then
still sometimes used the copy of compiled.js from the previous deploy,
which made zero sense. Since compiling is super fast, we continue to
compile during every deployment, and now we actually use the results
of compiling. Forcing a recompile every time avoids pitfalls like
failing to notice deleted files or failing to notice a Handlebars
upgrade.

(imported from commit 675932428ec420bfe0fd5a5c748a85600206764c)
2014-01-10 21:39:03 -05:00
Leo Franchi 2b68a1520a Move message insertion into standalone method
(imported from commit 25706d73e5629130ad278c858e67cc9148515706)
2014-01-07 17:33:33 -05:00
Jason Michalski 14c0f3def9 Fix the path in postgres-init-db to get-django-setting
postgres-init-db was expecting to be located two directories below the
project root. It is only one directory below the root of the project so
remove a set of .. .

(imported from commit 228b47ac2539caf2b6cd12a1b5f399534cf0c866)
2014-01-07 10:24:04 -05:00
Tim Abbott 8f865af0c1 Stop automated backups of legacy wiki.
(imported from commit 1cc9bdfac429cb3f75bb5981364591c067a8b13c)
2014-01-06 15:26:06 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Steve Howell ea49e9d1b0 Rename check-handlebar-templates to check-templates.
(It's been checking Django templates too.)

(imported from commit e1a92210d07dfd68666a8c93642c4eb8d5ff081f)
2013-12-17 12:44:59 -05:00
acrefoot c30f2bbe3e slightly stricter linting of html templates
(imported from commit 5bd0aa3c49d6ff95559a73bd5f134cc50ae98ce9)
2013-12-17 12:05:23 -05:00
Steve Howell 751f400afb Add a --minimal option to run-dev.py.
This replaces the --noworkers option; the new --minimal option
starts a couple "essential" workers.

(imported from commit 4ca08709052c47257bc0448e51760edb4969d92e)
2013-12-16 14:36:06 -05:00
Tim Abbott 5c9def5be4 Add script to parse user agents with historical data set.
(imported from commit e529c0b914ed3d3d06e9581a6239676f68c97b3f)
2013-12-13 11:26:36 -05:00
Steve Howell 504d882090 Add --noworkers option to run_dev.
(imported from commit d8253f50af79fcf290e75d31d5c5d9b79118a463)
2013-12-13 10:17:27 -05:00
Tim Abbott d6aa8ecaff Only send get_updates_xhr error if we don't have a timeout either.
(imported from commit b77c6c67917f8d2bc5d59fb46f3a5ffa4a0ac443)
2013-12-12 17:36:38 -05:00
Tim Abbott 2aad7baac0 Restart get_updates if it is ever not running while sending a message.
(imported from commit 12d74c1193dd978e171d2e2aaf236ad71bebe6a3)
2013-12-12 16:03:45 -05:00
Jessica McKellar b6e46986f0 Remove unused message_tour.js.
(imported from commit e25a9315377ad11d47ad78a5d466df40e306f713)
2013-12-12 11:47:09 -05:00
Tim Abbott 1fb9c09f02 Don't import bugdown in models.py headings.
This allows us to avoid a circular import when importing models.py
from inside bugdown for the realm-filters-from-database branch.

(imported from commit 7de85b54243132ade6818b080abdc8c5e8ad84f5)
2013-12-11 14:39:09 -05:00
Waseem Daher 419a3d3098 Shorter topics for git/svn integration.
(imported from commit 6c9822f6ba383d885e48d3bb64c30e49ea8cf1e5)
2013-12-11 12:20:42 -05:00
Steve Howell d25f0a7580 Add PythonProxy.
This program can help us test error situations like CSS not
loading.

(imported from commit 4c3ed0825401741fe4aa826513d4eb43afd59ea3)
2013-12-11 11:58:10 -05:00
Luke Faraone 1b5c1ac021 Update style of client strings.
(imported from commit 1516461cf53b2715de68e01f16bb8a8cc33c48ad)
2013-12-09 11:47:52 -05:00
Jessica McKellar 81b493ba0b Change pointer semantic to better support side bar users.
There are now 2 cases for narrowing:

1. We narrowed, but only backwards in time (ie no unread were
read). In this case, try to go back to exactly where we were before
narrowing. This behavior is unchanged.

2. We read some unread messages in a narrow. Instead of going back to
where we were before the narrow, go to our first unread message (or
the bottom of the feed, if there are no unread messages). This is new.

This means that after catching up through the sidebar, on returning
home you'll be at the bottom of your feed.

Searching for the first unread message in a message list with 40,000
messages only takes 17ms according to:

function timeit() {
    var t0 = new Date().getTime();
    _.find(current_msg_list.all(), unread.message_unread);
    var t1 = new Date().getTime();
    console.log('Find first unread: ' + (t1 - t0) + ' ms');
}

(imported from commit 87c467578a2cced0aa976d8ae2924371b85d2445)
2013-12-09 10:41:26 -05:00
Luke Faraone 5ada0ab93e Exclude git_p4 from the linter, not our code.
(imported from commit 221a7947f1679dde888198f6d1da2d5bdf8f6ba4)
2013-12-06 11:54:38 -05:00
Steve Howell 87814572c9 Create tools/get-handlebar-vars utility.
This basically prints out a template JSON data structure to
be used with a handlebar template that you specify on the command
line.  (You can actually supply multiple files, too.)

Example usage:

    $ ./tools/get-handlebar-vars static/templates/tab_bar.handlebars
    === static/templates/tab_bar.handlebars
    {
        "tabs": [
            {
                "hash": "",
                "title": "",
                "active": "",
                "icon": true,
                "data": "",
                "cls": ""
            }
        ]
    }

(imported from commit d7239fcae7d94038fa0e4b34c8b1208a1070ecbb)
2013-12-04 13:58:04 -05:00
Tim Abbott 7aef6423de Include /usr/lib/nodejs in node search path.
(imported from commit c818905a91a5fe5754a0bddeb12caa00b50bfed3)
2013-12-02 17:49:08 -05:00
Steve Howell 2423c9bc15 Speed up ./tools/pre-commit by checking only staged files.
(imported from commit 2669635c94c41890bfe712f609b640b013a61782)
2013-12-02 16:14:06 -05:00
Steve Howell 3e51ac2f3d Add -m to lint-all to check modified files.
This uses git ls-files -m, which will show modified and added files,
but it doesn't seem to show staged files, so buyer beware.

(imported from commit 6ecc1d5ee628deae17197addf5586f1f6bcd4b9c)
2013-12-02 16:14:06 -05:00
Steve Howell 72e2fbd725 Allow specific files to be checked by lint-all.
(imported from commit a17800e3ab079e95033243bc82446737dc456b68)
2013-12-02 16:14:06 -05:00
Steve Howell 95320b7369 DRY up forking code in lint-all.
(imported from commit f4c52596c9e9cf0a1be5d4bea26f9793c67f93d5)
2013-12-02 16:14:06 -05:00
Zev Benjamin 87632c6526 install-server: Explicitly disable ControlMaster for the initial ssh
If you use persistent ssh connections, ssh'ing as admin will cause a sshd
process to hang around on the server, preventing us from deleting the admin
account.  Therefore, we disable persistent connections for that ssh connection.

(imported from commit 2d043768417d20ef2f12695475a20b74bf3374de)
2013-11-23 11:41:22 -05:00
Tim Abbott ca8225cf47 [manual] Add endpoint to cleanup a finished events queue.
This requires a puppet apply on each of staging and prod0 to update
the nginx configuration to support the new URL when it is deployed.

(imported from commit a35a71a563fd1daca0d3ea4ec6874c5719a8564f)
2013-11-20 18:34:15 -05:00
Luke Faraone 376a467d89 Tools for building Debian packages and publishing the results.
(imported from commit 2ca54e7f4da57dc1087563a5fb5ce70d82592b85)
2013-11-19 17:02:52 -05:00
Steve Howell 8339a40acd Prevent stale avatars from showing in new messages.
When you upload a 2nd avatar to Zulip, the URL doesn't actually
change, so even new messages can show the old avatar, if your
browser is caching.  We work against the cache by having the
"stamp" argument, which we vary at reload time and also when
we upload the new avatar.  The browser still benefits from
cached images as new messages come in.

(imported from commit 84869c8d7f251c9f2498026a5e9e3b2451784879)
2013-11-19 16:04:41 -05:00
Steve Howell 1c91d1a5bc Clean up back end HTML templates.
The check-handlebars-templates script now looks at most of our
back end templates to try and find imbalanced tags.  This commit
fixes a bunch of the existing templates.

(imported from commit fad4a5d85d68160370dd588b41d6f125f64d198f)
2013-11-19 10:43:56 -05:00
Kevin Mehall b469066e66 Fix emoji on enterprise.
static/ doesn't exist on enterprise, so we can't get the list from the
files there.

(imported from commit ce34a62478abf541feb013da4f970dac3c09d98a)
2013-11-14 11:18:23 -05:00
Kevin Mehall e375f11a78 Check for excluded files in tarball in case .gitattributes doesn't work
Because git < 1.8.1 ignores lines with trailing slashes and
1.8.1.1 - 1.8.1.6 ignore lines without!

(imported from commit 8139a742f4a52ccb1bce4e06fb24c9626fdb01f2)
2013-11-13 17:54:43 -05:00
Tim Abbott bf991dac94 enterprise: Create feedback_bot as a bot.
(imported from commit 8bd985f82aa80380188a644869c55bc54b6f7977)
2013-11-13 17:26:30 -05:00
Zev Benjamin 031dfbcc46 zulip_tools.py: Add a make_deploy_path function and make it invokable from the commandline
(imported from commit 94578d117864fba76f9353784734c712c89c4bf2)
2013-11-13 16:26:04 -05:00
Luke Faraone 6c57a9ec26 Hide 'redefinition of unused' pyflakes errors
(imported from commit d5c0129c40121f8bca8f2ebedde8fcbf03d718f2)
2013-11-13 13:44:14 -05:00
Tim Abbott b2d4883165 postgres-init-db: Split into internal and external versions for now.
(imported from commit 3516b1377e5914dac2b504961922ef8d08148d1f)
2013-11-13 12:02:50 -05:00
Tim Abbott 270f5730fa Rename local server => enterprise in some scripts.
(imported from commit 98cdb4c2e1be5a6abb59821eb32f749c058b773b)
2013-11-12 15:57:42 -05:00
Kevin Mehall e6ca5d265d Include handlebars templates in build-local-server-tarball
update-prod-static needs DEBUG=False. This also replaces our
local_settings.py before generating anything included in the tarball.

(imported from commit 890cd9d1a44acfd2c20e1662e0c68132c633d1b3)
2013-11-12 15:50:07 -05:00
Kevin Mehall d0b81f6b2e build-local-server-tarball: Add prod-static to a clean git archive tarball
This avoids exporting .pyc files and any other junk left behind by the
build process.

(imported from commit 8bdb9de3867b10eb5be9f52b784aa906c5f19d23)
2013-11-12 15:50:07 -05:00
Tim Abbott 442ae115a2 Remove legacy check_output implementation for pre-2.7 Pythons.
We still need it in integrations, because those don't require Python
2.7, but we don't need it in any of our code that runs on internal
servers.

(imported from commit 3c340567f1a372dcb4206c6af9a6e5e18005b1b8)
2013-11-10 09:28:55 -05:00
Steve Howell c11cc80f60 Make build-local-server-tarball work on OSX.
(imported from commit ae0853882181e2489679f8c6870461fab6cb29b4)
2013-11-06 13:49:00 -05:00