learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
457 stars 304 forks source link

Simplify am_i_online which broke because of a 301 on kalite.learninequality.org #5404

Closed benjaoming closed 7 years ago

benjaoming commented 7 years ago

Summary

It's fine that kalite.learningequality.org redirects. However, with the mess that am_i_online was, it wasn't actually doing the test right.

So I simplified it to a function that doesn't accept arguments.

Also, it doesn't check the root URL since this one redirects, but looks for a well-known API endpoint... which hopefully, we won't remove :)

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

Reviewer guidance

Not expecting anyone to jump in on this, but feel free, @jamalex and @aronasorman - since this is a last-minute release blocker that will ship shortly.

Issues addressed

5401

benjaoming commented 7 years ago

As a curiosity the issue didn't show up with DEBUG=True, because it uses staging.learningequality.org @radinamatic

codecov-io commented 7 years ago

Codecov Report

Merging #5404 into 0.17.x will increase coverage by 0.01%.

@@            Coverage Diff             @@
##           0.17.x    #5404      +/-   ##
==========================================
+ Coverage   51.75%   51.76%   +0.01%     
==========================================
  Files         143      143              
  Lines        7499     7499              
==========================================
+ Hits         3881     3882       +1     
+ Misses       3618     3617       -1
Impacted Files Coverage Δ
kalite/settings/base.py 88.78% <ø> (ø) :white_check_mark:
kalite/main/api_views.py 85.96% <ø> (+1.75%) :white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5518d3...0744172. Read the comment docs.