Skip to content

Commit 00a7723

Browse files
release: v1.1.0
Bump version to 1.1.0 and finalize changelog for first major Rust release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fd64c9a commit 00a7723

File tree

2 files changed

+59
-90
lines changed

2 files changed

+59
-90
lines changed

CHANGELOG.md

Lines changed: 58 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -7,124 +7,93 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Changed
11-
- Improved crates.io metadata: keyword-rich description, `rust-version = "1.88"` MSRV, authors, `documentation` pointing to docs.rs, and `exclude` to reduce published crate size
12-
- Added `#![doc = include_str!("../README.md")]` to `src/main.rs` so docs.rs renders the README as the crate landing page
13-
- Release workflow now publishes to crates.io automatically on tag push (requires `CARGO_REGISTRY_TOKEN` secret)
10+
## [1.1.0] - 2026-02-26
1411

1512
### Added
13+
- Project scaffolding with Rust/Cargo, CLI framework (clap), and repo layout
14+
- `wait-for` subcommand: wait for TCP and HTTP(S) endpoints with retries, exponential backoff, and jitter
15+
- `exec` subcommand: run arbitrary commands with structured logging, exit code forwarding, and optional `--workdir` for child process working directory
16+
- `fetch` subcommand and `internal/fetch` package: fetch secrets/config from HTTP(S) endpoints with auth header via env var, retry with backoff, TLS options, redirect control (same-site by default), and path traversal prevention
17+
- `render` subcommand and `internal/render` package: render templates into config files with `envsubst` (default) and Jinja2 template modes, path traversal prevention, and automatic intermediate directory creation
18+
- `seed` subcommand: run database seed commands with structured logging and exit code forwarding (no idempotency — distinct from `migrate`)
19+
- `migrate` subcommand: run database migration commands with structured logging, exit code forwarding, and optional idempotency via `--lock-file`
20+
- Structured database seeding via `seed` subcommand with YAML/JSON spec files
21+
- Seed tracking table (`initium_seed` by default) for idempotent seed application
22+
- Support for PostgreSQL, MySQL, and SQLite database drivers
23+
- Auto-generated IDs and cross-table references via `_ref` / `@ref:` syntax
24+
- Environment variable substitution in seed values via `$env:VAR_NAME`
25+
- Unique key detection to prevent duplicate row insertion
26+
- Reset mode (`--reset`) to delete existing data and re-apply seeds
27+
- Transaction safety: each seed set is applied atomically with rollback on failure
28+
- Ordered seed sets and tables via `order` field
29+
- Seed schema with phase-based execution: ordered phases with create → wait → seed lifecycle
30+
- MiniJinja template rendering for seed spec files: dynamic values, conditionals, loops via `{{ env.VAR }}`
31+
- Embedded database/schema creation via `create_if_missing` in seed phases (PostgreSQL, MySQL)
32+
- Embedded wait-for logic: poll for tables, views, schemas, or databases with configurable per-phase and per-object timeouts
33+
- Database trait methods: `create_database`, `create_schema`, `object_exists`, `driver_name` for SQLite, PostgreSQL, MySQL
34+
- Cross-phase `@ref:` references: references defined in earlier phases resolve in later phases
1635
- Custom MiniJinja template filters: `sha256`, `base64_encode`, `base64_decode` available in all templates (render and seed spec files)
1736
- `sha256` filter with optional `mode` parameter (`"hex"` default, `"bytes"` for byte array output)
1837
- `base64_encode` / `base64_decode` filters for standard Base64 encoding and decoding with error handling for invalid input
1938
- Filters are chainable: e.g. `{{ "data" | sha256 | base64_encode }}`
2039
- `src/template_funcs.rs` dedicated module for template utility functions, designed for easy extension
21-
- `docs/templating.md` documenting all template filters with usage patterns, chaining examples, and error reference
22-
- `examples/template-functions/config.tmpl` example demonstrating sha256 and base64 filters
23-
- Unit tests for sha256 (hex, bytes, empty, invalid mode), base64 (encode, decode, roundtrip, invalid input), and template integration (filter chaining)
24-
25-
### Changed
26-
- Clarified that seed phases with only `create_if_missing` can omit the `seed_sets` field entirely (`seed_sets` defaults to empty via `#[serde(default)]`); updated integration test YAML specs accordingly
27-
28-
### Added
29-
- Integration tests with docker-compose for end-to-end testing against real Postgres 16, MySQL 8.0, and nginx services (`tests/integration_test.rs`): wait-for TCP/HTTP/timeout/multiple targets, render template, fetch HTTP, exec command, seed PostgreSQL and MySQL with cross-table reference verification, create database/schema, idempotency, and reset mode
30-
- Additional create-if-missing integration tests: 2 PostgreSQL and 2 MySQL tests using known non-existing database names (`initium_noexist_alpha`, `initium_noexist_beta`) to verify database creation, existence checks, and idempotent re-runs
31-
- `tests/docker-compose.yml` with Postgres, MySQL, and HTTP health-check server definitions
32-
- `tests/input/` with seed spec files and template for integration tests
33-
- Separate GitHub Actions workflow (`.github/workflows/integration.yml`) for integration tests with service containers
34-
- Helm chart unit tests using helm-unittest plugin (`charts/initium/tests/deployment_test.yaml`) covering deployment rendering, securityContext enforcement, disabled sampleDeployment, multiple initContainers, extraVolumes/extraVolumeMounts, image configuration, workdir mount, and labels
35-
- `helm unittest` step added to CI helm-lint job with automatic plugin installation
3640
- Duration unit support for all time parameters (`--timeout`, `--initial-delay`, `--max-delay`, seed phase `timeout`, seed wait-for `timeout`): accepts `ms`, `s`, `m`, `h` suffixes with decimal values (e.g. `1.5m`, `2.7s`) and combined units (e.g. `1m30s`, `2s700ms`, `18h36m4s200ms`); bare numbers default to seconds
3741
- `src/duration.rs` module with `parse_duration` and `format_duration` utilities
3842
- Environment variable support for all CLI flags via `INITIUM_*` prefix (e.g., `--json``INITIUM_JSON`, `--timeout``INITIUM_TIMEOUT`); flag values take precedence over env vars
3943
- Comma-separated `INITIUM_TARGET` env var for specifying multiple wait-for endpoints
40-
- Env var column added to all flag tables in `docs/usage.md`
41-
- Integration tests verifying env var fallback behavior and flag precedence over env vars
42-
43-
### Fixed
44-
- Added Cargo dependency caching (`Swatinem/rust-cache@v2`) to all CI and release workflow jobs for faster builds
45-
- Added Docker BuildKit layer caching (`type=gha`) to release workflow for both main and jyq image builds
46-
- Replaced Dockerfile stub-build caching layer with BuildKit `--mount=type=cache` for cargo registry and target directory, enabling cross-build cache reuse
44+
- `internal/retry` package with configurable retry logic, backoff, and jitter
45+
- `internal/logging` package with text and JSON structured logging, automatic secret redaction
46+
- `internal/safety` package with path traversal prevention for file writes
47+
- Dockerfile for multi-arch scratch-based builds (runs as non-root UID 65534)
48+
- `jyq.Dockerfile` and `initium-jyq` container image variant with pre-built `jq` and `yq` tools
49+
- Makefile with build, test, lint, and Docker targets
50+
- Helm chart skeleton with security-hardened initContainer templates
51+
- GitHub Actions CI workflow (lint, test, build) and release workflow (container build/push with SBOM)
52+
- FAQ.md with functionality, security, and deployment questions for junior-to-mid-level engineers
53+
- Documentation: README, usage guide, security threat model, architecture/design docs, seeding guide, templating guide
54+
- Documentation for building custom images using Initium as a base
55+
- SECURITY.md with vulnerability reporting instructions
56+
- Apache 2.0 LICENSE
57+
- Examples for nginx-waitfor, postgres-migrate-seed, config-render, template-functions, and phased-seed use cases
58+
- Unit tests for retry logic, logging, safety path validation, wait-for, sha256, base64, template integration, seed schema parsing, database operations, executor logic, references, idempotency, reset, edge cases, duration parsing, and env var support
59+
- Integration tests with docker-compose for end-to-end testing against real Postgres 16, MySQL 8.0, and nginx services
60+
- Helm chart unit tests using helm-unittest plugin covering deployment rendering, securityContext, and configuration
61+
- Separate GitHub Actions workflow for integration tests with service containers
4762

