Commit Graph
2780 Commits
Author SHA1 Message Date
kevinveenbirkenbach efe2ea3357 **test: align deployment type tests with invokable-based semantics**
Update unit tests to reflect the new invokable-driven classification logic by mocking invokable path discovery, removing legacy alias expectations, and adding coverage for universal and mixed cases. Also relocate CLI deploy tests into the unit test hierarchy for consistency.
2026-02-10 21:38:02 +01:00
kevinveenbirkenbach 32fe49c00f feat(cli/deploy): retry docker compose up on transient registry errors
Wrap `docker compose up` in a retry loop (6 attempts, 30s delay) to mitigate
temporary Docker Hub / registry 5xx pull failures. Add unit tests covering
success-after-retries, exhaustion behavior, and no-sleep on first success.

https://chatgpt.com/share/698b8d67-0084-800f-ad33-ec8933dfba15
2026-02-10 20:56:11 +01:00
kevinveenbirkenbach 7a3c44b013 refactor(invokable): derive deployment types from invokable roles via DEFAULT_RULES
- Remove alias-based group name handling from get_deployment_types_from_groups
- Make DEFAULT_RULES the single source of truth for server/workstation/universal
- Determine "universal" strictly as invokable roles not matched by server/workstation
- Update unit tests to reflect invokable-based semantics

This aligns Ansible filters and CLI behavior and avoids inventory-specific heuristics.

https://chatgpt.com/share/698b8125-d2a0-800f-9fbd-f3f9c8bc5023
2026-02-10 20:04:00 +01:00
kevinveenbirkenbach 5acce545e1 refactor(cli): remove sound, alarm and server-type flags
Drop the sound/alarm subsystem and deprecated CLI flags.

* Remove --sound, --no-signal and --alarm-timeout
* Remove server-type flag (-T / TEST_DEPLOY_TYPE)
* Delete sound-related modules
* Simplify RunConfig and runner error handling
* Update help output, scripts and tests
* Remove optional audio extras from pyproject.toml

https://chatgpt.com/share/698b74f1-0c0c-800f-98c4-183697d6a2a0
2026-02-10 19:10:37 +01:00
kevinveenbirkenbach 449781fa73 fix(ci): make sufficient_storage JSON-safe and stabilize test matrix generation
Switch sufficient_storage CLI to support JSON output and update CI matrix
generation to use JSON-only pipelines, preventing roles from collapsing
into a single matrix entry.
2026-02-10 14:06:54 +01:00
kevinveenbirkenbach df9a23ceed feat(ci): unify invokable app discovery and add lifecycle filtering
- Move server/workstation/universal resolution into Python CLI
- Add optional --lifecycles filter to cli.meta.applications.type
- Gate invokable roles by galaxy_info.lifecycle in module_utils.invokable
- Replace legacy resolve-invokable-roles.sh with CLI-based implementation
- Apply global hard excludes consistently across all deploy types
- Fix SC2086 issues and make lifecycle argument handling shell-safe
- Extend unit tests to cover lifecycle forwarding and normalization

https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 11:50:09 +01:00
kevinveenbirkenbach 84782f3b22 refactor(invokable): centralize app discovery, add type grouping, and derive deploy stages from inventory groups
https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 10:53:53 +01:00
kevinveenbirkenbach fcb4353d63 refactor(sys-svc-compose): move compose pull retries to Ansible and simplify pull.py
- Remove internal retry logic, transient error heuristics, and backoff from pull.py
- Let Ansible handlers control retries (10x, 30s delay) for compose pull/build
- Simplify pull.py to single-attempt run_or_fail execution with locking preserved
- Drop redundant timeout CLI flags; rely on environment variables instead
- Keep intelligent --ignore-buildable detection via `docker compose pull --help`
- Update unit tests to reflect new deterministic behavior and remove retry tests

