Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update python libraries in requirements.txt to latest stable versions #54

Open
danionescu0 opened this issue Feb 24, 2021 · 17 comments
Open

Comments

@danionescu0
Copy link
Owner

test if all works ok

@neelabalan
Copy link
Contributor

Hi. Can I take this up?

@danionescu0
Copy link
Owner Author

Sure. Just please test all services (api requests)

@neelabalan
Copy link
Contributor

Sure. Is there any testing methodoloy involved here or will it be just testing the requests individually with curl

@danionescu0
Copy link
Owner Author

Curl for now, or if you want to automate it you i've raised an issue some time ago: #20

There are functional tests libraries, you can use pyramid for example: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/testing.html

Tell me what you decide

@neelabalan
Copy link
Contributor

I haven't worked on functional tests before. For now I will test it with curl and do some reading on functional tests.

@danionescu0
Copy link
Owner Author

Ok, let me know if i can help you with it

@neelabalan
Copy link
Contributor

Sure. Thank you.

@danionescu0
Copy link
Owner Author

You can test easily from the Swagger interface

@neelabalan
Copy link
Contributor

Yeah. I did that for testing #51

@neelabalan
Copy link
Contributor

neelabalan commented Feb 25, 2021

Hi. I have completed testing all the services after the updating the packages to latest stable versions. I haven't updated the version for pymongo driver because updating to latest version was causing some error after the update. I cound't figure out the cause of the error but I can see that this has to do with create_index.

detailed error from logs

web-fulltext-search_1     | Traceback (most recent call last):
web-fulltext-search_1     |   File "/root/flask-mongodb-example/python/fulltext_search.py", line 81, in <module>
web-fulltext-search_1     |     fulltext_search.create_index([('app_text', TEXT)], name='fulltextsearch_index', default_language='english')
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 2059, in create_index
web-fulltext-search_1     |     return self.__create_indexes([index], session, **cmd_options)[0]
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 1949, in __create_indexes
web-fulltext-search_1     |     self._command(
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 238, in _command
web-fulltext-search_1     |     return sock_info.command(
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/pool.py", line 699, in command
web-fulltext-search_1     |     self._raise_connection_failure(error)
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/pool.py", line 683, in command
web-fulltext-search_1     |     return command(self, dbname, spec, slave_ok,
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/network.py", line 159, in command
web-fulltext-search_1     |     helpers._check_command_response(
web-fulltext-search_1     |   File "/usr/local/lib/python3.8/site-packages/pymongo/helpers.py", line 151, in _check_command_response
web-fulltext-search_1     |     raise NotMasterError(errmsg, response)
web-fulltext-search_1     | pymongo.errors.NotMasterError: not master, full error: {'topologyVersion': {'processId': ObjectId('60365e9c3243f6762818c4aa'), 'counter': 0}, 'operationTime': Timestamp(0, 0), 'ok': 0.0, 'errmsg': 'not master', 'code': 10107, 'codeName': 'NotWritablePrimary', '$clusterTime': {'clusterTime': Timestamp(0, 0), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}}
docker-flask-mongodb-example_web-fulltext-search_1 exited with code 1

@neelabalan
Copy link
Contributor

neelabalan commented Feb 25, 2021

I've updated the packages for requirements.txt, requirements-restplus.txt and requirements-fastapi.txt

Here are the commands I used for testing all the services after referring to both the Github documentation and Swagger interface

Let me know if I can raise a PR for the package updates.

@danionescu0
Copy link
Owner Author

That's great news! Please raise a PR and about the testing commands , i think they'll be usefull for semi-automatic testing until functional testing is in place. Could you put the in the root folder of the projec, name it testing.txt and maybe use curl inside so that it can be copy-paste it easily? Thanks

@neelabalan
Copy link
Contributor

Sure. For the commands I used httpie for all the testing since it was easy to work and has inbuilt JSON support. I will move all of those commands to curl and raise a seperate PR.

@danionescu0
Copy link
Owner Author

Oh i see, well i looked in diagonal and haven't noticed. Curl it's more used but you can live it with httpie if you like.

@neelabalan
Copy link
Contributor

Moving them to curl shouldn't take much work. I will do short test and port them.

neelabalan added a commit to neelabalan/docker-flask-mongodb-example that referenced this issue Feb 25, 2021
danionescu0 added a commit that referenced this issue Feb 25, 2021
neelabalan added a commit to neelabalan/docker-flask-mongodb-example that referenced this issue Feb 25, 2021
neelabalan added a commit to neelabalan/docker-flask-mongodb-example that referenced this issue Feb 25, 2021
danionescu0 added a commit that referenced this issue Feb 25, 2021
added for testing services #54
@neelabalan
Copy link
Contributor

I totally forgot to add here that I haven't updated the Werkzeug package (0.16.1) to latest version (1.0.0) in requirement-restuplus.txt because I found that updating it causes errors and those need to be fixed from flask-restplus side which I think won't be happening because the flask-restplus project is no longer maintained.

noirbizarre/flask-restplus#770

@danionescu0
Copy link
Owner Author

Oh ok, that's all right we'll postpone the update until they have someting stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants