From 21528cd9b357c58fc3271cc58869f8421f0b44f9 Mon Sep 17 00:00:00 2001 From: Paul Nettleton Date: Tue, 23 Apr 2024 09:11:42 -0500 Subject: [PATCH] release: compose_spec v0.2.0 --- CHANGELOG.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa446d6..67f9134 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.0] - 2024-04-24 + +### New Features +- *(volume)* Add `Volume::is_empty()`. +- *(network)* Add `Network::is_empty()`. + - Add `is_empty()` methods to `network::{Network, Ipam, IpamConfig}`. +- *(service)* Add `service::Logging::is_empty()`. +- *(service)* Add `service::healthcheck::Command::is_empty()`. +- *(service)* Add `service::Build::is_empty()`. +- *(service)* Add `service::BlkioConfig::is_empty()`. +- *(service)* Add `is_empty()` methods to `service::volumes::mount` types. + - Add `is_empty()` methods to `service::volumes::mount::{VolumeOptions, BindOptions, TmpfsOptions}`. +- *(service)* Implement `Default` for `service::deploy::resources::Device`. +- *(service)* Add `service::deploy::Resources::is_empty()`. + - Add `is_empty()` methods to `service::deploy::resources::{Resources, Limits, Reservations, Device, GenericResource, DiscreteResourceSpec}`. +- *(service)* Add `service::Deploy::is_empty()`. + - Add `is_empty()` methods to `service::deploy::{Deploy, Placement, Preference, RestartPolicy, UpdateRollbackConfig}`. +- *(service)* Implement `Default` for `service::Healthcheck`. +- *(service)* Add `into_short()` methods to `service::volumes::mount::{Volume, Bind}`. +- *(service)* Implement `Display` for `service::blkio_config::Weight`. +- *(service)* Implement `From` for `String`. +- Implement `PartialEq` and `PartialEq<&str>` for key types. + - `compose_spec::{Identifier, MapKey, ExtensionKey, service::{build::CacheOption, user_or_group::Name, Hostname, Resource}}` +- *(service)* Add `service::volumes::mount::Tmpfs::from_target()`. + - Also implemented `From` for `service::volumes::mount::Tmpfs` using the new function. +- **BREAKING** *(service)* Add `entitlements` field to `service::Build` ([#15](https://github.com/k9withabone/compose_spec_rs/issues/15)). + +### Bug Fixes +- **BREAKING** *(service)* Allow for unlimited `pids_limit`. + - Generalize `service::MemswapLimit` into `service::Limit`. + - `Service.memswap_limit` is now an `Option>`. + - `Service.pids_limit` is now an `Option>`. + - `service::deploy::resources::Limits.pids` is now an `Option>`. +- **BREAKING** `service::Device` no longer implements `Default` (this was a mistake). +- **BREAKING** *(service)* Container paths must be absolute. + - `Service.tmpfs` is now an `Option>`. + - `Service.working_dir` is now an `Option`. + - `service::blkio_config::BpsLimit.path` is now an `AbsolutePath`. + - `service::blkio_config::IopsLimit.path` is now an `AbsolutePath`. + - `service::blkio_config::WeightDevice.path` is now an `AbsolutePath`. + - `service::develop::WatchRule.target` is now an `Option`. + - `service::Device.container_path` is now an `AbsolutePath`. + - Add `service::device::ParseDeviceError::ContainerPathAbsolute` variant. +- *(service)* `ShortVolume::into_long()` set `create_host_path: true`. + - When converting a `service::volumes::ShortVolume` into a `service::volumes::mount::Bind`, the `create_host_path` field in `service::volumes::mount::BindOptions` should be set to `true`. + +### Documentation +- Fix `ListOrMap::into_list()` docs. + - Last line was a normal comment instead of a doc comment. +- *(changelog)* Add [git-cliff](https://github.com/orhun/git-cliff) configuration + +### Tests +- *(service)* Fix `service::ports::ShortRanges` generation. + - The `offset` range could become `0..0` which caused `proptest` to panic. + +### Miscellaneous +- *(ci)* Add semver-checks job. + - Use [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) to make sure the package version is increased correctly when making changes. +- *(deps)* Update dependencies. +- *(ci)* Bump `typos` to v1.20.9. + ## [0.1.0] - 2024-04-05 The initial release of `compose_spec`! @@ -16,3 +77,6 @@ The initial release of `compose_spec`! - Completely documented. - Conversion between short and long syntax forms of values. - Conversion between `std::time::Duration` and the duration string format from the compose-spec. + +[0.2.0]: https://github.com/k9withabone/compose_spec_rs/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/k9withabone/compose_spec_rs/compare/51a31d82c34c13cf8881bf8a9cbda74a6b6aa9b6...v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 353778f..34d2626 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,7 +37,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "compose_spec" -version = "0.2.0-alpha.1" +version = "0.2.0" dependencies = [ "compose_spec_macros", "indexmap", diff --git a/Cargo.toml b/Cargo.toml index 30e1a5d..5c620ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -226,7 +226,7 @@ sort_commits = "oldest" [package] name = "compose_spec" -version = "0.2.0-alpha.1" +version = "0.2.0" authors.workspace = true edition.workspace = true license.workspace = true