https://chatgpt.com/share/6989ce5a-7f40-800f-950a-e108d6f4c070
2026-02-09 13:08:46 +01:00
kevinveenbirkenbach 88c3bbb721 test: fix templating env lookup fallback and unify unittest.mock import usage
https://chatgpt.com/share/698992ef-215c-800f-a93e-5d8e75b81f23
2026-02-09 08:55:17 +01:00
kevinveenbirkenbach 4fe03975fc Merge remote-tracking branch 'origin/alert-autofix-168' into merge-autofix 2026-02-09 08:42:28 +01:00
kevinveenbirkenbach 7427711782 Merge remote-tracking branch 'origin/alert-autofix-211' into merge-autofix 2026-02-09 08:42:20 +01:00
kevinveenbirkenbach 80f457de9e Merge remote-tracking branch 'origin/alert-autofix-139' into merge-autofix 2026-02-09 08:42:06 +01:00
kevinveenbirkenbach ae967bb559 Merge branch 'alert-autofix-212' 2026-02-09 08:39:44 +01:00
kevinveenbirkenbach bc1afa108f Merge branch 'alert-autofix-224' 2026-02-09 08:25:08 +01:00
kevinveenbirkenbach 76064827de test(integration): remove mixed unittest imports to satisfy code scanning
Refactor integration test to avoid mixed `import` / `from import` usage
by importing TestCase, main, and patch explicitly.
This resolves Code Scanning alert #224 without suppressions.

https://chatgpt.com/share/69898baf-35b4-800f-9fb1-ca42cae438d3
2026-02-09 08:24:22 +01:00
kevinveenbirkenbach 6c6229708c fix(compose): retry on image config verification failures during pull
Treat "error pulling image configuration" and "image config verification failed"
as transient Docker pull errors so retries are attempted instead of failing
immediately. This improves robustness against registry/CDN glitches.

Also clarify retry log output and add unit coverage to prevent regressions.

https://chatgpt.com/share/698987eb-3d64-800f-a4b3-749b545f7370
2026-02-09 08:08:21 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI f1ba3ce329 Potential fix for code scanning alert no. 224: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:01:50 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 7bdc59a9f4 Potential fix for code scanning alert no. 212: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:01:09 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 26851bcfe1 Potential fix for code scanning alert no. 139: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:00:59 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 1f0e351f6e Potential fix for code scanning alert no. 211: Implicit string concatenation in a list
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:00:15 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI c84616fd50 Potential fix for code scanning alert no. 168: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 07:59:57 +01:00
kevinveenbirkenbach 4e5e8d2a7d Fix compose down behavior and harden templar rendering
- Restore full teardown semantics in Compose.down by delegating to down_stack
  (including volume removal and CI cleanup)
- Normalize templar render output to string to avoid None-related failures
- Clean up unused variable in templating fallback path
- Reorder test imports without changing behavior

https://chatgpt.com/share/69890935-4f1c-800f-8f2c-1b18a1df0ea5
2026-02-08 23:07:44 +01:00
kevinveenbirkenbach 50fc018f39 Merge branch 'alert-autofix-201' 2026-02-08 22:35:27 +01:00
kevinveenbirkenbach 5ffc0c8390 tests: fix domain_mapper unit tests to use explicit module references
- Call iter_app_domains and build_domain_index via module_utils.domain_mapper
- Avoid NameError caused by missing direct imports in test module
- Improve formatting consistency in assertions for readability

https://chatgpt.com/share/69890141-da40-800f-ab40-1b30ba15ac7c
2026-02-08 22:33:35 +01:00
kevinveenbirkenbach d4a41bc5d8 Merge branch 'alert-autofix-139' 2026-02-08 22:26:06 +01:00
kevinveenbirkenbach 7d8d024868 tests: fix missing mock import in inventory manager tests
Add missing `from unittest import mock` import to prevent NameError
in test_inventory_manager when using mock.patch().

https://chatgpt.com/share/6988ff29-8470-800f-97a5-2c3ad1a224b1
2026-02-08 22:24:47 +01:00
kevinveenbirkenbach 8db86e6e63 Merge branch 'alert-autofix-194' 2026-02-08 22:10:35 +01:00
kevinveenbirkenbach 5644ee9835 test(inventory): fix missing mock import and clean up integration test
- Import unittest.mock to fix F821 undefined name error
- Simplify test documentation and inline comments
- Remove redundant assertions while keeping semantic coverage
- Improve readability of inventory manager integration test

https://chatgpt.com/share/6988d352-a064-800f-8a2d-f836e2279305
2026-02-08 19:17:49 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI aa0d4c9c2c Potential fix for code scanning alert no. 138: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:36:54 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI b5ffea5034 Potential fix for code scanning alert no. 139: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:36:22 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI abe7512b75 Potential fix for code scanning alert no. 194: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:35:24 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI c3ccfff16c Potential fix for code scanning alert no. 201: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:32:48 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 96d98bf542 Potential fix for code scanning alert no. 214: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 09:50:55 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 9c15df9b6b Potential fix for code scanning alert no. 216: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 09:44:36 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI aff4d7679f Potential fix for code scanning alert no. 213: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 09:42:36 +01:00
kevinveenbirkenbach a55c99ef62 refactor(compose): replace docker lookup with container and unify compose paths
- Rename lookup plugin from `docker` to `container`
- Switch all lookups from `lookup('docker', ...)` to `lookup('container', ...)`
- Normalize compose file keys:
  - docker_compose → compose
  - docker_compose_override → compose_override
  - docker_compose_ca_override → compose_ca_override
- Centralize compose path resolution via docker_paths_utils
- Update compose_file_args to always derive paths from DIR_COMPOSITIONS
- Align all roles, templates, and vars with container/compose naming
- Update and rename unit tests accordingly

This prepares the codebase for engine-agnostic container backends
(e.g. Docker ↔ Podman) and removes legacy docker-specific assumptions.

https://chatgpt.com/share/6987a7cc-d374-800f-99ad-bb4c8f92c59e
2026-02-07 21:59:39 +01:00
kevinveenbirkenbach 64b0506947 refactor: replace raw docker usage with container wrapper across roles
Replace direct `docker` command usage, references, and documentation with
the `container` wrapper to ensure engine abstraction and future portability
(e.g. Docker → Podman).

This includes:
- Shell scripts, Ansible tasks, handlers, and Python helpers
- Documentation, comments, help texts, and meta descriptions
- Network, volume, system, and image operations
- Test expectations and comments

All runtime behavior remains unchanged while enforcing the repository-wide
rule to avoid raw Docker invocations.

https://chatgpt.com/share/698721c3-e270-800f-be7a-e4435fb54506
2026-02-07 12:57:26 +01:00
kevinveenbirkenbach 4adb4118d1 **test(integration): forbid raw docker CLI usage**
Enforce `container`/`compose` wrappers by scanning repo files for direct `docker …`, `docker compose …`, and `docker-compose …` command invocations (with allowlists + context matching) to keep engine switching (e.g., Docker ↔ Podman) cheap and centralized.

https://chatgpt.com/share/69871f14-9030-800f-996e-3e32d70c774d
2026-02-07 12:16:11 +01:00
kevinveenbirkenbach b78ab29218 Renamed config entry from docker to compose
https://chatgpt.com/share/69870f54-d708-800f-9870-e9ae5a4bff44
2026-02-07 11:09:36 +01:00
kevinveenbirkenbach 53e817fa22 refactor(compose): migrate from docker-compose.yml to compose.yml everywhere
- Rename all docker-compose.yml templates to compose.yml
- Update override and CA override filenames accordingly
- Adjust compose wrapper, lookup plugins, filters and path helpers
- Update roles, tasks, handlers and scripts to use compose CLI
- Rewrite documentation and admin guides to reference compose
- Update unit and integration tests to expect compose.yml
- Keep internal variable keys for backward compatibility where needed

https://chatgpt.com/share/69870272-b168-800f-84c3-6417398e441f
2026-02-07 10:14:21 +01:00
kevinveenbirkenbach 8447ddc10a feat(sys-svc-compose): support -f/--file and append to autodetected compose files
https://chatgpt.com/share/69869046-8f78-800f-bdb9-0bd7d644ce4a
2026-02-07 02:07:01 +01:00
kevinveenbirkenbach 86533cbd2e refactor(container): use compose wrapper from PATH and drop hardcoded binary paths
- Replace hardcoded /usr/local/bin/compose with `compose` everywhere
- Remove explicit wrapper existence checks (PATH resolution is authoritative)
- Align hard/soft repair scripts and cert deploy helper with wrapper usage
- Update unit tests and paths after renaming docker → container roles
- Keep compose invocation consistent across scripts and tests

https://chatgpt.com/share/6986772f-d780-800f-8362-b5b66c6f33f2
2026-02-07 00:19:53 +01:00
kevinveenbirkenbach 9fa9692d7d refactor(compose): replace docker compose calls with compose wrapper
- Switch all docker compose invocations to the compose wrapper
- Update comments, task names, and log messages accordingly
- Simplify handlers and tasks to rely on wrapper-managed flags and env files
- Align tests and documentation with compose-based workflow

https://chatgpt.com/share/69866ede-be2c-800f-94b0-bffcf8fed260
2026-02-06 23:44:39 +01:00
kevinveenbirkenbach e3a16cbe8a refactor: switch docker CLI usage to container wrapper
- Replace direct docker calls with container wrapper across scripts, roles, and templates
- Add support for cp, start, stop, and restart passthrough commands
- Align handlers and notifications to container manager restart semantics
- Fix systemd ExecStartPost to use container wrapper without hardcoded paths
- Silence ShellCheck SC2016 false positive for container exec password injection
- Update tests and documentation strings to reflect container-based workflow

https://chatgpt.com/share/69866958-c88c-800f-9b4f-3a972615bf42
2026-02-06 23:21:02 +01:00
kevinveenbirkenbach ba35d7c5e0 refactor(container): replace docker ps usages with container wrapper and move binaries to /usr/bin
https://chatgpt.com/share/698660b7-4c78-800f-b25f-af5408cff034
2026-02-06 22:44:14 +01:00
kevinveenbirkenbach fb43b44240 hlth-csp: run CSP checker containers as one-shot (--rm)
Add --rm to container run so CSP checker containers are removed
automatically after completion. This prevents exited one-shot containers
from being picked up by repair/health logic and avoids false recovery
attempts.

Unit tests were updated to reflect the new --rm behavior.

https://chatgpt.com/share/6986525a-4b48-800f-b310-bb8b231121ec
2026-02-06 21:50:29 +01:00
kevinveenbirkenbach 04255cb372 rpr-container-soft: ignore non-compose containers when repairing exited/unhealthy
Filter docker ps by com.docker.compose.project label in STRICT mode so that
one-shot docker run containers are ignored. This prevents false repair
attempts and label lookup errors for containers without compose metadata.

Unit tests were updated to reflect the new compose-only prefilter behavior.

https://chatgpt.com/share/6986525a-4b48-800f-b310-bb8b231121ec
2026-02-06 21:43:01 +01:00
kevinveenbirkenbach 10043ebacf sys-svc-container: make CA injection soft-fail and extend unit tests
- Switch CA handling to soft-fail with warnings instead of hard exits
- Fallback to plain `docker run` when CA env vars or files are missing
- Avoid failing on images without ENTRYPOINT (warn + fallback)
- Simplify entrypoint inspect recovery logic (direct pull + retry)
- Refactor container wrapper structure and comments
- Extend unit tests to cover CA soft-fail and docker run fallback paths

https://chatgpt.com/share/69864bf2-7830-800f-ae8a-dad17c4f6e13
2026-02-06 21:15:42 +01:00
kevinveenbirkenbach 92a4cc0eaf Replaced _global by global 2026-02-06 17:57:12 +01:00
kevinveenbirkenbach c2a5ee0e19 feat(lookup): add strict config lookup backed by applications variable
Introduce a `config` lookup plugin that exposes `get_app_conf` via Ansible
lookups, defaulting to strict mode and supporting an optional default value.

Add comprehensive unittest coverage validating strict behavior, defaults,
schema-defined but unset errors, index access, and argument validation.

https://chatgpt.com/share/6985f3f5-4660-800f-9e5d-2b518ccdff80
2026-02-06 15:00:13 +01:00