rokwire / events-manager

Events Manager is the administrative interface to events in the Rokwire Platform. Through this web application, users can manage existing events coming from calendars and/or create and manage user events.
Apache License 2.0
1 stars 4 forks source link

[TASK] Events-manager dev deployment #1091

Closed minump closed 1 year ago

minump commented 1 year ago

Description

Integration testing and dev deployment for events-manager The WebTools download and upload functionalities are to be tested. Test with python and docker. Deploy latest develop-branch events-manager to dev instance.

Acceptance Criteria

Events-manager webtools functionality works fine with python and docker. Dev deployment is done.

sandeep-ps commented 1 year ago

Hi, Minu, Could you please continue with the Events Manager and Events BB dev deployment? Yesterday, while creating PR for fixing category mapping, I did some more testing locally. I think we can complete the remaining testing in the development instances.

minump commented 1 year ago

Hi @sandeep-ps Ran EventsBB develop branhc in 9000 port in local using python. Ran events manager develop branch in port 5000 using flask in local. Tried downloading the webtools calendar, (setting -> In webtool check the "illinois app master calendar" -> click download orange button). Getting a bunch of logs (INFO, WARNING and ERROR). Think the download is working fine. But not the publish. Getting the same SSLError as before. Tried publishing a pending event from WebTools "Illinois app master calender" as well, that also failed. Error log :

Traceback (most recent call last):
  File "/Events Manager/events-manager/utilities/source_utilities.py", line 155, in publish_event
    result = requests.post(current_app.config['EVENT_BUILDING_BLOCK_URL'], headers=headers,
  File "/Events Manager/events-manager/venv/lib/python3.9/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "Events Manager/events-manager/venv/lib/python3.9/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Events Manager/events-manager/venv/lib/python3.9/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/Events Manager/events-manager/venv/lib/python3.9/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "Events Manager/events-manager/venv/lib/python3.9/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=9000): Max retries exceeded with url: /events/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))

This could be a configuration issue.

minump commented 1 year ago

Resolved the earlier SSLError. The url is "http:/events" and not "https:/events" . But now all event publishing is failing because of no "id" field.

2023-06-16T19:56:24.225Z INFO    [Thread-38 ] : source_utilities.py - 648b64f29432854befe51f27 is going to be approved
2023-06-16T19:56:24.416Z INFO    [Thread-38 ] : source_utilities.py - event 648b64f29432854befe51f27 submit method: post
2023-06-16T19:56:24.429Z ERROR   [Thread-38 ] : source_utilities.py - 'id'
Traceback (most recent call last):
  File "/Events Manager/events-manager/utilities/source_utilities.py", line 158, in publish_event
    platform_event_id = result.json()['id']
KeyError: 'id'
minump commented 1 year ago

Getting an authorization. We can proceed to dev.

minump commented 1 year ago

Dev deployment for events-manager done. Updated the task definition to use the latest (96).

Downloading WebTools calendar from https://api-dev.rokwire.illinois.edu/manager-events/event/setting is failing. Selected "Illlinois Mobile App Master Calendar" Clicked "Save" and the proceeded to download by clicking "Download". After a while a pop-up error message "Internal error" Screenshot 2023-06-20 at 3 53 43 PM

minump commented 1 year ago

Checked AWS logs. The events-manager has logs for "source_utilities submission method : put" failed Screenshot 2023-06-20 at 3 54 43 PM

There is also logs for "source_utilities deletion failed" . this deletion failed logs were present while testing in local machine as well. This is probably caused by the events-manager trying to delete old events and this error can be ignored. Screenshot 2023-06-20 at 3 56 14 PM

The api calls are going to eventsBB as I can see logs for wrong event categories, like "Community". Screenshot 2023-06-20 at 3 56 46 PM

minump commented 1 year ago

In user events -> creating an event, and publishing the pending events works fine. Make sure to select the correct category (as the categories have been changed in the backend).

minump commented 1 year ago

The task definition was pointing to the previous events-manager version 3.5. The task definition was updated to point to the develop version. The calendar events publishing and webTools download are working fine.

minump commented 1 year ago

Closing this issue.