4863
### Changed
64+
- Complete rewrite from Go to Rust for smaller Docker images (7.4MB → ~5MB)
65+
- CLI framework changed from cobra to clap
66+
- Template engine changed from Go text/template to minijinja (Jinja2-style); access env vars via `{{ env.VAR }}`
67+
- CI/CD workflows updated for Rust toolchain (cargo test, clippy, rustfmt)
68+
- Dockerfiles updated to use rust:1.88-alpine builder with musl static linking
4969
- CLI time parameter defaults now use duration units: `--timeout` default `5m` (was `300`), `--initial-delay` default `1s` (was `1000`), `--max-delay` default `30s` (was `30000`); seed phase timeout default `30s` (was `30`)
5070
- Replaced `regex` crate with manual envsubst parser in render module for smaller binary
5171
- Replaced `chrono` crate with `std::time::SystemTime` and Hinnant's civil calendar algorithm in logging module
5272
- Switched rustls from default crypto backends (aws-lc-rs + ring) to ring-only
5373
- Disabled ureq default features (gzip/brotli) to reduce dependency tree
5474
- Database drivers (sqlite, postgres, mysql) are now optional Cargo features (all enabled by default); build with `--no-default-features --features sqlite` for minimal binary
55-
56-
### Removed
57-
- Seed schema version 1 (flat `seed_sets` without phases): all seed specs now use phase-based structure
58-
- `version` field from seed spec schema: no longer required or accepted
59-
60-
### Added
61-
- Seed schema with phase-based execution: ordered phases with create → wait → seed lifecycle
62-
- MiniJinja template rendering for seed spec files: dynamic values, conditionals, loops via `{{ env.VAR }}`
63-
- Embedded database/schema creation via `create_if_missing` in seed phases (PostgreSQL, MySQL)
64-
- Embedded wait-for logic: poll for tables, views, schemas, or databases with configurable per-phase and per-object timeouts
65-
- Database trait methods: `create_database`, `create_schema`, `object_exists`, `driver_name` for SQLite, PostgreSQL, MySQL
66-
- Cross-phase `@ref:` references: references defined in earlier phases resolve in later phases
67-
- Documentation: schema reference, driver support tables, MiniJinja templating guide, failure modes in `docs/seeding.md`
68-
- Example: `examples/seed/phased-seed.yaml` — multi-phase PostgreSQL seeding with wait-for, create-if-missing, and MiniJinja
69-
70-
### Changed
71-
- Seed executor tests now verify data actually arrived in the database after execution, using file-based SQLite and post-execution queries to assert row counts, column values, cross-table references, env substitution, ordering, and edge cases
75+
- Seed executor tests now verify data actually arrived in the database after execution
76+
- Clarified that seed phases with only `create_if_missing` can omit the `seed_sets` field entirely (`seed_sets` defaults to empty via `#[serde(default)]`)
77+
- Improved crates.io metadata: keyword-rich description, `rust-version = "1.88"` MSRV, authors, `documentation` pointing to docs.rs, and `exclude` to reduce published crate size
78+
- Added `#![doc = include_str!("../README.md")]` to `src/main.rs` so docs.rs renders the README as the crate landing page
79+
- Release workflow now publishes to crates.io automatically on tag push (requires `CARGO_REGISTRY_TOKEN` secret)
7280

