*** persia_ has quit IRC | 03:31 | |
*** persia_ has joined #storyboard | 03:38 | |
*** zara_the_lemur__ has quit IRC | 04:35 | |
*** fay has joined #storyboard | 08:27 | |
*** fay is now known as Guest34099 | 08:27 | |
*** lifeless has quit IRC | 08:54 | |
*** lifeless has joined #storyboard | 08:55 | |
Zara | tristanC: 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 | |
Zara | that looks like it might be trying to use python syntax for wildcards at the point where it should be sql | 11:02 |
Zara | I'm also wondering about that anon_1 prefix for things | 11:02 |
Zara | trying 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 |
Zara | it'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 |
Zara | in 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=822084 | 12:05 |
Zara | the logs don't have timestamps, but HAH, because we have a created_at field | 12:12 |
* Zara wishes it were possible to make paste.o.o linewrap | 12:17 | |
Zara | so this is a successful query: http://paste.openstack.org/show/597826/ | 12:19 |
Zara | I think my hunch about the string interpolation was right | 12:19 |
Zara | http://paste.openstack.org/show/597827/ is the failed one. | 12:22 |
Zara | going to note any differences I notice | 12:24 |
Zara | in the failed one, there's a newline (\n) on line 19; there isn't in the one that works | 12:24 |
Zara | *in the equivalent place; the lines don't match up exactly | 12:25 |
Zara | and similar on line 31 of the failed one | 12:26 |
Zara | once it gets to line 36 of the failed one, everything is terrible | 12:26 |
* SotK wonders if that second log is showing what the db received, or the template of what sqlalchemy was preparing to send | 12:30 | |
Zara | I'm not sure; the second one shows the error message I get in the webclient | 12:31 |
Zara | also I've realised I wasn't comparing the same code | 12:31 |
Zara | since the postgres workaround for the sum() issue wasn't in the branch I was using with mysql | 12:31 |
Zara | so about to check what happens with that | 12:31 |
Zara | okay, *this* is the mysql-backed query: http://paste.openstack.org/show/597830/ | 12:37 |
Zara | maybe I need to go back and fix the 400 first | 12:43 |
Zara | since 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 #storyboard | 13:11 | |
AJaeger | storyboard 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 | |
SotK | AJaeger: looks like our exciting test timeout issue | 13:14 |
SotK | it may pass if you recheck | 13:14 |
Zara | I think it's just timeouts | 13:15 |
Zara | oh snap | 13: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 |
AJaeger | ok, let me do another recheck then | 13:27 |
AJaeger | thanks | 13:27 |
Zara | np :) | 13:46 |
Zara | looking back at the 400.. I don't get why *only* the story_type.id would wind up with the wrong value | 13:52 |
Zara | I 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 constraint | 13:55 |
Zara | storyboard=# SELECT * from story_types; | 13:58 |
Zara | id | created_at | updated_at | name | icon | restricted | private | visible | 13:58 |
Zara | ----+------------+------------+------+------+------------+---------+--------- | 13:58 |
Zara | (0 rows) | 13:58 |
Zara | hm, maybe that should automatically have something in it | 13:58 |
Zara | mysql> 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 |
Zara | 4 rows in set (0.02 sec) | 14:00 |
Zara | boourns. | 14:00 |
Zara | okay, 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 default | 14:01 |
Zara | but in the postgres setup, there are no story_type ids | 14:01 |
Zara | and so the default of '1' conflicts with the foreign key constraint, which wants a value from the story_types ids | 14:01 |
Zara | so 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 |
Zara | but then that can't be parsed later because it doesn't know how to interpret that chunk of nothing elsewhere | 14:02 |
Zara | that's my guess, anyway | 14:02 |
Zara | so, we need to get the postgresdb to actually have the story_type rows | 14:03 |
Zara | then the default will work as 1, then hopefully storyboard can understand it | 14:03 |
Zara | my migration script doesn't populate tables; it just makes them | 14:05 |
Zara | so yeah, I think story_type needs some rows with ids for stories to be created, or we need to remove the constraint. | 14:06 |
Zara | adding a row for story_type fixes the 400 and allows the story to POST... but the 500 is still there :( | 14:19 |
Zara | maybe another table is strange | 14:22 |
Zara | (searching the error message suggests that it's postgresql complaining rather than the sqlalchemy) | 14:26 |
Zara | so 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 |
Zara | DBError: (InternalError) failed to find conversion function from unknown to text | 14:34 |
Zara | that's the bit that's making me think it's postgres itself | 14:34 |
Zara | I'm wondering if it's doing do_execute when it should be doing do_executemany | 16:28 |
Zara | (I'm not sure if it should be doing do_executemany, just a thought) | 16:29 |
Zara | actually I think that's just for printing the error | 16:30 |
Zara | I am getting nowhere with this; think it's time to stop staring at it for the day. | 16:59 |
*** zara_the_lemur__ has joined #storyboard | 18:09 | |
AJaeger | Zara: That's sad ;( | 18:26 |
AJaeger | But 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 tomorrow | 18:27 |
zara_the_lemur__ | though that may be my catchphrase by now :) | 18:27 |
zara_the_lemur__ | glad it passes, anyway | 18:27 |
AJaeger | enjoy the evening ;) | 18:28 |
zara_the_lemur__ | you too! | 18:28 |
AJaeger | ta | 18:29 |
*** diablo_rojo has joined #storyboard | 18:30 | |
* SotK provides some review | 18:41 | |
*** pleia2_ has joined #storyboard | 23:29 | |
*** zara_the_lemur__ has quit IRC | 23:34 | |
*** pleia2 has quit IRC | 23:34 | |
*** zara_the_lemur__ has joined #storyboard | 23:34 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!