Repository navigation
Releases
Releases · jprybylski/datum
v1.7.0
Added
- Opt-in global flags for running datum on configs it didn't write, documented in the new
"Embedding datum" page. Without them nothing changes. --no-vcs(orDATUM_NO_VCS=1) never runsgit/svnand never edits ignore rules; a dataset
withignore: truegets a warning instead (#35).--allow-types(orDATUM_ALLOW_TYPES) refuses any other source type, insourceor
sources, at load (#36).--rootresolves targets and relativefilesources in a folder and keeps every target inside
it (relative, no.., no symlink escape, never the config or lockfile);--target-prefix
requires targets under a subfolder (#37).fetch --stage-dir DIR --lock-out PATHwrites targets and the new lockfile to a staging area,
leaving the project untouched, and reports per dataset the files written and removed; the
staged lockfile matches an in-place fetch's (#38).--jsonfordelete,undelete,unlockandinit(which then never prompts;deleteand
unlockneed--yes), a"format": "datum-report/1"field in every JSON document except
schema, anddatum --json --versionwith build features (#39).check --report-onlywrites nothing (no targets, lockfile or ignore rules) and reportsupdate
datasets that would be re-fetched asstale(#40).- The lockfile records
sizefor single-file targets anddir_files(path, SHA-256, size) for
directory targets;audit --verify-localreports local drift per dataset and per file (#41). --env-allowand--env-prefixrestrict which${NAME}variables a config may reference (#42).--git-https-onlyrefuses non-https://git URLs and never uses SSH keys or agents;
--cache-dirsets the git cache folder (#43).--https-onlyrefuseshttp://sources at load (#44).
Changed
${NAME}is substituted only in the datasets a command works on:fetch IDneeds only that
dataset's variables, andaudit,undeleteandunlockneed none (#42).- Directory sync replaces a target folder that holds only the dataset's own files as a whole, so
an interrupted sync leaves the old or the new tree; shared folders get every file written before
any is replaced or removed (#38). - Releases refuse to publish a version whose tag points at a different commit, and never replace
existing assets; the docs state that release binaries are static (#45).
Fixed
datum --json auditon a config with no datasets printed"entries": null; it now prints an
empty array.
Security
- Substituted
${NAME}values, URL query values and URLuser:password@are redacted in output
and in the lockfile'sinaccessible_error(#42). - HTTP sources refuse a redirect from
https://tohttp://, and dropAuthorizationand
configured headers on a redirect to another host (#44). - A lockfile
dir_pathsentry that is absolute or contains..is refused, so fetch cleanup and
deletecan't remove files outside a target (#37).
v1.6.0
Added
- Global and per-dataset
ignoresettings manage Datum-owned Git and SVN ignore rules when Datum
runs inside a detected working copy, while remaining a no-op outside version control (#29). - Schema conformance tests keep
data-schema.json, the embedded schema, and YAML decoder fields
synchronized (#30). - HTTP sources accept request headers and a body, including environment-expanded Bearer tokens;
a non-empty body uses POST and fetch fingerprints the response without a duplicate request (#31). datum initinteractively or noninteractively scaffolds a first HTTP or file dataset without
overwriting existing configuration. An interactive run configures project defaults first and
makes the initial dataset optional.datum init --emptycreates the same schema-valid
datasets: []scaffold directly, compatible withdatur's YAML editing tools (#32).
v1.5.1
Fixed
- Updated
github.com/go-git/go-git/v5to v5.19.2 to resolve two security vulnerabilities.
v1.5.0
Added
.data.yamlstring values support strict${NAME}environment-variable substitution, allowing
secrets and machine-specific values to stay outside version control. Unset variables are config
errors, plain$NAMEremains available to command sources, and$${NAME}escapes a literal
reference (#25).
v1.4.0
Added
datum typeslists the source types included in the current build; passing one or more type
names shows their required and optional configuration fields. Supports--json,--no-color,
andNO_COLOR(#22).datum schemaprints the complete.data.yamlJSON Schema embedded in that version of the
binary, making the validation contract available without a separate download (#23).
v1.3.0
Added
datum delete ID [ID ...]removes a dataset's local files (a single file, or - for a
directory-synced dataset - just the relative paths it owns, cleaning up any subdirectories left
empty and the target directory itself if nothing else targets it) and marks itdeletedin the
lockfile. Prompts for confirmation unless--yesis passed..data.yamlis never modified (#17).datum undelete ID [ID ...]clears that flag socheck/fetchresume tracking the dataset;
follow it withdatum fetch IDto restore the data (#17).check/fetchnow skip any dataset markeddeleted, printing a[SKIP]line that points to
datum undelete, instead of treating the missing target as changed/failed (#17).datum unlock ID [ID ...]permanently removes a lockfile entry - config-tracked, deleted, or
orphaned by editing the dataset out of.data.yaml(whichcheck/fetchalready left alone,
and still do - see the regression test covering that). Never touches local files or
.data.yaml; prompts for confirmation unless--yes(#17).datum auditprints a read-only report of every dataset's combined config+lockfile state -
ok,pending(tracked, never fetched),deleted, ororphaned- without contacting any data
source. Supports--json,--no-color, andNO_COLORlikecheck/fetch(#17).
v1.2.2
Fixed
- Multiple datasets can now target the same directory with the file handler's directory sync:
previously, a second dataset fetching into a shared target directory would wipe out files the
first dataset had written, because cleanup tracked "files written to this directory" instead of
"files written by this dataset" (#14). - If two datasets sharing a target directory try to write the same relative path,
fetchnow
fails with an explicit error naming the conflicting path(s) instead of one dataset silently
overwriting the other's file. Datasets with same-named but non-conflicting subdirectories (e.g.
both containingdir1/) merge into the shared target without issue (#15). - Directory sync no longer leaves behind empty subdirectories after every file under them is
removed (e.g. deleted upstream, or reassigned to a different relative path) - the now-empty
directory is removed too, walking up until a non-empty directory or the target itself (#16). - Directory sync no longer writes a
<target>.datum-manifest.jsonsidecar file next to the
target. That per-dataset tracking state (which relative paths a dataset last wrote) now lives in
the lockfile asdir_pathson the dataset's entry, alongside the rest of its tracked state (#18).
Note
- Sharing a target directory between datasets relies on a read-then-fetch conflict check and
isn't safe under full concurrency: datasets that share a target should be fetched at
--concurrency 1(the default) for the conflict check to be reliable.
v1.2.1
Added
- Colorized
check/fetchoutput: status tags ([OK ]green,[FAIL]/[ERR ]red,
[WARN]/[STALE]yellow,[UPD ]/[FETCH]cyan) are colored when stdout is a terminal, and
automatically plain otherwise - piped output,NO_COLOR(per no-color.org),
and the new--no-colorflag all suppress it. --jsonflag forcheck/fetch: prints a single JSON document ({"results": [...]}, one
object per dataset withid/status/fingerprints/message/warnings) instead of colorized
text, for scripting and other programmatic consumers. Config/lockfile-level errors print as
{"error": "..."}under--jsoninstead of plain text. Exit codes are unchanged either way.
Changed
[STALE]/[FAIL]lines showing a changed fingerprint now print the old (dimmed) and new
fingerprint on their own indented lines instead of a single(lock="..." -> now="...")line -
fingerprints are frequently full sha256 hashes or ETags 60+ characters long, and quoting them
with%qmade them read like an escaped Go literal rather than a value to compare. A dataset
with no prior lock entry now showslock: (none)instead of the internallock="<nil>".- Test coverage raised from 85.5% to 96.7% overall, closing most of the error-handling branches
Codecov flagged as untested (all packages now above 90%).
Fixed
check/fetchno longer panic when the lockfile exists but contains invalid YAML (as opposed
to not existing, which was already handled gracefully) - they now exit2with a clear "lock
error" message, same as a config parse error.
v1.2.0
Added
- Directory sources for the
filehandler: pointingsource.pathat a directory (auto-detected)
recreates the whole tree undertarget, with an aggregatedirsha256:fingerprint and
deletion tracking so files removed upstream are removed fromtargettoo, without touching
anything else already living there (closes #8). --timeoutand--concurrencyflags for bothcheckandfetch.--timeout(default5m)
bounds the entire run viacontext.Contextso a hung source can't block the process forever;
--concurrency(default1) processes datasets in parallel while keeping output in the
original config-file order regardless of completion order.--versionflag, printing the build's version (set via-ldflags -X main.version=...in
release builds; localgo buildbinaries reportdev).- Docker-based integration test suite (
test/integration/, run via
scripts/test-integration.sh) exercising the git handler against a real git-over-SSH server -
covering the real SSH transport and host-key verification behavior that in-process unit tests
can't reach.scripts/sandbox.shbrings up the same server as a persistent, manually
resettable sandbox (up/down/reset/status) for tryingdatumagainst it by hand,
with a ready-madetest/integration/sandbox.data.yaml. - Documentation site under
docs/, published via GitHub Pages
(.github/workflows/pages.yml) - installation, configuration, commands, handlers, examples,
tool comparison, and architecture/development pages with real navigation and search. The
README is now a shorter landing page linking out to it instead of holding everything inline. - Release automation: pushing a
VERSIONbump tomaintags and publishes a GitHub Release via
goreleaser (.goreleaser.yml,.github/workflows/tag-release.yml+
.github/workflows/release.yml), with cross-compiled binaries for Linux/macOS/Windows
(amd64+arm64), checksums, and this changelog's matching section as release notes.
Fixed
- Security: the git handler's SSH auth no longer unconditionally disables host-key
verification. It now uses go-git's secure default (verifying againstknown_hosts) unless
DATUM_GIT_INSECURE_HOST_KEY=1is explicitly set. - Correctness: git tag refs (
ref: v1.0.0) were silently unresolvable due to dead fallback
logic inresolveRefCommit- a bare ref was always pre-normalized to a branch ref before the
tag-fallback check could ever run. Only branch refs were exercised by the existing example/CI
coverage, so this went unnoticed. - Correctness: the
commandhandler's custom environment variables (fetch_cmd,
fingerprint_cmd) were replacing the entire child process environment instead of extending it,
silently wipingPATH/HOME/etc. and breaking any command that wasn't a shell builtin. - Check's
updatepolicy no longer silently keeps a stale fingerprint when a fetch succeeds but
the immediate post-fetch re-fingerprint fails; it's now treated as a failed attempt (matching
fetch's existing behavior), so the next source is tried instead. writeLocknow creates its lockfile's parent directory if it doesn't exist yet, matching every
handler's own file-write path - a fresh--lockpath pointing into a not-yet-created directory
used to fail with a confusing "no such file or directory".- Security: resolved all 27 open Dependabot alerts (13 critical/high) by updating
github.com/go-git/go-git/v5(v5.13.0 → v5.19.1),golang.org/x/crypto(v0.36.0 → v0.54.0),
andgolang.org/x/net(v0.38.0 → v0.57.0), which pulled in patched transitive dependencies
(go-billy,circl) as well. Verified against the full test suite, both build tag variants,
and the Docker-based SSH integration tests. This raises the minimum Go version to 1.25
(go-git v5.19.1's owngo.modrequires it) - CI, README, and CONTRIBUTING.md updated
accordingly.
Changed
- Test coverage:
cmd/datum, thegithandler, andinternal/runtimewere previously untested
(0%); all packages now have meaningful coverage (76-100%). errcheckre-enabled in the linter config (previously disabled project-wide).- Deduplicated the source-fallback loop shared by
Check/Fetchininternal/core/engine.go.
Datum v1.0.0 - Initial Public Release
Added
Core Features:
- Data pinning and verification system with cryptographic fingerprints
fetchcommand to download data and record fingerprintscheckcommand to verify data sources haven't changed- Lockfile system (
.data.lock.yaml) for tracking fingerprints and verification timestamps - Three policy modes:
fail(strict),update(auto-update), andlog(monitoring)
Data Source Handlers:
- HTTP/HTTPS handler with smart fingerprinting (ETag → Last-Modified+Content-Length → SHA256)
- File handler for copying local files
- Git handler (optional, requires
-tags git) for tracking specific files from repositories - Command handler for custom shell commands with template variable support
- Plugin-based handler architecture for extensibility
Multi-Source Support:
- Automatic fallback between multiple sources for high availability
- Sources tried in order until one succeeds
- Useful for mirrors, geographic redundancy, and offline development
Build and Platform Support:
- Go 1.23+ support
- Cross-platform support (Linux, macOS, Windows)
- Platform-specific shell handling (sh for Unix, cmd.exe for Windows)
- Optional git support via build tags to reduce binary size
- Build scripts for Unix (
make.sh) and Windows (make.ps1)
Developer Experience:
- JSON Schema (
data-schema.json) for IDE autocomplete and validation - Comprehensive documentation and examples
- Six working examples covering all handler types
- Educational code comments explaining Go concepts
CI/CD Integration:
- GitHub Actions workflow with test, build, lint, and examples jobs
- Testing on Ubuntu, macOS, and Windows with Go 1.23 and stable
- golangci-lint integration
- Code coverage tracking
Documentation:
- Comprehensive README with architecture explanations
- Comparison with other tools (DVC, pins, Pooch, Quilt, LakeFS, Pachyderm)
- Contributing guidelines (CONTRIBUTING.md)
- MIT License
- AI development acknowledgment
Technical Details
Package Structure:
cmd/datum/- CLI entry pointinternal/core/- Core business logic (config, engine, lock, hash)internal/handlers/- Pluggable handler implementationsinternal/registry/- Handler registration systeminternal/runtime/- Platform-specific code
Key Patterns:
- Interface-based handler system for polymorphism
- Init function registration for plugin architecture
- Context-based cancellation and timeout support
- Atomic file operations (temp file + rename)
- Error wrapping with
%wfor error chains
Security:
- SHA256 fingerprinting for data integrity
- Git authentication support (HTTPS tokens, SSH keys)
- No credential storage in configuration files