These are chat archives for fossasia/open-event-server

7th
Jul 2016
Avi Aryan
@aviaryan
Jul 07 2016 12:23
@/all If we are to import/export media in the zip, then I guess we will have to use background tasks as upload/download to/from S3 will take time and we don't want to block main thread. Is anyone aware how to do the same in Flask ? I have been searching and Flask Celery looks good. http://blog.miguelgrinberg.com/post/using-celery-with-flask
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:24
i've used celery but in django
Saptak Sengupta
@SaptakS
Jul 07 2016 12:25
I have also used it in django.. Will check the Flask Celery..
Avi Aryan
@aviaryan
Jul 07 2016 12:25
@rafalkowalski @SaptakS does it support callbacks ?
never mind. I think that is not needed .
Saptak Sengupta
@SaptakS
Jul 07 2016 12:27
Yes.. it supports as far as I know..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:27
i think yes
Avi Aryan
@aviaryan
Jul 07 2016 12:27
great to know
Saptak Sengupta
@SaptakS
Jul 07 2016 12:27
http://blog.miguelgrinberg.com/post/using-celery-with-flask This is a nice blog I think to get the basics..
Avi Aryan
@aviaryan
Jul 07 2016 12:27
so should we use it ?
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:27
even you are able to define crontable to run task in proper schedule
Avi Aryan
@aviaryan
Jul 07 2016 12:27
yup, I was also reading the same. looks nice and simple
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:28
so we need rabbitmq
Avi Aryan
@aviaryan
Jul 07 2016 12:28
@rafalkowalski the need is to run tasks dynamically, at will . Does crontable (I don't know what it is) allow that ?
Saptak Sengupta
@SaptakS
Jul 07 2016 12:29
@rafalkowalski Rabbitmq is for scheduling tasks right?
@aviaryan crontable helps you run a particular task scheduled at a particular time..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:29
rabbitmq is a broker
Saptak Sengupta
@SaptakS
Jul 07 2016 12:30
Yup...
Avi Aryan
@aviaryan
Jul 07 2016 12:30
@SaptakS okay. then that is not what I need.
Saptak Sengupta
@SaptakS
Jul 07 2016 12:30
used it once..
@aviaryan what I understand is we need to download/upload images to S3 through zip while import/exporting events.. Is that what it is?
Avi Aryan
@aviaryan
Jul 07 2016 12:31
I need to run background tasks, tasks that don't block the main thread. I think celerey will be good enough
@SaptakS Yes. correct
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:31
maybe SQS :D?
Saptak Sengupta
@SaptakS
Jul 07 2016 12:31
Ok.. so you want them to asyncronously, right?
Avi Aryan
@aviaryan
Jul 07 2016 12:31
yes. since if there are 100s of images and audios then downloading all of them from S3 will take quite some time (for export)
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:31
@aviaryan i think also that celery will be enough
Saptak Sengupta
@SaptakS
Jul 07 2016 12:32
@rafalkowalski I think celery should be good enough... If not we can try something else.. But since celery is already related with Flask, I think using it makes more sense..
Yup..
Avi Aryan
@aviaryan
Jul 07 2016 12:32
:+1:
great, thanks guys
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:32
no problem
Saptak Sengupta
@SaptakS
Jul 07 2016 12:32
:+1:
Avi Aryan
@aviaryan
Jul 07 2016 12:33
yes
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:33
we can also use it for notifications
Avi Aryan
@aviaryan
Jul 07 2016 12:33
you mean celery ? or rabbitmq ?
Rafał Kowalski
@rafalkowalski
Jul 07 2016 12:33
celery
Saptak Sengupta
@SaptakS
Jul 07 2016 12:33
yeah.. because a lot of notifications and email need to be scheduled I guess..
Saptak Sengupta
@SaptakS
Jul 07 2016 12:48
I am getting this error while running the server:
http://pastebin.com/BQqac7vN
Anyone facing similar problem?
Ok.. it was a proxy error..
solved..
Mario Behling
@mariobehling
Jul 07 2016 13:07
ok
I have a general question: We constantly have a number of issues like "I save a and then I change a to b and it does not update or does not change or some other error"
Is there any way how we can test all fields with some kind of unit test?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:09
There are some problems in updating events.. I am working on correcting those in the event edit..
Mario Behling
@mariobehling
Jul 07 2016 13:09
are all fields saved? can all fields be changed? are all fields updated after they are changed?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:09
I will create tests for those fields so that they can be checked ith updating fields..
Mario Behling
@mariobehling
Jul 07 2016 13:09
@SaptakS How can we have an automated test for this?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:09
We can create an unittest for it..
I will work on it once I complete th work in hand..
Mario Behling
@mariobehling
Jul 07 2016 13:09
@SaptakS How can we have tests for all fields? Where do you document what the tests are covering?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:10
We can't have a generic test I think.. Though I will look into it..
What I was thinking of doing is wherever there is a test for creating fields and deleting fields, I will add tests for update as well..
Mario Behling
@mariobehling
Jul 07 2016 13:11
@SaptakS ok, please open an issue for this. If we cannot have a generic test, let's work on a list of things to test, so we can have human testers.
Saptak Sengupta
@SaptakS
Jul 07 2016 13:11
That way all will be covered..
There are unittests for almost all creation of fields.. I will add update tests... And yes I will open an issue right away...
Mario Behling
@mariobehling
Jul 07 2016 13:12
e.g. there are some rather complicated things like "what happens when in the last wizard step the form fields are changed - and there are already sessions submitted" what will happen?
or what happens if an organizer changes the "required fields"
if a speaker has submitted info already for fields that are no longer required, these fields should still stay saved in the db
how could we possibly test this?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:14
Right now what happens is once you update the form fields after session is submitted, all the next sessions that are entried work according to the update but the old session form submissions stay as they were submitted..
No data is lost but again they don't match with the requirement now provided..
WIll have to think about these.. true..
Mario Behling
@mariobehling
Jul 07 2016 13:14
yes, so what happens if a speaker logs in again and wants to change his submission?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:15
The information stays in the DB but if the field is no longer required, he won't be able to change..
Thats what happens now..
Mario Behling
@mariobehling
Jul 07 2016 13:15
and if new fields become available and are required?
he needs to enter them when he edits, right?
Saptak Sengupta
@SaptakS
Jul 07 2016 13:16
Then when he goes to edit, he has to fill up the form..
Yup..
Mario Behling
@mariobehling
Jul 07 2016 13:17
ok, good. It is rather tiresome to test these kind of things and we had it several times, that something works, but at a later time it doesnt. I wish we could have automated tests for all kinds of things.
Saptak Sengupta
@SaptakS
Jul 07 2016 13:17
True.. We need to work on the testing a lot..
However after the last session that we had, many participants have shown interest in testing... So hoping to see some human testers reporting issues soon..
Mario Behling
@mariobehling
Jul 07 2016 13:25
in that case it would be good to have a list of things to test step by step
Saptak Sengupta
@SaptakS
Jul 07 2016 13:26
yeah.. I will make an issue
Mario Behling
@mariobehling
Jul 07 2016 13:26
just asking someone testing something randomly is ok, but we need to know if things work specificually
Saptak Sengupta
@SaptakS
Jul 07 2016 13:26
Everyone can add to the checklist I guess..
Mario Behling
@mariobehling
Jul 07 2016 13:26
yes
Saptak Sengupta
@SaptakS
Jul 07 2016 13:26
True.. I agree..
Saptak Sengupta
@SaptakS
Jul 07 2016 13:37
fossasia/open-event-orga-server#1457
Didn't assign anyone to the issue, as I think this issue is supposed to be for everyone if I am not wrong..
Mario Behling
@mariobehling
Jul 07 2016 13:53
ok
Rafał Kowalski
@rafalkowalski
Jul 07 2016 14:04
@mariobehling i think we can use selenium to test Ui
Saptak Sengupta
@SaptakS
Jul 07 2016 14:05
@rafalkowalski its not about testing UI.. it is about testing updation of forms in database..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 14:06
But sometimes is something wrong in UI Side but in db it works
Saptak Sengupta
@SaptakS
Jul 07 2016 14:07
Yeah that is also the case..
For UI we can use selenium, that I agree... But there are many bugs regarding updation of forms..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 14:07
So i think we should also use selenium
Exactly
Saptak Sengupta
@SaptakS
Jul 07 2016 14:07
For example, in event wizard, none of session_type, tracks or microlocation were being updated.. I just fixed them..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 14:08
Ok so i can take care to write tests in selenium
Saptak Sengupta
@SaptakS
Jul 07 2016 14:08
There is still error related to deletion of tracks, etc. from editing in event wizard..
Great.. I can also help you in that if you want..
We need to write as much unittests as possible because, a lot of times it happens that something working previously doesn't work properly later..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 14:09
Cool
Saptak Sengupta
@SaptakS
Jul 07 2016 14:09
:+1:
I am working on some of the bugs related to updation forms that I have found..
Aditya Vyas
@aditya1702
Jul 07 2016 14:20
I too will start writing unittests wherever required
Mario Behling
@mariobehling
Jul 07 2016 15:32
Thanks! Tests for the wizard especially! Cheers
Saptak Sengupta
@SaptakS
Jul 07 2016 15:32
I am already doing the tests manually for the time..
Theres quite some issues in updation part..
Fixing them right now..
Rafał Kowalski
@rafalkowalski
Jul 07 2016 17:22
But manually testing waste our time xd
We need automation
Saptak Sengupta
@SaptakS
Jul 07 2016 17:22
true..
but firstly to implement we need to identify what are the errors right??
XD
Rafał Kowalski
@rafalkowalski
Jul 07 2016 22:44
how can i solve ConnectionError: HTTPConnectionPool(host='maps.googleapis.com', port=80): Max retries exceeded with url: /maps/api/geocode/json?latlng=51.1078852,17.0385376&key=AIzaSyAHdXg0Y_zk-wCNpslbBqcezLdHniaEwkI (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f801ebb2190>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Saptak Sengupta
@SaptakS
Jul 07 2016 22:45
Please check your internet connection.. If you have a proxy or some kind of authentication system, check that as well..
I received a similar error.. It was related to my proxy authentication..