Monday, 2017-02-06

*** persia_ has quit IRC03:31
*** persia_ has joined #storyboard03:38
*** zara_the_lemur__ has quit IRC04:35
*** fay has joined #storyboard08:27
*** fay is now known as Guest3409908:27
*** lifeless has quit IRC08:54
*** lifeless has joined #storyboard08:55
ZaratristanC: yeah, that matches what I've seen around. The plan on my side is to make the code less mysql-specific so sql backends are supported more generally, and postgresql seemed easier to start with than sqlite, but I think it'd be useful to support sqlite too.10:26
* Zara puts some linebreaks in the error message she got the other day: http://paste.openstack.org/show/597810/11:01
Zarathat looks like it might be trying to use python syntax for wildcards at the point where it should be sql11:02
ZaraI'm also wondering about that anon_1 prefix for things11:02
Zaratrying to POST a task for a new story should error if it doesn't have a story type (it checks for the 'restricted' attribute and then fails because there's nothing there to check for attributes of), but the error is different for my postgres setup, so I think the postgres one is failing before that.11:11
Zarait's definitely not an issue with swapping the comment content out for UnicodeText() (I didn't think it was that, but that's a difference between my instances, so tried it. those seem to be fine.)11:31
Zara(though those won't work when created, but that's a separate error)11:34
Zara(actually ignore me)11:34
Zara(posting them is fine)11:37
Zarain case anyone's curious, if you want mysql query logs, these two suggestions in combination worked for me: http://stackoverflow.com/questions/650238/how-to-show-the-last-queries-executed-on-mysql  and https://ubuntuforums.org/showthread.php?t=82208412:05
Zarathe logs don't have timestamps, but HAH, because we have a created_at field12:12
* Zara wishes it were possible to make paste.o.o linewrap12:17
Zaraso this is a successful query: http://paste.openstack.org/show/597826/12:19
ZaraI think my hunch about the string interpolation was right12:19
Zarahttp://paste.openstack.org/show/597827/ is the failed one.12:22
Zaragoing to note any differences I notice12:24
Zarain the failed one, there's a newline (\n) on line 19; there isn't in the one that works12:24
Zara*in the equivalent place; the lines don't match up exactly12:25
Zaraand similar on line 31 of the failed one12:26
Zaraonce it gets to line 36 of the failed one, everything is terrible12:26
* SotK wonders if that second log is showing what the db received, or the template of what sqlalchemy was preparing to send12:30
ZaraI'm not sure; the second one shows the error message I get in the webclient12:31
Zaraalso I've realised I wasn't comparing the same code12:31
Zarasince the postgres workaround for the sum() issue wasn't in the branch I was using with mysql12:31
Zaraso about to check what happens with that12:31
Zaraokay, *this* is the mysql-backed query: http://paste.openstack.org/show/597830/12:37
Zaramaybe I need to go back and fix the 400 first12:43
Zarasince if it is the template, the story type id might be the bit that it's struggling to convert (still seems weird since it's a different error on mysql when that's missing)12:44
*** AJaeger has joined #storyboard13:11
AJaegerstoryboard team, current head of storyboard fails the testsuite - is https://review.openstack.org/427331 need for that?13:13
* AJaeger wonders why his change https://review.openstack.org/427589 fails.13:13
SotKAJaeger: looks like our exciting test timeout issue13:14
SotKit may pass if you recheck13:14
ZaraI think it's just timeouts13:15
Zaraoh snap13:15
* Zara should read backscroll before pressing enter. :)13:16
Zara(427331 is a different thing entirely, to fix some early db migrations for postgresql. If it works as expected, it should make no difference to our current mysql setup.)13:20
AJaegerok, let me do another recheck then13:27
AJaegerthanks13:27
Zaranp :)13:46
Zaralooking back at the 400.. I don't get why *only* the story_type.id would wind up with the wrong value13:52
ZaraI thought it was an error with the foreign key itself, but now I'm wondering if the problem is that the value isn't one of those allowed as per the foreign key constraint13:55
Zarastoryboard=# SELECT * from story_types;13:58
Zara id | created_at | updated_at | name | icon | restricted | private | visible13:58
Zara----+------------+------------+------+------+------------+---------+---------13:58
Zara(0 rows)13:58
Zarahm, maybe that should automatically have something in it13:58
Zaramysql> SELECT * FROM story_types;14:00
Zara+----+------------+------------+-----------------------+----------------+------------+---------+---------+14:00
Zara| id | created_at | updated_at | name                  | icon           | restricted | private | visible |14:00
Zara+----+------------+------------+-----------------------+----------------+------------+---------+---------+14:00
Zara|  1 | NULL       | NULL       | bug                   | fa-bug         |          0 |       0 |       1 |14:00
Zara|  2 | NULL       | NULL       | feature               | fa-lightbulb-o |          1 |       0 |       1 |14:00
Zara|  3 | NULL       | NULL       | private_vulnerability | fa-lock        |          0 |       1 |       1 |14:00
Zara|  4 | NULL       | NULL       | public_vulnerability  | fa-bomb        |          0 |       0 |       0 |14:00
Zara+----+------------+------------+-----------------------+----------------+------------+---------+---------+14:00
Zara4 rows in set (0.02 sec)14:00
Zaraboourns.14:00
Zaraokay, so what I *think* is happening is that storyboard tries to make a story with a story_type_id that is one of the story_types ids. if none is specified, it sets the id to 1 by default14:01
Zarabut in the postgres setup, there are no story_type ids14:01
Zaraand so the default of '1' conflicts with the foreign key constraint, which wants a value from the story_types ids14:01
Zaraso removing the default works, as I guess 'no id at all' is the same as the nothingness when the table has no rows?14:02
Zarabut then that can't be parsed later because it doesn't know how to interpret that chunk of nothing elsewhere14:02
Zarathat's my guess, anyway14:02
Zaraso, we need to get the postgresdb to actually have the story_type rows14:03
Zarathen the default will work as 1, then hopefully storyboard can understand it14:03
Zaramy migration script doesn't populate tables; it just makes them14:05
Zaraso yeah, I think story_type needs some rows with ids for stories to be created, or we need to remove the constraint.14:06
Zaraadding a row for story_type fixes the 400 and allows the story to POST... but the 500 is still there :(14:19
Zaramaybe another table is strange14:22
Zara(searching the error message suggests that it's postgresql complaining rather than the sqlalchemy)14:26
Zaraso if that *is* the case, that one is likely 'postgres is being sent some python instructions because they're not being converted right first'14:27
ZaraDBError: (InternalError) failed to find conversion function from unknown to text14:34
Zarathat's the bit that's making me think it's postgres itself14:34
ZaraI'm wondering if it's doing do_execute when it should be doing do_executemany16:28
Zara(I'm not sure if it should be doing do_executemany, just a thought)16:29
Zaraactually I think that's just for printing the error16:30
ZaraI am getting nowhere with this; think it's time to stop staring at it for the day.16:59
*** zara_the_lemur__ has joined #storyboard18:09
AJaegerZara: That's sad ;(18:26
AJaegerBut on a positive node https://review.openstack.org/427589 passed the testsuite, so whenever anybody has some review cycles, please look at it.18:26
zara_the_lemur__sure, will do! :) I shoullld get to it tomorrow18:27
zara_the_lemur__though that may be my catchphrase by now :)18:27
zara_the_lemur__glad it passes, anyway18:27
AJaegerenjoy the evening ;)18:28
zara_the_lemur__you too!18:28
AJaegerta18:29
*** diablo_rojo has joined #storyboard18:30
* SotK provides some review18:41
*** pleia2_ has joined #storyboard23:29
*** zara_the_lemur__ has quit IRC23:34
*** pleia2 has quit IRC23:34
*** zara_the_lemur__ has joined #storyboard23:34

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