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

chore: release v0.18.0 #663

Merged
merged 1 commit into from
Jun 15, 2024
Merged

chore: release v0.18.0 #663

merged 1 commit into from
Jun 15, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 15, 2024

🤖 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)

Features

  • [❗] Support UDP and SCTP port mappings (#655)
  • Impl From<u16> for ContainerPort with TCP default (#658)
  • Support HTTP wait strategy (#659)
  • Allow passing u16 to Ports

Miscellaneous Tasks

  • Use nightly rustfmt (#657)

Refactor

  • [❗] Get rid of associated type ImageArgs and rename to cmd (#649)
  • Avoid unnecessary owned structs and boxing (#651)
  • [❗] Add ImageExt trait to avoid explicit conversion to RunnableImage (#652)
  • [❗] Rename RunnableImage to ContainerRequest (#653)
  • [❗] Exposed and mapped ports api (#656)
  • Preliminary refactoring of wait strategies (#661)


This PR was generated with 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<Item = impl Into<String>>. 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<dyn ..> for certain traits.
  • New: Utilizes Return Position impl Trait in Trait (RPITIT).
    • Update: Instead of requiring Box<dyn ..>, Image now uses RPITIT for trait returns. This change simplifies the code and improves readability and performance. Familiarize yourself with RPITIT 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.

Copy link

netlify bot commented Jun 15, 2024

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit c8e0ec6
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/666dfcdb4bcd9d0008f5d92d
😎 Deploy Preview https://deploy-preview-663--testcontainers-rust.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@DDtKey DDtKey closed this Jun 15, 2024
@DDtKey DDtKey reopened this Jun 15, 2024
@DDtKey DDtKey enabled auto-merge (squash) June 15, 2024 20:45
@DDtKey DDtKey disabled auto-merge June 15, 2024 20:45
@DDtKey DDtKey merged commit 0afec13 into main Jun 15, 2024
8 of 12 checks passed
@DDtKey DDtKey deleted the release-plz-2024-06-15T20-43-03Z branch June 15, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant