Monday, 2018-06-25

*** fatema_ has joined #storyboard00:34
*** aspiers has quit IRC00:41
fatema_is there a doc for other tests like this one for pep8 https://docs.openstack.org/hacking/latest/user/hacking.html ^^00:43
*** openstack has joined #storyboard01:18
*** ChanServ sets mode: +o openstack01:18
*** fatema_ has quit IRC01:33
*** fatema_ has joined #storyboard02:41
*** fatema_ has quit IRC03:05
*** udesale has joined #storyboard03:46
*** noama has joined #storyboard04:41
*** aspiers has joined #storyboard05:22
*** florianf has joined #storyboard06:10
*** jtomasek has joined #storyboard06:43
*** lifeless has quit IRC06:49
*** jpich has joined #storyboard07:55
*** dtantsur|afk is now known as dtantsur09:03
*** udesale has quit IRC11:27
*** tosky has joined #storyboard11:28
*** noama has quit IRC11:37
*** jamesmcarthur has joined #storyboard14:40
*** udesale has joined #storyboard14:45
*** dtantsur is now known as dtantsur|afl15:59
*** dtantsur|afl is now known as dtantsur|afk15:59
fungiianw's observations earlier in #openstack-infra about the random 5xx internal server errors from storyboard.openstack.org are probably also of interest in here: ---http://eavesdrop.openstack.org/irclogs/%23openstack-infra/latest.log.html#t2018-06-25T03:04:0016:12
fungisuggests that perhaps communication issues with rabbitmq can lead to blocking subsequent operations16:12
*** fatema_ has joined #storyboard16:20
*** jpich has quit IRC16:29
openstackgerritFatema Khalid Sherif proposed openstack-infra/storyboard-webclient master: Expose ordering criteria in search UI  https://review.openstack.org/57787016:46
*** udesale has quit IRC16:56
*** jamesmcarthur has quit IRC17:06
*** jamesmcarthur has joined #storyboard17:35
*** jamesmcarthur has quit IRC17:44
*** fatema_ has quit IRC17:53
*** jamesmcarthur has joined #storyboard18:03
*** jamesmcarthur has quit IRC18:14
*** jamesmcarthur has joined #storyboard18:15
*** jamesmcarthur has quit IRC18:15
*** jamesmcarthur has joined #storyboard18:15
*** diablo_rojo has joined #storyboard18:17
*** jamesmcarthur has quit IRC18:18
*** jamesmcarthur has joined #storyboard18:22
*** jamesmcarthur has quit IRC18:31
*** jamesmcarthur has joined #storyboard18:49
*** jamesmcarthur has quit IRC18:57
*** jamesmcarthur has joined #storyboard18:59
*** jamesmcarthur has quit IRC19:04
*** jamesmcarthur has joined #storyboard19:04
openstackgerritMerged openstack-infra/storyboard master: use required enums to validate 'type' args  https://review.openstack.org/54517019:14
openstackgerritMerged openstack-infra/storyboard master: mark worklist filter_criteria as a required field  https://review.openstack.org/54540519:15
openstackgerritMerged openstack-infra/storyboard master: mark FilterCriterion title as a mandatory field  https://review.openstack.org/54540619:16
dhellmannfungi , diablo_rojo : if I wanted to work on that storyboard board API performance issue, could I get a dump of our storyboard database to use as data?19:27
dhellmannI'm running against a sqlite database right now and it has very little data and responds quite quickly :-)19:27
fungidhellmann: definitely. i think i need to redact api keys from the dump but can work on that in a sec19:28
dhellmannfungi : there's no rush; I'm looking at the code to figure out where to start19:29
dhellmannI'm guessing I will also need to set up mysql, which for some reason I always find to be a non-trivial exercise19:29
fungiyou and me both :/19:30
dhellmannI may try using sqlite. The performance is bound to be worse, right?19:33
fungidhellmann: current theory is that 1. the queries it uses are more expensive than they need to be (possibly specific to tag queries?) and 2. we're missing indices on one or more columns where we'd benefit from them19:34
dhellmanntag queries do seem to be expensive19:34
dhellmannother boards are much snappier19:34
dhellmannso I will start there19:34
fungilooks like if strip or redact contents of the accesstokens table that takes care of any sensitive credentials. the bigger challenge is filtering out stories where stories.private is true and then any tasks where tasks.story_id matches the corresponding stories.id for those19:40
dhellmannyou could just set all of the story and task descriptions to some single string19:41
dhellmannI don't need real data, just bulk19:41
dhellmannI guess you'd need to do that for all comments not just description, but still19:42
fungioh, right, the comments table filtering any where comments.story_id matches the stories.id too19:43
fungiwe could instead dump the content of the db for storyboard-dev, assuming it exhibits the same performance degredation19:44
dhellmannit does19:44
dhellmannand that sounds like an easier option19:44
fungithen i'd probably just omit the accesstokens rows and be done with it19:44
dhellmannwfm19:44
* fungi cheers for simple workarounds19:45
fungiwe don't (can't, really) import private lp bugs, so unless someone has created a private story on sb-dev and put actually sensitive information into it (which i doubt) then there should be nothing sensitive19:46
dhellmannsomeone may have tested it, but I hope not with real info19:46
fungimy select query says sb-dev has 13 private stories, all of whose titles at least look innocuous19:48
fungii wonder if we need to periodically expire content from the accesstokens table. i see _lots_ of tokens from when the server was first deployed19:49
fungi4312 rows in production19:49
fungithere's an expires_at column, so should be straightforward19:50
fungimysql> delete from accesstokens where expires_at < now();19:53
fungiQuery OK, 429 rows affected (0.07 sec)19:53
fungithat leaves 5 accesstokens in the sb-dev db to redact, which is trivial to handle manually19:53
dhellmannselecting on story status looks pretty expensive, too20:01
dhellmannit builds a case statement in sql20:01
fungidhellmann: wget --no-check-certificate https://storyboard-dev.openstack.org/storyboard-dev_redacted_2018-06-25.sql.gz20:01
fungilmk when you have it and i'll clean it out of the webroot20:02
dhellmannfungi : got it, thanks20:03
fungicleaned up20:03
*** florianf has quit IRC20:03
dhellmannwell, sqlite doesn't like that format so I guess I need to try mysql20:07
fungiyeah, you should just be able to gunzip it and then `source storyboard-dev_redacted_2018-06-25.sql;` in an interactive mysqlclient command-line session20:12
dhellmannwell, I was able to edit the file to remove all of the table commands and leave the inserts and sqlite is still really fast20:17
dhellmannso yeah, I guess I need to set up mysql20:18
fungialso, this is in a 4gb ubuntu trusty (14.04 lts) vm with a remote mysql database in a trove instance20:22
dhellmannoh, yeah20:22
dhellmannI have a 12G box with local ssd20:22
fungiso yeah performance differences may not be as exaggerated in your local deployment20:22
fungii don't see any signs there's been memory pressure on the vm though20:23
dhellmannsome of these filtering queries look pretty complicated20:32
dhellmannlike I said, asking for story status turns into a big case statement on the sum of task status calculated a few times20:32
diablo_rojooof20:32
dhellmannit seems like that would be more efficient if we store it separately, even if that means updating it requires updating 2 rows20:33
dhellmannbut we'll see20:33
dhellmannmy local mysql should be slower since it's not on ssd20:36
* dhellmann misses the sound of the disk head moving back and forth20:36
*** jamesmcarthur has quit IRC20:38
diablo_rojoHa ha a comforting sound?20:40
dhellmannit made me feel like I was *doing* something :-)20:43
dhellmannok, data imported and I can reproduce the performance issue20:44
dhellmannwith the query running mysqld has 100% of the CPU20:46
diablo_rojoDang.20:48
funginice20:48
fungii wonder if resizing our trove instance to get more cpu (or moving the db to a local mysqld on the server) would help20:49
fungigranted, this is almost certainly a case where either the database schema or the queries (or both) could be made orders of magnitude more efficient20:50
fungimordred: ^ you may also be interested in some of whatever findings dhellmann arrives at20:51
mordredyes- I am interested - and I could imagine us missing an index or two20:53
dhellmannthere's definitely no index on the story_storytag table20:54
dhellmannI'm still waiting for the query to return so I can compare the times before and after20:54
dhellmann7m19.189s21:02
*** EmilienM has joined #storyboard21:03
*** EmilienM_PTO has quit IRC21:04
*** EmilienM has quit IRC21:04
*** EmilienM has joined #storyboard21:04
fungithat's a goodly quantity of time21:09
fungiSotK: looking into the get project by name decoding, i see that _route() isn't using the escaped something in the by name fallback, it's pulling from the unquoted args list instead. could that be the problem?21:11
fungier, from the un-unquoted args list21:12
fungiand isn't using the something resulting from unquote(args[0])21:14
dhellmannok, adding the index drops that to 2.7 seconds21:18
openstackgerritDoug Hellmann proposed openstack-infra/storyboard master: add an index for the story_storytags table  https://review.openstack.org/57793121:21
dhellmannexplain shows it looking at 5 rows instead of 1324921:24
dhellmannso that seems like an improvement21:24
dhellmannshowing the results in the UI is still a bit sluggist21:28
dhellmannsluggish*21:28
dhellmannI wonder if it would be better to do it in 2 steps, load the basic data including the column titles, the show a whirlygig while the columns are populated21:28
openstackgerritKendall Nelson proposed openstack-infra/storyboard master: Add to & Reorganize StoryBoard GUI Docs  https://review.openstack.org/57793421:36
openstackgerritKendall Nelson proposed openstack-infra/storyboard master: Add to & Reorganize StoryBoard GUI Docs  https://review.openstack.org/57793421:38
SotKfungi: that's probably the problem, I wonder why on earth it works in the test suite and in my local instance21:39
fungidhellmann: wow, indices _do_ make a difference! ;)21:50
dhellmannyeah, that was surprising21:56
dhellmannI expected to need to do some work on the python code, too, but that doesn't look so bad21:57
fungiwell, we'll presumably need an alembic migration21:57
dhellmanna few loops where we could use generator expressions, but otherwise pretty straightforward21:57
dhellmannyeah, see https://review.openstack.org/57793121:57
fungioh, i missed that earlier21:57
* dhellmann drops offline for the evening21:59
diablo_rojoThanks dhellmann! Have a good evening22:04
fungiapproved, i'll keep an eye on things and make sure it shows up once merged22:20
openstackgerritMerged openstack-infra/storyboard master: add an index for the story_storytags table  https://review.openstack.org/57793122:54
fungiand there it is22:54
fungishould hopefully wind up in production over the next 15 to 30 minutes22:55
fungiJun 25 23:17:59 storyboard puppet-user[6632]: (/Stage[main]/Storyboard::Application/Exec[migrate-storyboard-db]) Triggered 'refresh' from 1 events23:18
fungishould be in production as of a minute ago23:19
fungihttps://storyboard.openstack.org/#!/board/53 loaded for me in a couple seconds23:20
*** jamesmcarthur has joined #storyboard23:33
*** tosky has quit IRC23:34
fungidhellmann: all looking good so far--thanks again!!!23:40
*** jamesmcarthur has quit IRC23:55

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!