You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+58-89Lines changed: 58 additions & 89 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,124 +7,93 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
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
14
11
15
12
### 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
16
35
- Custom MiniJinja template filters: `sha256`, `base64_encode`, `base64_decode` available in all templates (render and seed spec files)
17
36
-`sha256` filter with optional `mode` parameter (`"hex"` default, `"bytes"` for byte array output)
18
37
-`base64_encode` / `base64_decode` filters for standard Base64 encoding and decoding with error handling for invalid input
19
38
- Filters are chainable: e.g. `{{ "data" | sha256 | base64_encode }}`
20
39
-`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
36
40
- 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
37
41
-`src/duration.rs` module with `parse_duration` and `format_duration` utilities
38
42
- 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
39
43
- 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
- Replaced `regex` crate with manual envsubst parser in render module for smaller binary
51
71
- Replaced `chrono` crate with `std::time::SystemTime` and Hinnant's civil calendar algorithm in logging module
52
72
- Switched rustls from default crypto backends (aws-lc-rs + ring) to ring-only
53
73
- Disabled ureq default features (gzip/brotli) to reduce dependency tree
54
74
- 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)
72
80
73
81
### Fixed
74
82
- 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
- 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
0 commit comments