Perl 6 - the future is here, just unevenly distributed

IRC log for #opentreeoflife, 2014-02-25

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:31 20WABCE6H joined #opentreeoflife
01:15 towodo joined #opentreeoflife
01:53 jimallman joined #opentreeoflife
04:52 dukeleto_ joined #opentreeoflife
06:30 dukeleto_ joined #opentreeoflife
12:59 64MAAA8S3 joined #opentreeoflife
14:48 jimallman joined #opentreeoflife
14:58 sckott joined #opentreeoflife
15:53 towodo joined #opentreeoflife
17:42 sckott joined #opentreeoflife
17:53 towodo jimallman, looking on github for api key management. haven't found it yet
17:55 jimallman here's a pointer: https://help.github.com/articles/managing-an-organization-s-settings
17:55 jimallman towodo: ^
17:56 jimallman this solution (click on org name in personal settings) doesn't work for me, but i assumed that's because i don't have sufficient privileges in the organization.
17:57 towodo no luck yet
17:57 towodo ah… 'applications' tab… curation tool
17:58 towodo there is a button 'reset client secret' and a different button 'revoke all user tokens'
17:59 jimallman towodo: great! the one we want is 'Reset client secret', then we'll need to privately share the new value.
17:59 jimallman perhaps drop a file on ot3?
17:59 towodo my guess is that if i click 'reset…' then a new secret will be displayed
17:59 jimallman exactly
18:00 towodo there are two of these, one for dev and one for some other server
18:00 jimallman probably from a prior setup with curator at another domain...
18:01 jimallman dev is the one i exposed
18:01 jimallman :-/
18:02 jimallman we'll need to create other instances here, once we move to final domain names, or if we set up staging.opentreeoflife.org and the like.
18:02 towodo "Please note that resetting your Client Secret will not invalidate any user tokens, however you will need to update any application configuration using the old secret because it will no longer work. "
18:03 towodo ok, see root directory on ot3
18:04 jimallman in other words, users who are currently logged in will stay logged in.
18:04 jimallman i think this is fine. i'll need to update my files and push opentree before new users can log into the curation tool. which i'm doing anyway as i tighten up the new config repo.
18:42 jimallman joined #opentreeoflife
19:09 towodo jimallman, i'm installing a new treemachine db on ot6
19:10 jimallman ok. i'm tweaking and testing the push scripts for DEV (ot3, ot9, ot10).
19:19 towodo jimallman, getstartnode works now.
19:20 towodo so if i try the main web app now I get: Whoops! The call to get the tree around a node did not work out the way we were hoping it would. Show details
19:20 jimallman wonderful, thanks
19:20 towodo [error] INTERNAL SERVER ERROR
19:20 towodo not very informative… it's NO_STARTING_NODE_ID again
19:21 jimallman ok, let me take a look
19:21 towodo maybe i have the wrong version of the web app
19:21 towodo you said you pushed the change to master, right? so I can update from master and that should fix it.
19:22 jimallman yes, please give that a try
19:23 towodo no change.
19:26 towodo jimallman, i think it has to do with some change in the config file format. looks like a missing http:
19:26 towodo I'm using a private ot6.config
19:27 jimallman i'm looking at my own ot6.config... missing 'http:' where?
19:29 towodo my config has no setting for TREEMACHINE_BASE_URL, and my guess is it doesn't default properly
19:30 towodo where did that OTOL come from? we need to expunge those
19:31 jimallman ah, old stuff. i can fix those while i'm in the neighborhood
19:33 jimallman what is our preferred short name for the API, vs "Open Tree of Life API"? It's still abbreviated "OToL API" in the API ReadMe: https://github.com/OpenTreeOfLife/api.opentreeoflife.org
19:35 towodo all the OTOL's everywhere should be changed to open tree or OPENTREE.  it's a branding thing
19:35 jimallman OK, "Open Tree API" it is then. short and sweet
19:35 towodo I'll fix the api README.md right now
19:36 jimallman OK, I'll find and change references to OTOL_API =>  OPENTREE_API
19:36 jimallman (in configs and deployment tools)
19:36 jimallman (and apps)
19:36 towodo #$%$ no search function in the web-based editor
19:37 jimallman yeah, it'll sometimes allow Cmd-F (OS find) in the browser...
19:37 jimallman (in Chrome, at least) but even then their highlighting is pretty weak
19:37 towodo I don't see OTOL in README.md
19:37 jimallman OToL API
19:37 jimallman "This is all transparent to the user of the OToL API."
19:38 jimallman https://github.com/OpenTreeOfLife/api.opentreeoflife.org/blob/master/README.md
19:39 towodo got it
19:40 towodo anyhow we're making progress.  The error now is a NumberFormatException...
19:41 jimallman yes! oh, i see another "OToL" in the API docs (another read me): https://github.com/OpenTreeOfLife/api.opentreeoflife.org/search?q=OTOL
19:41 towodo I can't imagine why getSyntheticTree would be doing a parseLong, will look
19:41 travis-ci joined #opentreeoflife
19:41 travis-ci [travis-ci] OpenTreeOfLife/api.opentreeoflife.org#312 (master - c7e2738 : Jonathan A Rees): The build passed.
19:41 travis-ci [travis-ci] Change view : https://github.com/OpenTreeOfLife/api.opentreeoflife.org/compare/925b6b71f670...c7e2738c87ef
19:41 travis-ci [travis-ci] Build details : http://travis-ci.org/OpenTreeOfLife/api.opentreeoflife.org/builds/19602478
19:41 travis-ci left #opentreeoflife
19:42 jimallman towodo: i noticed a comment in the treemachine code about expecting longs instead of strings?
19:42 jimallman i can find it pretty quick if you need to see it
19:42 towodo I don't know. The offending line is subtreeNodeID = Long.parseLong(subtreeNodeIDStr, 10);
19:45 towodo looks like the web app is passing a string that can't be parsed as a long.
19:45 jimallman hm, i believe it's passing an empty string for the start node ID
19:46 towodo maybe incorrect processing of the result of getStartNode
19:46 jimallman but i thought the new treemachine code checked for null and .length() == 0, so this would be ignored
19:46 towodo an actual node id is required in this place, I would think
19:49 travis-ci joined #opentreeoflife
19:49 travis-ci [travis-ci] OpenTreeOfLife/api.opentreeoflife.org#313 (master - bc6256a : Jim Allman): The build passed.
19:49 travis-ci [travis-ci] Change view : https://github.com/OpenTreeOfLife/api.opentreeoflife.org/compare/c7e2738c87ef...bc6256af8b6d
19:49 travis-ci [travis-ci] Build details : http://travis-ci.org/OpenTreeOfLife/api.opentreeoflife.org/builds/19602911
19:49 travis-ci left #opentreeoflife
19:49 jimallman fyi - fixed the remaining "OToL" in https://github.com/OpenTreeOfLife/api.opentreeoflife.org/blob/master/docs/README.md
19:51 towodo I don't get it. If it were me I'd add defensive code to default.py
19:51 jimallman towodo: my bad, i was thinking of the call to get starting nodes. i see that the problem is in the call to getSyntheticTree.
19:52 jimallman looking there now.. agreed that this needs better error handling.
19:52 towodo hmm… suspicious: startNodeID is a number
19:53 towodo I wonder if there's no argument type checking in neo4j services, and maybe the number got converted to an empty string
19:54 jimallman i'm looking dev, so don't let me confuse you... i assume you're on your local setup?
19:55 jimallman on dev: in chrome, if i copy the request for getSyntheticTree as a CURL call, it's clearly doomed, passing this data: {"treeID":"ERROR","format":"arguson","maxDepth":"3","subtreeNodeID":""}'
20:00 towodo I'm on ot6, which is the only place the new version of the startnode call is deployed
20:01 jimallman ok, got it. what do you see passed in the AJAX call for getSyntheticTree?
20:01 towodo I could merge the treemachine change to master if you want dev to be broken too
20:01 towodo how would I see that?
20:02 towodo ahh… javascript debugging I bet...
20:04 mtholder joined #opentreeoflife
20:04 towodo in the debugger I see that a POST happened, but I can't see the arguments
20:04 jimallman yes, firebug or chrome dev tools (what browser are you in?)
20:05 jimallman there should be a tab like Network with more information
20:05 mtholder lynx is my browser of choice
20:05 mtholder jk
20:05 towodo oh there it is
20:05 jimallman lynx==awesome
20:05 mtholder and a KU product, I believe.
20:07 jimallman if Chrome: in the Network tab, click the failed call to getSyntheticTree, then the Headers tab on the right. this should give full details of the data POSTed. and you can right-click to "Copy as CURL", which is awesome.
20:07 towodo nope, struck out.  It's showing me headers but not the POST body.  Yet another reason we should be using GET.
20:08 jimallman ? are you in Chrome?
20:08 towodo I'm in firefox
20:08 jimallman ah, my bad. let me try that... (it's been awhile)
20:08 towodo oh… i see...
20:08 towodo there are tabs i haven't explored
20:09 towodo 'Params' shows POST body.
20:09 towodo {"treeID":"ERROR","format":"arguson","maxDepth":"3","subtreeNodeID":""}
20:09 PEM joined #opentreeoflife
20:09 towodo If you want to look, it's http://ec2-54-203-212-107.us-west-2.compute.amazonaws.com/
20:09 jimallman cool, thanks
20:10 jimallman hm, it's the initial call for starting node IDs that fails.
20:11 towodo but that's what we just debugged, I thought
20:12 jimallman hm, let me backtrack.. when do we get the tree ID...
20:12 towodo I don't see any call to get the starting node id. (in the js debugger)
20:13 jimallman right, it's done on the server side
20:13 towodo oh.
20:13 jimallman we can see the result with View Source, and look for "startingNodeID"
20:13 jimallman in this case, i'm getting:
20:13 jimallman var syntheticTreeID = 'ERROR';
20:13 jimallman var syntheticTreeDefaultStartingNodeID = '';
20:15 jimallman yes, these values are fetched in the call to getDraftTreeID, then added to the tree-browser page.
20:15 towodo ahh… I think it's a number/string thing.  What happens in python when you try to utf-8 encode a number?
20:16 towodo Did Cody change the return type from string to long, perhaps?...
20:16 jimallman hm, i'd expect it to coerce to a string.. but i'm surprised every day.
20:16 jimallman re: strings to longs, i thought i saw a comment to that effect
20:16 towodo I bet it throws an exception, that's how we get ERROR
20:17 towodo (default.py)
20:17 jimallman makes sense
20:18 towodo so the fix would be in default.py.   you want to take care of it?
20:18 jimallman sure. i need to do something smarter in the event of errors, in any case
20:18 towodo startNodeID = ids_json['startNodeID'].encode('utf-8')
20:20 towodo actually I added that code, so it's my fault… didn't occur to me Cody would change the type
20:21 jimallman no problem, i'll coerce to string. i see what you mean, though, we're calling the string method, and it does indeed fail with a numeric type:  23.encode('utf-8')
20:22 jimallman quick fix is: str(23).encode('utf-8')
20:25 jimallman OK, please try the new opentree 'master'...
20:25 towodo left #opentreeoflife
20:25 towodo joined #opentreeoflife
20:26 towodo ok
20:29 towodo no change
20:30 jimallman ok, let me try to reconstruct the equivalent CURL call, to see if we're getting good tree + node IDs
20:31 towodo you mean the call that the server is doing?
20:31 jimallman yes
20:33 towodo warning, I'm going to disappear in about 20 minutes to go pick up my daughter
20:34 jimallman no problem. but this is weird.. the server-side call should be:   $ curl -X "POST" -d '{"startingTaxonOTTId": ""}' -H "Content-type: application/json" http://ec2-54-203-212-107.us-west-2.compute.amazonaws.com/treemachine/ext/GoLS/graphdb/getDraftTreeID
20:34 jimallman which gives a perfectly reasonable response:
20:34 jimallman {
20:34 jimallman "startNodeOTTId" : 1042120,
20:34 jimallman "draftTreeName" : "otol.draft.22",
20:34 jimallman "startNodeTaxName" : "Asterales",
20:34 jimallman "startNodeID" : 1
20:34 jimallman }
20:35 towodo yes, that's the same call we were doing at the shell earlier
20:35 jimallman humph. i'll check case + spelling, in case something has slipped (Id => ID, etc)
20:42 towodo ok. I'm headed out, ttyl
20:44 towodo feel free to go in to ot6 and update things. i'll email you the config file i've been using
20:45 jimallman thanks, i'll test with ot6 on my local and let you know what i find

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary