These are chat archives for getredash/redash

18th
Nov 2015
Arik Fraimovich
@arikfr
Nov 18 2015 06:11
@alexdebrie it might be needed if a user has very old query results that didn't include column type data. Also I'm not sure if all query runners already send type. But maybe we can start with making it safer - for example have the timestamp regex be more exact.
@scottkrager by default, when you create an alert you get subscribed to it. Others can subscribe by clicking on the "eye" icon near the "subscribers" title. Do you see any avatars there? How did you verify the mail settings?
Adam Kariv
@akariv
Nov 18 2015 11:53
Hi @arikfr, is there an automated method for creating the db migrations?
Arik Fraimovich
@arikfr
Nov 18 2015 11:57
@akariv nope... :( (you mean creating a new migration, right?)
Adam Kariv
@akariv
Nov 18 2015 12:12
yes - you write them manually? they look autogenerated :)
For django there's south, for example. IIRC it does the migration creation automatically, both for forward and backward migrations.
So nvm, I'll write them on my own
Arik Fraimovich
@arikfr
Nov 18 2015 12:15
@akariv they look auto generated, because I usually copy a previous one ;) there are similar stuff for peewee, although none of them seemed "serious" enough
I tried arnold in another project, but it's not that good (and doesn't generate migrations).
Adam Kariv
@akariv
Nov 18 2015 12:23
alright then. Followed your advice, let's hope my pull-request is ready before anyone else adds another migration
Arik Fraimovich
@arikfr
Nov 18 2015 12:23
:) that's ok if there is collision of numbers, as long as the order between two migrations with same index isn't important
Adam Kariv
@akariv
Nov 18 2015 12:31
cool :)
Arik Fraimovich
@arikfr
Nov 18 2015 13:02
@akariv what are you cooking?
Adam Kariv
@akariv
Nov 18 2015 13:43
I told you about this - embeddable visualizations.
Arik Fraimovich
@arikfr
Nov 18 2015 13:46
:+1:
Alex DeBrie
@alexdebrie
Nov 18 2015 14:27
Thanks, Arik. We'll probably put an end of line anchor in the date & datetime regexes in our fork.
Arik Fraimovich
@arikfr
Nov 18 2015 14:28
@alexdebrie feel free to open a pull request for that. I'm sure it will be useful
Alex DeBrie
@alexdebrie
Nov 18 2015 14:30
will do!
Arik Fraimovich
@arikfr
Nov 18 2015 14:38
@alexdebrie about cancelling queries: we might need to install signal handler.
Alex DeBrie
@alexdebrie
Nov 18 2015 15:29
@arikfr ahh, interesting. Would that be on the QueryTask object? having trouble reasoning about this
Arik Fraimovich
@arikfr
Nov 18 2015 15:30
@alexdebrie no, it needs to be in the query runner. because each query runner might handle this differently (like the pg one calling connection.cancel()).
Alex DeBrie
@alexdebrie
Nov 18 2015 15:50
I see. haven't worked much with handlers. is it in the BaseQueryRunner object? or would it be in the pg.py module and just raise a KeyboardInterrupt on SIGINT?
Arik Fraimovich
@arikfr
Nov 18 2015 15:51
@alexdebrie if you can have it in BaseQueryRunner and raise an exception that will be handled by the runners, it will be the best. Otherwise try placing in pg.py.
Alex DeBrie
@alexdebrie
Nov 18 2015 15:52
@arikfr ok, thanks for suggestions. I'll give it a try, but might need input even if I hack together a workable solution :)
Arik Fraimovich
@arikfr
Nov 18 2015 15:52
sure thing.
martin sarsale
@runa
Nov 18 2015 19:04
@arikfr we suspect the behavior of "cancel" is different than before. have you changed anything there? you need to wait for minutes after hitting 'cancel'!
Scott Krager
@scottkrager
Nov 18 2015 19:08
@arikfr No avatars under the subscribers section. /api/alerts/1/subscriptions is getting a 500 errors as well at plugins.bb26e9b1.js:2
@arikfr I tested the email settings with 'bin/run ./manage.py send_test_mail' from /current
Alex DeBrie
@alexdebrie
Nov 18 2015 19:34
@runa what data source type are you using when trying to cancel?
martin sarsale
@runa
Nov 18 2015 19:35
@alexdebrie mysql
Alex DeBrie
@alexdebrie
Nov 18 2015 20:15
@runa Not sure if this is the same for mysql, but there's a noted cancelling issue with redshift/postgres (getredash/redash#598). This pr (https://github.com/getredash/redash/pull/661) is aimed at fixing it
but that wouldn't have changed if the cancel button was working before for you
Arik Fraimovich
@arikfr
Nov 18 2015 20:53
@runa nothing changed in that regard. But it might be something to do with how much your workers are busy. The wait time is probably how long it takes for celery to process the message to/from the worker about the cancel.
@scottkrager can you please check in /opt/redash/logs/api_error.log what causing the 500 error?
Scott Krager
@scottkrager
Nov 18 2015 20:56
@arikfr of course, the logs, I should have gone there first. OK, this instance used the bootstrap.sh script, then the upgrade fabfile
this is the error in apit_logs
ProgrammingError: relation "alert_subscriptions" does not exist
would be hard to insert without that table there! :)
I'm going to try doing a fresh install from the latest url
in bootstrap.sh the download url is still:
Scott Krager
@scottkrager
Nov 18 2015 21:41
OK, on a fresh install on 0.8.2+b1158 ~ still getting "relation "alert_subscriptions" does not exist"
Alon Horev
@alonho
Nov 18 2015 21:44
Hi Scott, I'll try to help
any chance you can attach the commands you use to invoke redash?
I stumbled into something similar when I was invoking it without ./bin/run script that sets environment variables.
Scott Krager
@scottkrager
Nov 18 2015 21:45
@alonho Thanks! Can you clarify what you mean by invoking? (sorry a bit of a beginner dev here)
Alon Horev
@alonho
Nov 18 2015 21:46
no problem. You're running redash using a shell command, what is it? I'm using: bin/run honcho start -f Procfile.dev
Scott Krager
@scottkrager
Nov 18 2015 21:47
ahh, gotcha
so it runs after I do the bootstrap.sh script
and sometimes I'll restart things with: sudo supervisorctl restart redash_server
Alon Horev
@alonho
Nov 18 2015 21:53
Are you sure the fab script finished successfully?
Scott Krager
@scottkrager
Nov 18 2015 21:53
Looking at my postgres database, I don't have the table 'alerts_subscriptions'
Alon Horev
@alonho
Nov 18 2015 21:54
from looking at the code there's a migration script that creates that table
Scott Krager
@scottkrager
Nov 18 2015 21:54
I'm going to try the upgrade script now, haven't run that yet
cool
let's try that
hmmm, darn, running that got:

