这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@wolfeidau
Copy link
Contributor

@wolfeidau wolfeidau commented Jan 17, 2022

This implements the metastore for AWS dynamodb.

  1. I have implemented most of the configuration options for DynamoDB based on your URL specification in https://mosuka.github.io/phalanx/lock_store.html
  2. I have added integration tests using the infrastructure / tooling in the project
  3. All the operations are "safe" for create / read and delete, there is currently no update. I added some generic errors to help with this.

So some feedback on the storage interface, I don't think the context.Context or logger should be stored in the DynamodbStorage struct, i think each call should pass the ctx in and the logger should be pulled from the context. This would enable integration of tracing later on, with the ctx propagated all the way through the service.

Need to work out how you want tests added, i have used github.com/ory/dockertest to enable use of dynamodb local inside a test, but this can also just be run with docker-compose or just started locally before running integration tests.

@mosuka
Copy link
Owner

mosuka commented Jan 17, 2022

I would like to change context and logger later along with other code.
Thanks for the review. :)

@wolfeidau wolfeidau marked this pull request as ready for review January 18, 2022 19:41
@wolfeidau
Copy link
Contributor Author

@mosuka it looks like there something missing like secrets.AWS_SECRET_ACCESS_KEY being empty rather than a dummy value?

Would be good to get the integration tests passing.

@mosuka
Copy link
Owner

mosuka commented Jan 19, 2022

@wolfeidau Thanks. Let me check.

@mosuka
Copy link
Owner

mosuka commented Jan 19, 2022

@wolfeidau
I have updated the workflow. Can you please merge the changes to the main branch into your feat_add_dynamodb branch and push it again?

@wolfeidau
Copy link
Contributor Author

@mosuka looks like that sorted out the failing tests 🎉

@mosuka
Copy link
Owner

mosuka commented Jan 19, 2022

@wolfeidau Thank you for your contribution. 😃

@mosuka mosuka merged commit f344de6 into mosuka:main Jan 19, 2022
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