Min RK
23ca2039f6
run cleanup_after on ioloop
...
instead of directly on asyncio
2018-04-09 15:09:50 +02:00
Min RK
b291103592
fixup cleanup
2018-04-09 14:51:20 +02:00
Min RK
e962c9993b
don't ask for exception is Future is not done
2018-04-09 14:47:50 +02:00
Min RK
955b769d3f
add missing commits for deprecated ip/port
...
consider for removal
2018-04-09 14:47:34 +02:00
Min RK
9b914e8f01
fix waiting for spawner to fail in progress
2018-04-09 14:46:28 +02:00
Min RK
307ad636dc
test spawner failure mid-progress
2018-04-09 14:46:08 +02:00
Min RK
2952f62726
add cleanup_after fixture
...
function-scoped fixture for shutting down servers
avoids servers leaking into neighbor tests without having to teardown the app itself after every test
2018-04-09 14:24:29 +02:00
Min RK
6d6e48f434
test native async generator on Python 3.6
2018-04-09 13:03:29 +02:00
Min RK
a189196855
ensure async generators are properly closed
...
only terminate with iterate_until in handler, not Spawner._generate_events
2018-04-09 13:03:18 +02:00
Min RK
d30e62a205
test spawn progress
2018-04-09 11:39:07 +02:00
Min RK
e56d416210
Don't delete failed spawners
...
They preserve error messages that are useful
only delete spawners that shutdown cleanly
2018-04-09 11:38:29 +02:00
Min RK
c0f37c48a1
fix wait for spawn future
...
asyncio.wait takes a list
2018-04-09 11:16:17 +02:00
Min RK
a3ed387455
move get_content_type up one level to BaseHandler
...
so all handlers get it
2018-04-09 10:38:02 +02:00
Min RK
beedc94179
delete the spinner
...
no need for a spinner when we have a progress bar
2018-04-09 10:32:28 +02:00
Tim Head
5229604782
Merge pull request #1781 from consideRatio/link-in-doc-fix-pr
...
links in docs corrected
2018-04-08 14:06:57 +02:00
Erik Sundell
cf665517dd
links in docs corrected
2018-04-08 09:10:09 +02:00
sangramga
4663edd8a7
removed comments
2018-04-07 13:09:12 +05:30
Min RK
312e7974d9
limit concurrency of cull requests
...
avoids simultaneous request for deletion of lots of users, which can slow down the Hub
2018-04-06 16:03:48 +02:00
Min RK
ca8aa53b32
remove 'missing' from default route message
...
avoids indication that something went wrong
since this occurs during normal hub startup
2018-04-05 12:12:03 +02:00
Min RK
7122ca1c24
add lock to prevent concurrent calls to check_routes
2018-04-05 12:09:06 +02:00
Min RK
97cdb1a5d8
handle progress_url in user model tests
2018-04-05 11:46:47 +02:00
Min RK
31d3f7a20b
allow isoformat(None)
...
simplifies "if timestamp is None" cases when we are just using it to serialize nullable timestamps to JSON
2018-04-05 11:32:34 +02:00
Min RK
6f8a34127b
consolidate progress url
...
and include it in server models
2018-04-05 11:28:52 +02:00
Min RK
ee1a86d192
progress url is at server/progress
...
instead of server-progress
2018-04-05 11:22:00 +02:00
Min RK
707b300bd6
add iterate_until utility
...
allows iterating through an async generator, yielding items until another Future resolves
if/when that deadline Future resolves, ready items will continue to be yielded until there is one that actually needs to wait
at which point the iteration will halt
2018-04-05 11:22:00 +02:00
Min RK
c9e12182a2
halt progress iteration on completed spawn
...
requires calling `__aiter__` and `__anext__` instead of `async for`
2018-04-05 11:22:00 +02:00
Min RK
9b7186e9b8
close eventstream on success
2018-04-05 11:22:00 +02:00
Min RK
4eb07f9d48
stop spinner on failure
2018-04-05 11:22:00 +02:00
Min RK
4f78cbbd1b
implement progress on spawn_pending page
...
- add Spawner.progress method. Must be an async generator of JSON-able progress events
- add /api/users/:user/server-progress eventstream endpoint
- use eventstream to fill progress bar on the spawn pending page
2018-04-05 11:22:00 +02:00
Min RK
d962e8bcbc
Merge pull request #1748 from minrk/cookie-options
...
expose cookie options and pass them down to spawners
2018-04-05 10:28:46 +02:00
Min RK
ba695a0230
Merge pull request #1750 from minrk/warn-should-start
...
remove warning when generating proxy token if Proxy.should_start
2018-04-05 10:28:18 +02:00
Min RK
dfed2437a8
Merge pull request #1746 from minrk/activity-tracking
...
expand user activity timestamps
2018-04-05 10:27:55 +02:00
Min RK
ecfcb4ec64
Merge pull request #1745 from minrk/rm-redirects
...
clear ?redirects from URL once single-user pages load successfully
2018-04-05 10:25:24 +02:00
Min RK
b9335311de
Merge pull request #1774 from dhirschfeld/patch-1
...
Fix Windows build
2018-04-05 10:24:41 +02:00
Dave Hirschfeld
354468db0a
Fix Windows build
...
Closes #1773
2018-04-05 16:35:29 +10:00
Min RK
340a736722
use age instead of time cutoff
...
gets nicely formatted timedeltas in logging
instead of absolute times
2018-04-03 15:24:10 +02:00
Min RK
7bf93cb7e6
update cull_idle_servers for 0.9
...
- adds max-age
- handle named servers
- refactor culling a bit
2018-04-03 15:24:10 +02:00
Min RK
4fa9535fd4
get upstream changes from cull_idle_servers.py in zero-to-jupyterhub
2018-04-03 15:24:10 +02:00
Min RK
1abd3217aa
always run test_auth_api with 'admin' user
...
avoids inconsistent subsequent state based on db behavior
2018-04-03 15:24:10 +02:00
Min RK
d0360d5c98
update tests with new user models
...
add normalize_user and fill_user utilities
2018-04-03 15:24:08 +02:00
Min RK
74365ad05e
starting a server updates last_activity and started for user and spawner
2018-04-03 15:14:47 +02:00
Min RK
9dc24c0995
add user.created, spawner.started
...
- alembic revision
- in user/spawner models
2018-04-03 15:14:47 +02:00
Min RK
fd40e27be4
indicate that REST API timestamps are UTC
...
use iso8601 Z suffix for UTC timestamps
use dateutil to parse dates from proxy, as well
even though CHP uses iso8601 UTC timestamps, we no longer assume CHP, so use more general parsing
in our db we are stuck with naïve datetime objects, so use those internally.
But ensure we put 'Z' on timestamps we ship externally
2018-04-03 15:14:47 +02:00
Min RK
05b2bf4c96
ensure user.created is defined during app startup
...
avoids user.created being null after upgrade
2018-04-03 15:14:47 +02:00
Min RK
a0fcbcbc7d
do not consider stopping a user's server activity
2018-04-03 15:14:47 +02:00
Min RK
3117ea9d34
handle user.last_activity being None
2018-04-03 15:14:47 +02:00
Min RK
8973dea33e
add user.created and start last_activity as None
...
need to handle last_activity being None throughout
2018-04-03 15:14:47 +02:00
Min RK
3e7d0dbd23
update user.last_activity whenever we see activity on API tokens / cookies
2018-04-03 15:14:47 +02:00
Min RK
b26b1bc038
Merge pull request #1720 from glenak1911/gk/update-circleci-config-v2
...
Updated CircleCI config file to 2.0
2018-04-03 13:14:14 +02:00
Glen A Knight
74b1102dea
Delete package-lock.json
2018-04-02 09:06:57 -04:00