Opened 15 months ago

Closed 3 months ago

#19521 closed defect (fixed)

Update online source to be consistent with onine API

Reported by: amj703 Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords: website
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The Stem API descriptions online are not consistent with the linked source. For example, ExitPolicyRule.is_match() shows a strict parameter at <https://stem.torproject.org/api/exit_policy.html>. However, the "source" link shows a function without the strict parameter (https://stem.torproject.org/_modules/stem/exit_policy.html#ExitPolicyRule.is_match).

Child Tickets

Change History (6)

comment:1 Changed 15 months ago by amj703

Component: - Select a componentCore Tor/Stem
Owner: set to atagar

comment:2 Changed 15 months ago by amj703

Keywords: website added

comment:3 Changed 15 months ago by atagar

Hi amj703, sorry about the confusion. Iirc the trouble is that Sphinx only writes the module contents once, causing it to get stale over time. I should probably change the cron task that builds the site to periodically do a clean...

comment:4 Changed 15 months ago by amj703

No problem, Damian. One can always obtain and examine the source, of course, and that's what I've been doing. I just thought I should let you know in case you weren't aware.

comment:5 Changed 15 months ago by atagar

Thanks, the head's up is definitely appreciated. I probably won't get around to fixing this for a few weeks (trying to focus on Nyx right now) but definitely something I should get to at some point.

comment:6 Changed 3 months ago by atagar

Resolution: fixed
Status: newclosed

Ick, sorry I left this broken so long. On reflection the fix is actually really trivial. Turns out it's safe to issue a 'make clean' on staticforme (location we build the site) since it apparently doesn't serve live content.

Source information should now stay accurate and up to date. Also, there was a bug in the cron causing the site to be republished every hour rather than fifteen minutes. Republication is really quick so dropped that to be done every five minutes.

For posterity's sake since I touch site publication so infrequently here's what I did...

% ssh -A -t perdulce.torproject.org ssh -A staticiforme.torproject.org

% sudo -u stem crontab -l
*/5 * * * * /home/stem/build_site

% sudo -u stem cat /home/stem/build_site
#!/bin/sh

export PATH=/home/stem/bin:$PATH
export PYTHONPATH=/home/stem/lib/python

cd /home/stem/stem
git pull

cd docs
make clean
make html

sudo -u mirroradm static-master-update-component stem.torproject.org
echo "$(date)" > /home/stem/site_last_built

To test this I temporarily dropped the cron to run every minute and hammered reloading the site for ~5 minutes looking for 404s due to the clean. Nothing showed up, and pages with source got corrected by the introduction of 'make clean'.

Note: See TracTickets for help on using tickets.