7381
### Fixed
7482
- Updated Dockerfiles (`Dockerfile`, `jyq.Dockerfile`) from `rust:1.85-alpine` to `rust:1.88-alpine` to fix release workflow failure caused by `time@0.3.47` requiring rustc 1.88.0
75-
- Aligned all markdown table columns across documentation files (`FAQ.md`, `README.md`, `docs/seeding.md`, `docs/templating.md`, `docs/usage.md`, `tests/README.md`)
83+
- Aligned all markdown table columns across documentation files
7684
- Fixed clippy `collapsible_if` lint in seed executor's unique key check
7785
- Removed dead code: unused `src/cmd/seed.rs` module (replaced by `src/seed/`)
7886
- Suppressed unused field warning on `AutoIdConfig.id_type` (reserved for future use)
7987
- Removed unused imports (`Arc`, `Mutex`) and unused mutable binding in seed executor tests
88+
- Added Cargo dependency caching (`Swatinem/rust-cache@v2`) to all CI and release workflow jobs for faster builds
89+
- Added Docker BuildKit layer caching (`type=gha`) to release workflow for both main and jyq image builds
90+
- Replaced Dockerfile stub-build caching layer with BuildKit `--mount=type=cache` for cargo registry and target directory, enabling cross-build cache reuse
8091

