From 0afec136fe5fcf32303f1ca9c76b8c2597de5d51 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:46:01 +0200 Subject: [PATCH] chore: release v0.18.0 (#663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🤖 New release * `testcontainers`: 0.17.0 -> 0.18.0
Changelog

## [0.18.0] - 2024-06-15 ### Details #### Bug Fixes - [❗] Make `DOCKER_CONFIG` usage consistent with Docker CLI ([#654](https://github.com/testcontainers/testcontainers-rs/pull/654)) #### Features - [❗] Support UDP and SCTP port mappings ([#655](https://github.com/testcontainers/testcontainers-rs/pull/655)) - Impl `From` for `ContainerPort` with TCP default ([#658](https://github.com/testcontainers/testcontainers-rs/pull/658)) - Support HTTP wait strategy ([#659](https://github.com/testcontainers/testcontainers-rs/pull/659)) - Allow passing `u16` to `Ports` #### Miscellaneous Tasks - Use nightly `rustfmt` ([#657](https://github.com/testcontainers/testcontainers-rs/pull/657)) #### Refactor - [❗] Get rid of associated type `ImageArgs` and rename to `cmd` ([#649](https://github.com/testcontainers/testcontainers-rs/pull/649)) - Avoid unnecessary owned structs and boxing ([#651](https://github.com/testcontainers/testcontainers-rs/pull/651)) - [❗] Add `ImageExt` trait to avoid explicit conversion to `RunnableImage` ([#652](https://github.com/testcontainers/testcontainers-rs/pull/652)) - [❗] Rename `RunnableImage` to `ContainerRequest` ([#653](https://github.com/testcontainers/testcontainers-rs/pull/653)) - [❗] Exposed and mapped ports api ([#656](https://github.com/testcontainers/testcontainers-rs/pull/656)) - Preliminary refactoring of `wait` strategies ([#661](https://github.com/testcontainers/testcontainers-rs/pull/661))

--- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). ## Migration Guide ### Overview Most of the breaking changes introduced in this version primarily impact developers who implement their own images. For general usage, the API remains mostly the same, with some improvements and enhancements for better performance and flexibility. ### 1. Renaming of `RunnableImage` - **Old**: `RunnableImage` - **New**: `ContainerRequest` - **Update**: The explicit conversion from `Image` to `ContainerRequest` (formerly `RunnableImage`) is no longer necessary. Instead, you can now directly import `testcontainers::ImageExt` and override image parameters as needed. ### 2. Changes to `Image` Methods - **Method**: `Image::tag` and `Image::name` - **Old Return Type**: `String` - **New Return Type**: `&str` - **Update**: Update any code that relies on these methods to handle the new return type `&str`. This change helps improve performance by avoiding unnecessary allocations. ### 3. Changes to `Image::exposed_ports` - **Method**: `Image::exposed_ports` - **Old Return Type**: Implementation-specific or previously different. - **New Return Type**: `&[ContainerPort]` - **Update**: The method now returns a slice of `ContainerPort`, which supports exposing ports with protocols `TCP`, `UDP`, and `SCTP`. Update your code to handle the slice accordingly. ### 4. Removal of Associated Type `Args` in `Image` - **Old**: `Image` had an associated type `Args`. - **New**: The associated type `Args` is removed. - **Update**: Command arguments are now part of `Image::cmd`, which returns `impl IntoIterator>`. This change allows more flexibility in specifying command arguments. Ensure your code is updated to work with the new method signature. ### 5. Simplification of Trait Implementation in `Image` - **Old**: `Image` required `Box` for certain traits. - **New**: Utilizes Return Position `impl` Trait in Trait (RPITIT). - **Update**: Instead of requiring `Box`, `Image` now uses RPITIT for trait returns. This change simplifies the code and improves readability and performance. Familiarize yourself with [RPITIT](https://rustc-dev-guide.rust-lang.org/return-position-impl-trait-in-trait.html) to understand its benefits and applications in your implementation. ### 6. Changes to `RunnableImage::with_mapped_port` - **Old**: `RunnableImage::with_mapped_port` - **New**: Accessible through `ImageExt::with_mapped_port` - **Update**: This method now accepts two parameters instead of a tuple. Adjust your method calls to pass the parameters separately. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 21 +++++++++++++++++++++ testcontainers/Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e833cd03..1485530e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,27 @@ All notable changes to this project will be documented in this file. +## [0.18.0] - 2024-06-15 +### Details +#### Bug Fixes +- [❗] Make `DOCKER_CONFIG` usage consistent with Docker CLI ([#654](https://github.com/testcontainers/testcontainers-rs/pull/654)) + +#### Features +- [❗] Support UDP and SCTP port mappings ([#655](https://github.com/testcontainers/testcontainers-rs/pull/655)) +- Impl `From` for `ContainerPort` with TCP default ([#658](https://github.com/testcontainers/testcontainers-rs/pull/658)) +- Support HTTP wait strategy ([#659](https://github.com/testcontainers/testcontainers-rs/pull/659)) +- Allow passing `u16` to `Ports` + +#### Miscellaneous Tasks +- Use nightly `rustfmt` ([#657](https://github.com/testcontainers/testcontainers-rs/pull/657)) + +#### Refactor +- [❗] Get rid of associated type `ImageArgs` and rename to `cmd` ([#649](https://github.com/testcontainers/testcontainers-rs/pull/649)) +- Avoid unnecessary owned structs and boxing ([#651](https://github.com/testcontainers/testcontainers-rs/pull/651)) +- [❗] Add `ImageExt` trait to avoid explicit conversion to `RunnableImage` ([#652](https://github.com/testcontainers/testcontainers-rs/pull/652)) +- [❗] Rename `RunnableImage` to `ContainerRequest` ([#653](https://github.com/testcontainers/testcontainers-rs/pull/653)) +- [❗] Exposed and mapped ports api ([#656](https://github.com/testcontainers/testcontainers-rs/pull/656)) +- Preliminary refactoring of `wait` strategies ([#661](https://github.com/testcontainers/testcontainers-rs/pull/661)) ## [0.17.0] - 2024-05-26 ### Details #### Bug Fixes diff --git a/testcontainers/Cargo.toml b/testcontainers/Cargo.toml index 2c3e2f20..d1dae7e4 100644 --- a/testcontainers/Cargo.toml +++ b/testcontainers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "testcontainers" -version = "0.17.0" +version = "0.18.0" categories = ["development-tools::testing"] readme = "README.md" authors.workspace = true