feat: support config.d directory for split configuration (closes #20) #26

Merged
unkinben merged 2 commits from benvin/issue-20-config-dir-split into master 2026-04-28 23:39:56 +10:00
Owner

Closes #20

Summary

  • CONFIG_PATH now accepts a directory path: all *.yaml/*.yml files in it are loaded and merged alphabetically; later files win on remotes key conflicts
  • CONFIG_PATH can still point to a single file (backwards-compatible); that file may now include a config_dir: key (absolute or relative) pointing to a drop-in directory whose files are merged on top
  • Hot-reload (_check_reload) tracks mtimes of all participating files in both modes
  • 11 new tests covering directory mode, config_dir key, overrides, reload, and relative paths

Test plan

  • All 219 tests pass (make test)
  • Wheel builds cleanly (uv build --wheel)
  • Directory mode: multiple files merged, non-YAML ignored, reload picks up new file
  • config_dir mode: relative path resolved, dir overrides main file, empty dir uses main only
Closes #20 ## Summary - `CONFIG_PATH` now accepts a **directory path**: all `*.yaml`/`*.yml` files in it are loaded and merged alphabetically; later files win on `remotes` key conflicts - `CONFIG_PATH` can still point to a **single file** (backwards-compatible); that file may now include a `config_dir:` key (absolute or relative) pointing to a drop-in directory whose files are merged on top - Hot-reload (`_check_reload`) tracks mtimes of all participating files in both modes - 11 new tests covering directory mode, config_dir key, overrides, reload, and relative paths ## Test plan - [x] All 219 tests pass (`make test`) - [x] Wheel builds cleanly (`uv build --wheel`) - [x] Directory mode: multiple files merged, non-YAML ignored, reload picks up new file - [x] config_dir mode: relative path resolved, dir overrides main file, empty dir uses main only
unkinben added 1 commit 2026-04-28 23:21:17 +10:00
feat: support config.d directory for split configuration (closes #20)
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
64266f40e9
CONFIG_PATH now accepts a directory path (all *.yaml files merged) or a
main file with a config_dir key pointing to a drop-in directory. Remotes
are merged alphabetically across files; later files win on conflicts.
unkinben added 1 commit 2026-04-28 23:29:44 +10:00
chore: add conf.d example split-config files
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
3f098df428
Three example files (alpine, github, pypi) demonstrating per-remote
YAML files for the conf.d directory mode.
unkinben merged commit cae3503ac4 into master 2026-04-28 23:39:56 +10:00
unkinben deleted branch benvin/issue-20-config-dir-split 2026-04-28 23:39:57 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#26