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

Implement DynamoDB preset #53

Open
orlangure opened this issue Oct 1, 2020 · 11 comments
Open

Implement DynamoDB preset #53

orlangure opened this issue Oct 1, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@orlangure
Copy link
Owner

A short guide on implementing a new preset:
https://github.com/orlangure/gnomock/blob/master/CONTRIBUTING.md#new-presets

MySQL preset for inspiration:
https://github.com/orlangure/gnomock/tree/master/preset/mysql

The objective is to implement a new Preset that spins up DynamoDB docker container, sets up its initial state (user provided data), waits for it to become ready and kills it in the end.

Please note that there are multiple steps required to create a new preset (see the guide above).
I'm here to help😼

@orlangure orlangure added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Contributions as a part of Hacktoberfest are welcome! labels Oct 1, 2020
@imsk17
Copy link

imsk17 commented Oct 3, 2020

Hi, Can I work on this issue?

@orlangure
Copy link
Owner Author

Hi, @imsk17! Of course. Thank you!
If you need any help getting started, I'm here to help.

@orlangure orlangure removed the good first issue Good for newcomers label Oct 5, 2020
@imsk17
Copy link

imsk17 commented Oct 9, 2020

it seems this isn't easy. dynamodb requires structs before it makes a table. so u cannot use map[string]interface{}

@orlangure
Copy link
Owner Author

@imsk17, that's fine!
I think we should go for quick wins, and having a working preset that creates a dynamodb container, even without initial data, would be great.

What do you think about narrowing the scope of this issue to implementing a preset that only has a working healthcheck function?

If in the future somebody requests initial setup, we handle it then.

@imsk17
Copy link

imsk17 commented Oct 15, 2020

or maybe we can setup a withStructs() method?

@orlangure
Copy link
Owner Author

I think it would complicate the development too much for the value it provides. If you'd like to work on initial data setup in dynamodb, I'd recommend to work on it as an independent task right after we merge a minimal working preset.

@imsk17
Copy link

imsk17 commented Oct 15, 2020

okay! thats fine

@checkaayush
Copy link

@imsk17 Are you still working on this?

@imsk17
Copy link

imsk17 commented Dec 14, 2020

quite busy nowadays. you can do it if you want to

@orlangure orlangure removed the hacktoberfest Contributions as a part of Hacktoberfest are welcome! label Jan 10, 2021
@nawa
Copy link

nawa commented Jan 20, 2021

@orlangure
Why not to use DynamoDB from localstack and you decided to create a separate preset?

@orlangure
Copy link
Owner Author

@nawa,
I think using the official docker image would be as close to the real thing as possible, probably closer than Localstack implementation.

Another factor is the API. Take Localstack S3 for example. We have WithS3Files option, which would be useless if you only need Localstack container to test SQS. Eventually the number of Localstack options could grow too much and add too much noise, so I'd rather "move" these options into separate, dedicated presets wherever possible.

The third factor which I'm not entirely sure about is startup speed. I assume that starting Localstack would take more time than just a DynamoDB container.

But I'm of course glad that there is an option to use DynamoDB via Localstack even though there are no initial state setup features like with other databases.

@orlangure orlangure removed the help wanted Extra attention is needed label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants