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

feat: Implementation of memorydb api #8108

Merged
merged 3 commits into from
Sep 14, 2024

Conversation

archinksagar
Copy link
Contributor

This is the initial moto implementation of AWS MemoryDB API.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @archinksagar, it looks like all tests fail in ServerMode - see https://github.com/getmoto/moto/actions/runs/10778987259/job/29891829117?pr=8108

Could you also merge in the latest master? I just pushed a fix to make Moto compatible with the latest botocore, and the build for this PR may still fail if that change is not included.

@archinksagar
Copy link
Contributor Author

@bblommers Thanks for reviewing, I merged the latest master. If the tests fail in server mode, do I need to spell out the URL paths in urls.py? Would that fix it?

@bblommers
Copy link
Collaborator

Hi @archinksagar, yes, manually adding the URL's usually fixes the ServerMode tests. Let me know if it doesn't, or if you run into other issues, and I can have a closer look.

@archinksagar
Copy link
Contributor Author

@bblommers how to I get all the correct URL paths for memorydb?

@bblommers
Copy link
Collaborator

@archinksagar You can run the MotoServer locally, and Moto will tell you. Within the virtual environment that you develop Moto in, run:

moto_server

And then run the tests against it:

TEST_SERVER_MODE=true pytest -sv tests/test_memorydb

The server logs will then tell you which URL's are being visited, and which requests are failing.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 96.25293% with 16 lines in your changes missing coverage. Please review.

Project coverage is 94.48%. Comparing base (063537b) to head (7508097).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
moto/memorydb/models.py 94.31% 15 Missing ⚠️
moto/moto_server/werkzeug_app.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8108      +/-   ##
==========================================
+ Coverage   94.46%   94.48%   +0.02%     
==========================================
  Files        1141     1146       +5     
  Lines       98204    98740     +536     
==========================================
+ Hits        92764    93292     +528     
- Misses       5440     5448       +8     
Flag Coverage Δ
servertests 28.82% <0.70%> (-0.14%) ⬇️
unittests 94.45% <96.25%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@archinksagar
Copy link
Contributor Author

archinksagar commented Sep 13, 2024

@bblommers Server mode tests were failing because it did not find the correct URL pattern in werkzeug_app. Could you review again and let me know if the changes are right in werkzeug_app.py. Thankyou.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - thank you @archinksagar!

@bblommers bblommers added this to the 5.0.15 milestone Sep 14, 2024
@bblommers bblommers merged commit b195554 into getmoto:master Sep 14, 2024
51 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants