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

Add Presto container #2196

Merged
merged 2 commits into from Feb 8, 2020
Merged

Add Presto container #2196

merged 2 commits into from Feb 8, 2020

Conversation

findepi
Copy link
Contributor

@findepi findepi commented Dec 18, 2019

Default docker image

  • Should be a Docker Hub official image, or published by a reputable source (ideally the company or organisation that officially supports the technology)
  • Should have a verifiable open source Dockerfile and a way to view the history of changes
  • MUST show general good practices regarding container image tagging - e.g. we do not use latest tags, and we do not use tags that may be mutated in the future
  • MUST be legal for Testcontainers developers and Testcontainers users to pull and use. Mechanisms exist to allow EULA acceptance to be signalled, but images that can be used without a licence are greatly preferred.

Module dependencies

  • The module should use as few dependencies as possible,
  • Regarding libraries, either:
    • they should be compileOnly if they are likely to already be on the classpath for users' tests (e.g. client libraries or drivers)
    • they can be implementation (and thus transitive dependencies) if they are very unlikely to conflict with users' dependencies.
  • If client libraries are used to test or use the module, these MUST be legal for Testcontainers developers and Testcontainers users to download and use.

API (e.g. MyModuleContainer class)

  • Favour doing the right thing, and least surprising thing, by default
  • Ensure that method and parameter names are easy to understand. Many users will ignore documentation, so IDE-based substitutes (autocompletion and Javadocs) should be intuitive.
  • The module's public API should only handle standard JDK data types and MUST not expose data types that come from compileOnly dependencies. This is to reduce the risk of compatibility problems with future versions of third party libraries.

Documentation

  • Every module MUST have a dedicated documentation page containing:
  • A high level overview
  • A usage example
  • If appropriate, basic API documentation or further usage guidelines
  • Dependency information
  • Acknowledgements, if appropriate
  • Consider that many users will not read the documentation pages - even if the first person to add it to a project does, people reading/updating the code in the future may not. Try and avoid the need for critical knowledge that is only present in documentation.

@findepi

This comment has been minimized.

@bsideup
Copy link
Member

bsideup commented Dec 19, 2019

@findepi I just triggered a rerun

@findepi

This comment has been minimized.

@rnorth
Copy link
Member

rnorth commented Dec 26, 2019

Hi @findepi, thanks for taking time to start a contribution.

Please could you run through this section of the docs around new module contributions? https://www.testcontainers.org/contributing/#contributing-new-modules

It would be helpful if you could complete the checklist so that we can review efficiently! Thank you

@findepi findepi force-pushed the presto branch 2 times, most recently from 2e08dda to 5e46a43 Compare December 28, 2019 14:54
@findepi
Copy link
Contributor Author

findepi commented Dec 28, 2019

@rnorth sure
i added the checklist to the PR message & filled it to the best of my knowledge.
The API section seems to be something you need to judge yourself, right?

I also added a docs page, following PostgreSQL and MariaDB examples.

Let me know what is the next step.

@rushton
Copy link

rushton commented Jan 28, 2020

+1 looking forward to this

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

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

Sorry this has taken a long time to get to. I'm happy with this, and I think we should proceed. I hope you don't mind but I pushed a couple of trivial docs-related tweaks to the PR branch already, and just have one final comment. I hope this is OK!

Thanks again for the contribution and all your hard work.

@@ -0,0 +1,138 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
Copy link
Member

Choose a reason for hiding this comment

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

Testcontainers is MIT licenced, and it looks like this is the only file with an Apache header. Is that an error?

I'd prefer it if we could keep all source files similarly licenced, just to avoid confusion!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out & apologies.

@@ -53,6 +53,7 @@ nav:
- modules/databases/neo4j.md
- modules/databases/oraclexe.md
- modules/databases/postgres.md
- modules/databases/presto.md
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I squash this with the first commit

@@ -1,5 +1,8 @@
# Presto Module

!!! note
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,138 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out & apologies.

@findepi
Copy link
Contributor Author

findepi commented Feb 8, 2020

@rnorth thanks for the review! updated.

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

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

@findepi perfect! Let's merge :D

@rnorth rnorth merged commit 61ce025 into testcontainers:master Feb 8, 2020
@findepi findepi deleted the presto branch February 8, 2020 20:56
artjomka pushed a commit to artjomka/testcontainers-java that referenced this pull request Feb 28, 2020
* Add Presto container

* Add incubating note to module docs

Co-authored-by: Richard North <rich.north@gmail.com>
@rnorth rnorth added this to the 1.13.0 milestone Mar 5, 2020
@rnorth
Copy link
Member

rnorth commented Mar 5, 2020

Released in 1.13.0!

Thanks for the contribution @findepi 😃

quincy pushed a commit to quincy/testcontainers-java that referenced this pull request May 28, 2020
* Add Presto container

* Add incubating note to module docs

Co-authored-by: Richard North <rich.north@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants