Releases: k9withabone/compose_spec_rs
Releases · k9withabone/compose_spec_rs
v0.3.0
New Features
- Add
Compose::validate_networks().- Ensures that all networks used in each service is defined in the top-level
networksfield of theComposefile.
- Ensures that all networks used in each service is defined in the top-level
- Add
Compose::validate_volumes().- Ensures that named volumes used across multiple services are defined in the top-level
volumesfield of theComposefile.
- Ensures that named volumes used across multiple services are defined in the top-level
- Add
Compose::validate_configs().- Ensures that all configs used in each service is defined in the top-level
configsfield of theComposefile.
- Ensures that all configs used in each service is defined in the top-level
- Add
Compose::validate_secrets().- Ensures that all secrets used in each service is defined in the top-level
secretsfield of theComposefile.
- Ensures that all secrets used in each service is defined in the top-level
- Add
Compose::validate_all(). - Add
Compose::options()for setting deserialization options. - Add
Options::apply_merge(). (#2)- Merges
<<keys into the surrounding mapping.
- Merges
- BREAKING (service) Add
services[].networks[].driver_optsattribute. (#29)- Added the
driver_optsfield tocompose_spec::service::network_config::Network.
- Added the
- (service) Add
Limitstring conversions.- Added
DisplayandFromStrimplementations tocompose_spec::service::Limit. - Changed the string deserialization logic of
Limitto deserialize "-1" asLimit::Unlimited.
- Added
- BREAKING (service) Support
network_mode: container:{name}.- Added the
compose_spec::service::network_config::NetworkMode::Containerenum variant.
- Added the
Bug Fixes
- (service) Image registry with port is valid. (#22)
- Image names with a registry that have a port are now valid.
- Changed
compose_spec::service::image::Name::new()to allow for usingcompose_spec::service::Image::set_registry()with a registry with a port. The first part of a name is now treated as a registry if it has a dot (.) regardless of whether the name has multiple parts. - Added
compose_spec::service::image::InvalidNamePart::RegistryPorterror variant for when a registry's port is not a valid port number. - Refactored image tests to not use
unwrap().
- (service) Support host IP in brackets for
portsshort syntax. (#24) - BREAKING (service)
usermay have an optional group. (#23)- Before this fix values for
services[].userthat included a GID or group name were rejected. The Compose Specification is unfortunately vague foruser(see compose-spec/compose-spec#39). However, bothdocker run --userandpodman run --useraccept the{user}[:{group}]syntax. - Renamed
compose_spec::service::UserOrGrouptoIdOrName. - Renamed
compose_spec::service::user_or_groupmodule touser. - Added
compose_spec::service::User. - Changed the type of the
userfield incompose_spec::ServicetoOption<User>.
- Before this fix values for
- BREAKING (service) Support unlimited ulimits. (#31)
- Changed
softandhardfields ofcompose_spec::service::Ulimittocompose_spec::service::Limit<u64>. - Changed
compose_spec::service::Ulimitstype alias (used forulimitsfield ofcompose_spec::Serviceandcompose_spec::service::Build) toIndexMap<Resource, ShortOrLong<Limit<u64>, Ulimit>>. - Changed
<Ulimit as AsShort>::ShorttoLimit<u64>. - Added
impl From<Limit<u64>> for Ulimit. - Added
impl From<u64> for Limit<u64>. - Added
impl<T, L> From<Limit<T>> for ShortOrLong<Limit<T>, L>andimpl<L> From<u64> for ShortOrLong<Limit<u64>, L>.
- Changed
Documentation
- Add fragment documentation.
- (macros) Add symlink to
LICENSEfile. (#21)- This ensures that the
LICENSEfile is included when thecompose_spec_macrospackage is published to crates.io viacargo publish.
- This ensures that the
- (changelog) Update git-cliff config for v2.6.0.
Miscellaneous
- (lints) Allow bare URL in
compose_spec::service::build::Context::Urldocs. - (lints) Decrease priority of lint groups.
- (deps) Update lock file.
- (ci) Bump
typosto v1.26.0.
v0.2.0
New Features
- (volume) Add
Volume::is_empty(). - (network) Add
Network::is_empty().- Add
is_empty()methods tonetwork::{Network, Ipam, IpamConfig}.
- Add
- (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 toservice::volumes::mounttypes.- Add
is_empty()methods toservice::volumes::mount::{VolumeOptions, BindOptions, TmpfsOptions}.
- Add
- (service) Implement
Defaultforservice::deploy::resources::Device. - (service) Add
service::deploy::Resources::is_empty().- Add
is_empty()methods toservice::deploy::resources::{Resources, Limits, Reservations, Device, GenericResource, DiscreteResourceSpec}.
- Add
- (service) Add
service::Deploy::is_empty().- Add
is_empty()methods toservice::deploy::{Deploy, Placement, Preference, RestartPolicy, UpdateRollbackConfig}.
- Add
- (service) Implement
Defaultforservice::Healthcheck. - (service) Add
into_short()methods toservice::volumes::mount::{Volume, Bind}. - (service) Implement
Displayforservice::blkio_config::Weight. - (service) Implement
From<service::UserOrGroup>forString. - Implement
PartialEq<str>andPartialEq<&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<service::volumes::AbsolutePath>forservice::volumes::mount::Tmpfsusing the new function.
- Also implemented
- BREAKING (service) Add
entitlementsfield toservice::Build(#15).
Bug Fixes
- BREAKING (service) Allow for unlimited
pids_limit.- Generalize
service::MemswapLimitintoservice::Limit<T>. Service.memswap_limitis now anOption<Limit<ByteValue>>.Service.pids_limitis now anOption<Limit<u32>>.service::deploy::resources::Limits.pidsis now anOption<Limit<u32>>.
- Generalize
- BREAKING
service::Deviceno longer implementsDefault(this was a mistake). - BREAKING (service) Container paths must be absolute.
Service.tmpfsis now anOption<ItemOrList<AbsolutePath>>.Service.working_diris now anOption<AbsolutePath>.service::blkio_config::BpsLimit.pathis now anAbsolutePath.service::blkio_config::IopsLimit.pathis now anAbsolutePath.service::blkio_config::WeightDevice.pathis now anAbsolutePath.service::develop::WatchRule.targetis now anOption<AbsolutePath>.service::Device.container_pathis now anAbsolutePath.- Add
service::device::ParseDeviceError::ContainerPathAbsolutevariant.
- (service)
ShortVolume::into_long()setcreate_host_path: true.- When converting a
service::volumes::ShortVolumeinto aservice::volumes::mount::Bind, thecreate_host_pathfield inservice::volumes::mount::BindOptionsshould be set totrue.
- When converting a
Documentation
- Fix
ListOrMap::into_list()docs.- Last line was a normal comment instead of a doc comment.
- (changelog) Add git-cliff configuration
Tests
- (service) Fix
service::ports::ShortRangesgeneration.- The
offsetrange could become0..0which causedproptestto panic.
- The
Miscellaneous
- (ci) Add semver-checks job.
- Use cargo-semver-checks to make sure the package version is increased correctly when making changes.
- (deps) Update dependencies.
- (ci) Bump
typosto v1.20.9.
v0.1.0
The initial release of compose_spec!
Features
- (De)serialize from/to the structure of the Compose specification.
- Values are fully validated and parsed.
- Completely documented.
- Conversion between short and long syntax forms of values.
- Conversion between
std::time::Durationand the duration string format from the compose-spec.