81-
### Added
82-
- Structured database seeding via `seed` subcommand with YAML/JSON spec files
83-
- Seed tracking table (`initium_seed` by default) for idempotent seed application
84-
- Support for PostgreSQL, MySQL, and SQLite database drivers
85-
- Auto-generated IDs and cross-table references via `_ref` / `@ref:` syntax
86-
- Environment variable substitution in seed values via `$env:VAR_NAME`
87-
- Unique key detection to prevent duplicate row insertion
88-
- Reset mode (`--reset`) to delete existing data and re-apply seeds
89-
- Transaction safety: each seed set is applied atomically with rollback on failure
90-
- Ordered seed sets and tables via `order` field
91-
- Documentation: `docs/seeding.md` with full schema reference, Kubernetes usage (env vars and volume-mounted secrets), and failure modes
92-
- Example seed specs: `examples/seed/basic-seed.yaml`, `examples/seed/sqlite-seed.yaml`, `examples/seed/env-credentials-seed.yaml`
93-
- Unit tests for seed schema parsing, database operations, executor logic, references, idempotency, reset, and edge cases
94-
95-
### Changed
96-
- Complete rewrite from Go to Rust for smaller Docker images (7.4MB → ~5MB)
97-
- CLI framework changed from cobra to clap
98-
- Template engine changed from Go text/template to minijinja (Jinja2-style); access env vars via `{{ env.VAR }}`
99-
- CI/CD workflows updated for Rust toolchain (cargo test, clippy, rustfmt)
100-
- Dockerfiles updated to use rust:1.88-alpine builder with musl static linking
101-
102-
### Added
103-
- `exec` subcommand: run arbitrary commands with structured logging, exit code forwarding, and optional `--workdir` for child process working directory
104-
- `jyq.Dockerfile` and `initium-jyq` container image variant with pre-built `jq` and `yq` tools
105-
- Documentation for building custom images using Initium as a base
106-
- `fetch` subcommand and `internal/fetch` package: fetch secrets/config from HTTP(S) endpoints with auth header via env var, retry with backoff, TLS options, redirect control (same-site by default), and path traversal prevention
107-
- `render` subcommand and `internal/render` package: render templates into config files with `envsubst` (default) and Jinja2 template modes, path traversal prevention, and automatic intermediate directory creation
108-
- `seed` subcommand: run database seed commands with structured logging and exit code forwarding (no idempotency — distinct from `migrate`)
109-
- `migrate` subcommand: run database migration commands with structured logging, exit code forwarding, and optional idempotency via `--lock-file`
110-
- FAQ.md with functionality, security, and deployment questions for junior-to-mid-level engineers
111-
- Project scaffolding with Rust/Cargo, CLI framework (clap), and repo layout
112-
- `wait-for` subcommand: wait for TCP and HTTP(S) endpoints with retries, exponential backoff, and jitter
113-
- `internal/retry` package with configurable retry logic, backoff, and jitter
114-
- `internal/logging` package with text and JSON structured logging, automatic secret redaction
115-
- `internal/safety` package with path traversal prevention for file writes
116-
- Dockerfile for multi-arch scratch-based builds (runs as non-root UID 65534)
117-
- Makefile with build, test, lint, and Docker targets
118-
- Helm chart skeleton with security-hardened initContainer templates
119-
- GitHub Actions CI workflow (lint, test, build) and release workflow (container build/push with SBOM)
120-
- Unit tests for retry logic, logging, safety path validation, and wait-for subcommand
121-
- Examples for nginx-waitfor, postgres-migrate-seed, and config-render use cases
122-
- Documentation: README, usage guide, security threat model, and architecture/design docs
123-
- SECURITY.md with vulnerability reporting instructions
124-
- Apache 2.0 LICENSE
92+
### Removed
93+
- Seed schema version 1 (flat `seed_sets` without phases): all seed specs now use phase-based structure
94+
- `version` field from seed spec schema: no longer required or accepted
12595

12696
### Security
12797
- All file operations constrained to --workdir with path traversal prevention
12898
- Automatic redaction of sensitive keys (token, password, secret, etc.) in logs
12999
- Container runs as non-root with read-only root filesystem and all capabilities dropped
130-

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "initium"
3-
version = "1.0.4"
3+
version = "1.1.0"
44
edition = "2021"
55
rust-version = "1.88"
66
authors = ["Kitstream <opensource@kitstream.io>"]

0 commit comments

Comments
 (0)