Skip to content

Commit

Permalink
Merge pull request #35 from k9withabone/compose_spec-v0.3.0
Browse files Browse the repository at this point in the history
`compose_spec` v0.3.0
  • Loading branch information
k9withabone authored Oct 16, 2024
2 parents 95f2a93 + e0f73a3 commit 2f27591
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
uses: actions/checkout@v4

- name: Typos
uses: crate-ci/typos@v1.20.9
uses: crate-ci/typos@v1.26.0

msrv:
runs-on: ubuntu-latest
Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,62 @@ 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.3.0] - 2024-10-16

### New Features
- Add `Compose::validate_networks()`.
- Ensures that all networks used in each service is defined in the top-level `networks` field of the `Compose` file.
- Add `Compose::validate_volumes()`.
- Ensures that named volumes used across multiple services are defined in the top-level `volumes` field of the `Compose` file.
- Add `Compose::validate_configs()`.
- Ensures that all configs used in each service is defined in the top-level `configs` field of the `Compose` file.
- Add `Compose::validate_secrets()`.
- Ensures that all secrets used in each service is defined in the top-level `secrets` field of the `Compose` file.
- Add `Compose::validate_all()`.
- Add `Compose::options()` for setting deserialization options.
- Add `Options::apply_merge()`. ([#2](https://github.com/k9withabone/compose_spec_rs/issues/2))
- Merges `<<` keys into the surrounding mapping.
- **BREAKING** *(service)* Add `services[].networks[].driver_opts` attribute. ([#29](https://github.com/k9withabone/compose_spec_rs/issues/29))
- Added the `driver_opts` field to `compose_spec::service::network_config::Network`.
- *(service)* Add `Limit` string conversions.
- Added `Display` and `FromStr` implementations to `compose_spec::service::Limit`.
- Changed the string deserialization logic of `Limit` to deserialize "-1" as `Limit::Unlimited`.
- **BREAKING** *(service)* Support `network_mode: container:{name}`.
- Added the `compose_spec::service::network_config::NetworkMode::Container` enum variant.

### Bug Fixes
- *(service)* Image registry with port is valid. ([#22](https://github.com/k9withabone/compose_spec_rs/issues/22))
- Image names with a registry that have a port are now valid.
- Changed `compose_spec::service::image::Name::new()` to allow for using `compose_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::RegistryPort` error 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 `ports` short syntax. ([#24](https://github.com/k9withabone/compose_spec_rs/issues/24))
- **BREAKING** *(service)* `user` may have an optional group. ([#23](https://github.com/k9withabone/compose_spec_rs/issues/23))
- Before this fix values for `services[].user` that included a GID or group name were rejected. The Compose Specification is unfortunately vague for `user` (see https://github.com/compose-spec/compose-spec/issues/39). However, both `docker run --user` and `podman run --user` accept the `{user}[:{group}]` syntax.
- Renamed `compose_spec::service::UserOrGroup` to `IdOrName`.
- Renamed `compose_spec::service::user_or_group` module to `user`.
- Added `compose_spec::service::User`.
- Changed the type of the `user` field in `compose_spec::Service` to `Option<User>`.
- **BREAKING** *(service)* Support unlimited ulimits. ([#31](https://github.com/k9withabone/compose_spec_rs/issues/31))
- Changed `soft` and `hard` fields of `compose_spec::service::Ulimit` to `compose_spec::service::Limit<u64>`.
- Changed `compose_spec::service::Ulimits` type alias (used for `ulimits` field of `compose_spec::Service` and `compose_spec::service::Build`) to `IndexMap<Resource, ShortOrLong<Limit<u64>, Ulimit>>`.
- Changed `<Ulimit as AsShort>::Short` to `Limit<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>` and `impl<L> From<u64> for ShortOrLong<Limit<u64>, L>`.

### Documentation
- Add fragment documentation.
- *(macros)* Add symlink to `LICENSE` file. ([#21](https://github.com/k9withabone/compose_spec_rs/issues/21))
- This ensures that the `LICENSE` file is included when the `compose_spec_macros` package is published to crates.io via `cargo publish`.
- *(changelog)* Update git-cliff config for v2.6.0.

### Miscellaneous
- *(lints)* Allow bare URL in `compose_spec::service::build::Context::Url` docs.
- *(lints)* Decrease priority of lint groups.
- *(deps)* Update lock file.
- *(ci)* Bump `typos` to v1.26.0.

## [0.2.0] - 2024-04-24

### New Features
Expand Down Expand Up @@ -78,5 +134,6 @@ The initial release of `compose_spec`!
- Conversion between short and long syntax forms of values.
- Conversion between `std::time::Duration` and the duration string format from the compose-spec.

[0.3.0]: https://github.com/k9withabone/compose_spec_rs/compare/v0.2.0...v0.3.0
[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
Loading

0 comments on commit 2f27591

Please sign in to comment.