Warning: run() encountered an error (return code 1) while executing 'diff <(cd /opt/redash/redash.0.8.1.b1110/migrations && find . | sort) <(cd /opt/redash/current/migrations && find . | sort)'

No new migrations in this version.

Alon Horev
@alonho
Nov 18 2015 21:57
are you sure the table is missing in the "redash" db?
Scott Krager
@scottkrager
Nov 18 2015 21:58
blob
yeah, alerts is there, but not alerts_subscriptions
Alon Horev
@alonho
Nov 18 2015 21:59
It's possible there's a bug related to the upgrade procedure. Lets try to force the migration script to run
./bin/run python migrations/0010_create_alerts.py
Scott Krager
@scottkrager
Nov 18 2015 21:59
run that in /current ?
Alon Horev
@alonho
Nov 18 2015 22:00
yep
Scott Krager
@scottkrager
Nov 18 2015 22:00
Traceback (most recent call last): File "migrations/0010_create_alerts.py", line 1, in <module> from redash.models import db, Alert, AlertSubscription ImportError: No module named redash.models
Alon Horev
@alonho
Nov 18 2015 22:02
PYTHONPATH=. ./bin/run python migrations/0010_create_alerts.py
Scott Krager
@scottkrager
Nov 18 2015 22:03
peewee.OperationalError: FATAL: role "root" does not exist
I can add a 'root' role to postgres
ahhh, I'm logged in as root
maybe run that as postgres user
or redash
Alon Horev
@alonho
Nov 18 2015 22:06
no idea what's the problem ):
Scott Krager
@scottkrager
Nov 18 2015 22:06
@lo
@alonho ha, no worries, I'm on the right track now
Alon Horev
@alonho
Nov 18 2015 22:07
good luck
Scott Krager
@scottkrager
Nov 18 2015 22:07
at least I know the root issue, no db table
Thanks