These are chat archives for getredash/redash

8th
Jul 2015
Arik Fraimovich
@arikfr
Jul 08 2015 06:02
@j0t3x can you give an example for a query?
@erans any idea what it might be?
j0t3x
@j0t3x
Jul 08 2015 17:12
{
    "collection" : "redash",
    "agreggate" : [    
      {
              "$group" : {
                 "_id" : "$recruiter_name",
                 "count" : { "$sum" : 2}
             }    
      }     
    ]
}
we checked the code from /opt/redash/current/...../query_runner/mongodb.py and was different to the last version in github
Arik Fraimovich
@arikfr
Jul 08 2015 17:14
maybe you have the version before support for aggregate queries was added?
Eran Sandler
@erans
Jul 08 2015 17:14
there were a number of changes in the last version that fixed some regression when we moved to the new query format
Arik Fraimovich
@arikfr
Jul 08 2015 17:14
what version of redash are you running?
Eran Sandler
@erans
Jul 08 2015 17:14
specifically the aggregation didn't move to it until I added it back
j0t3x
@j0t3x
Jul 08 2015 17:14
the one from the img with BQ support
Arik Fraimovich
@arikfr
Jul 08 2015 17:15
I don't remember right now what version it has, but it's definitely not the latest. I recommend upgrading and trying again, it might be the version before @erans's fixes.
Eran Sandler
@erans
Jul 08 2015 17:15
@arikfr I think its time to add another prominent place in the code to show the installed version :-)
j0t3x
@j0t3x
Jul 08 2015 17:15
redash.0.6.0.b812.tar.gz
Arik Fraimovich
@arikfr
Jul 08 2015 17:16
@erans what do you mean?
Eran Sandler
@erans
Jul 08 2015 17:16
to put a place in the UI that shows the version
so people don't have to go to the server and look at the mapped folder to know the version
j0t3x
@j0t3x
Jul 08 2015 17:16
hahahahah yeah
Arik Fraimovich
@arikfr
Jul 08 2015 17:16
@erans it shows in /admin/status
Eran Sandler
@erans
Jul 08 2015 17:16
oh :-)
didn't know that
Arik Fraimovich
@arikfr
Jul 08 2015 17:16
@j0t3x yes, this is the version before Eran's changes
j0t3x
@j0t3x
Jul 08 2015 17:16
rollback my comments then
Eran Sandler
@erans
Jul 08 2015 17:17
it doesn't show the version there
Arik Fraimovich
@arikfr
Jul 08 2015 17:17
@erans on the left side?
Eran Sandler
@erans
Jul 08 2015 17:17
I don't see 0.6.bXXXX there
j0t3x
@j0t3x
Jul 08 2015 17:17
0.6.0+b812
\
Arik Fraimovich
@arikfr
Jul 08 2015 17:17
blob
Eran Sandler
@erans
Jul 08 2015 17:17
since what version?
heh
I get 403 on the status.json file :-)
Arik Fraimovich
@arikfr
Jul 08 2015 17:19
that's weird :O
Eran Sandler
@erans
Jul 08 2015 17:19
might be my forwarding rule there
Arik Fraimovich
@arikfr
Jul 08 2015 17:19
forwarding?
Eran Sandler
@erans
Jul 08 2015 17:19
it goes through nginx first for SSL
j0t3x
@j0t3x
Jul 08 2015 17:21
@arikfr, this command
fab -H{your re:dash host} -u{the ssh user for this host} deploy_latest_release
what goes in the first argument?
Eran Sandler
@erans
Jul 08 2015 17:22
@arikfr is status.json a real file generate or it hides behind a handler?
Arik Fraimovich
@arikfr
Jul 08 2015 17:22
@j0t3x the host name or IP of the server running redash
@erans handler
j0t3x
@j0t3x
Jul 08 2015 17:23
and the user is redash right?
Arik Fraimovich
@arikfr
Jul 08 2015 17:23
@j0t3x no, whatever you use to ssh to this machine. you run this from your machine
j0t3x
@j0t3x
Jul 08 2015 17:24
ok my linux user
thanks man
Eran Sandler
@erans
Jul 08 2015 17:32
@arikfr so strange. Nginx is blocking the call for some reason
there is only one rule to forward everything to redash port 5000
Arik Fraimovich
@arikfr
Jul 08 2015 17:33
@erans are you sure it's nginx? are you accessing it w/ authenticated session?
Eran Sandler
@erans
Jul 08 2015 17:33
@arikfr its not nginx
its gunicorn
I made a curl request directly to port 5000 with all the cookies
Arik Fraimovich
@arikfr
Jul 08 2015 17:34
weird
check the logs
Eran Sandler
@erans
Jul 08 2015 17:35
@arikfr nothing in the logs but 403 request
what version of gunicorn are you using? I have version 18.0
updateto 19.3
lets see
@arikfr bah. Still doesn't work
j0t3x
@j0t3x
Jul 08 2015 17:49
@arikfr if i use gcloud compute to ssh the server my user should be other thing? cause im using my user and inputting my password and nothing
Arik Fraimovich
@arikfr
Jul 08 2015 17:49
@j0t3x gcloud cli uses certificate to sign in and not password. I think it stores it in ~/.ssh/ so you can pass it with -i param to the fab command
on my machine it's ~/.ssh/google_compute_engine
but I'm not sure if it's the name they always use
j0t3x
@j0t3x
Jul 08 2015 17:52
ok man thanks
j0t3x
@j0t3x
Jul 08 2015 18:14
@arikfr my friend, we still have problems with mongodb queries, we are still getting the whole collection with any aggregation query
is this ok? if q or (not q and not aggregate):
Arik Fraimovich
@arikfr
Jul 08 2015 18:15
@erans thoughts?
j0t3x
@j0t3x
Jul 08 2015 18:45
Guys, whats thisone?
if "aggregate" in query_data:
            aggregate = query_data["aggregate"]
            for step in aggregate:
                if "$sort" in step:
                    sort_list = []
                    for sort_item in step["$sort"]:
                        sort_list.append((sort_item["name"], sort_item["direction"]))

                    step["$sort"] = SON(sort_list)
j0t3x
@j0t3x
Jul 08 2015 20:38
Guys, any recommendation to debug the code? im new in python
im trying to output some values to a file but no luck yet.