-
Notifications
You must be signed in to change notification settings - Fork 297
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(new): add a new Docker Registry test container #389
feat(new): add a new Docker Registry test container #389
Conversation
571d474
to
85f7451
Compare
27601db
to
12cbe3e
Compare
12cbe3e
to
98d1245
Compare
Hi @max-pfeiffer I'm grooming the ongoing issues for the project (we're rebooting the maintenance, see #405) and I'd like to know more about your test case! It's nice to have many flavours of containers, but it also means exponentially increasing complexity and cost of running the tests for this project! Therefore we're trying to stick to the most commonly used containers for now. |
Since 2024 I think the case may (!) actually be stronger than ever to support it(??) |
Hi @totallyzen, when building Docker containers with Docker Buildx there is currently no option to test your containers locally without a local registry. Otherwise Buildx pushes your image to Docker Hub, which is not what you want in a test case. More and more you need to use Buildx for effienciently building images and especially multi arch images. When you use Docker Python libraries like docker-py or python-on-whales to build and test Docker images, what a lot of persons and DevOps engineers like me nowadays do, a test container comes in very handy. BTW: I use the testcontainers package quite a bit and have time to spare. If you still need a helping hand I would be happy to jump in. |
@max-pfeiffer thanks, exactly what I meant to express! 😄 Not to push back, but to explain why this is useful (and put it in the readme of the module) 🙏 @alexanderankin indeed, I meant more the "average developer" use case rather than the specialised use case of the Docker company testing/building their own software! :) If it's only the latter, there would have been arguments that they have been successful without AND they develop their software in Go these days. Having said that, Max you're very welcome to join! You can start by rebasing your own PR to match the new project structure:
After that happy to review your PR and see what you'd like to work on next! 🙏 |
@totallyzen Thanks for the info. I will work on it this weekend. BTW: I just stumbled across that page: https://github.com/testcontainers/testcontainers-python/contribute |
Yes, very much, sorry about that. We're both operating on spare time and energy. |
98d1245
to
0278346
Compare
@totallyzen I just rebased my PR with main branch and did the refactoring to match the new project setup. Nice work, I like that setup with Poetry. Also I think it's good to switch to Ruff for code formatting and linting. Ruff is much more performant and easier to configure as all the other common tools. I struggle to understand what I need to do in |
hey @max-pfeiffer indeed, I ran the checks for you, seems like some docs and linting errors were made. Other than that, you're almost done here! Thanks for the effort! |
Hi @totallyzen , hmm I saw that that pre-commit config in project root, but pyproject.toml was missing the pre-commit dependencies (pre-commit, black, ruff). So I would say the pre-commit setup is not really there and ready to use for software engineers. 😃 I quickly fixed that in this PR: #438 |
a750f8f
to
13ac882
Compare
🤖 I have created a release *beep* *boop* --- ## [4.3.0](testcontainers-v4.2.0...testcontainers-v4.3.0) (2024-04-01) ### Features * **client:** Add custom User-Agent in Docker client as `tc-python/<version>` ([#507](#507)) ([dd55082](dd55082)) ### Bug Fixes * Add CassandraContainer ([#476](#476)) ([507e466](507e466)) * add chroma container ([#515](#515)) ([0729bf4](0729bf4)) * Add Weaviate module ([#492](#492)) ([90762e8](90762e8)) * **cassandra:** make cassandra dependency optional/test-only ([#518](#518)) ([bddbaeb](bddbaeb)) * **core:** allow setting docker command path for docker compose ([#512](#512)) ([63fcd52](63fcd52)) * **google:** add support for Datastore emulator ([#508](#508)) ([3d891a5](3d891a5)) * Improved Oracle DB module ([#363](#363)) ([6e6d8e3](6e6d8e3)) * inconsistent test runs for community modules ([#497](#497)) ([914f1e5](914f1e5)) * **kafka:** Add redpanda testcontainer module ([#441](#441)) ([451d278](451d278)) * **kafka:** wait_for_logs in kafka container to reduce lib requirement ([#377](#377)) ([909107b](909107b)) * **keycloak:** container should use dedicated API endpoints to determine container readiness ([#490](#490)) ([2e27225](2e27225)) * **nats:** Client-Free(ish) NATS container ([#462](#462)) ([302c73d](302c73d)) * **new:** add a new Docker Registry test container ([#389](#389)) ([0f554fb](0f554fb)) * pass doctests, s/doctest/doctests/, run them in gha, s/asyncpg/psycopg/ in doctest, fix keycloak flakiness: wait for first user ([#505](#505)) ([545240d](545240d)) * pass updated keyword args to Publisher/Subscriber client in google/pubsub [#161](#161) ([#164](#164)) ([8addc11](8addc11)) * Qdrant module ([#463](#463)) ([e8876f4](e8876f4)) * remove accidentally added pip in dev dependencies ([#516](#516)) ([dee20a7](dee20a7)) * **ryuk:** Enable Ryuk test suite. Ryuk image 0.5.1 -> 0.7.0. Add RYUK_RECONNECTION_TIMEOUT env variable ([#509](#509)) ([472b2c2](472b2c2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I added a new test container for spinning up a Docker registry.