Commit Graph
7 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 4.7 ea77949d7c fix(roles/pkgmgr/vars): pin lookup application_id to literal "pkgmgr" instead of role_name
PKGMGR_REPO_URL / PKGMGR_REF were defined with `lookup('config', role_name, …)`.
The vars are referenced via `vars:` in pkgmgr's own task that does
`include_role: name: sys-util-git-pull`, and Ansible templates that `vars:`
block inside the included-role context — so `role_name` was already
`sys-util-git-pull` at evaluation time, not `pkgmgr`.

That produced a config lookup against `applications['sys-util-git-pull'].services.sys-util-git-pull.repository`,
which fails because sys-util-git-pull's services.yml declares the entity as
`util-git-pull` (no `sys-` prefix, per the established sys-* convention) and
has no `repository` key.

Hardcoding the application_id keeps the lookup immune to role_name drift no
matter where the var is referenced from.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 21:05:26 +02:00
kevinveenbirkenbachandClaude Opus 4.7 fd22d34559 refactor(roles): declare every git URL in meta/services.yml + per-role REPOSITORY/REF vars
Co-locates every git-clone URL with its owning entity in the role's
`meta/services.yml` so the unified `image`/`version` ↔ `repository`/`ref`
naming convention covers secondary repos (plugins, build helpers,
bootstrap sources) just as cleanly as the primary entity source.

Migrations:
- sys-aur, pkgmgr (non-invokable bootstrap roles): `meta/services.yml`
  gains `repository:`/`ref:` on the role's own entity; `vars/main.yml`
  renders them via `lookup('config', role_name, …)` because these
  roles never set `application_id`.
- web-app-{akaunting,bigbluebutton,bluesky,discourse,roulette-wheel,
  taiga}: declare the secondary git URL on the most fitting entity
  (`akaunting` itself for the docker-helper repo; `view` for bluesky's
  social-app web client; `plugins.discourse-ldap-auth` for that
  Discourse plugin; `oidc` for taiga's OIDC plugin). Each role gains
  named `<ROLE>_REPOSITORY` / `<ROLE>_REF` constants in `vars/main.yml`
  so tasks and templates stay readable instead of inlining a
  `lookup('config', application_id, …)` string at every call site.
- svc-db-postgres `templates/Dockerfile.j2`: keep the `pgvector`
  extension clone but mark the line with `{# nocheck: repository-declared #}`
  since pgvector is an extension source, not the role's primary repo.

New integration test
`tests/integration/roles/meta/services/test_repository_declared_in_services.py`
walks every role's text files and fails if a literal `https://…/<…>.git`
URL is not declared as a `repository:` value somewhere in that role's
`meta/services.yml` (recursive — top-level entity, sub-entity, plugin
map). Legitimate exceptions opt out with `# nocheck: repository-declared`
on the same line or the preceding line; Jinja templates may use the
`{# … #}` form so a `\`-continued Dockerfile shell command stays valid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 20:12:07 +02:00
kevinveenbirkenbachandClaude Opus 4.7 951f6d36d2 chore(lint): unify autoformat/galaxy parallelism into one PARALLEL env var
* scripts/lint/autoformat.sh: rename AUTOFORMAT_PARALLEL to PARALLEL,
  declare it at file start with default `true`; still env-overridable.
  Reword the worker comment so the literal `# shellcheck` token no
  longer appears at start-of-line and trips SC1072/SC1073.
* scripts/lint/galaxy.sh: drop the GALAXY_FATAL / GALAXY_NAMESPACE /
  GALAXY_PARALLEL env vars (over-engineered for a single repo). Failure
  is always fatal. NAMESPACE is an internal constant. Add the same
  PARALLEL env var (default `true`, env-overridable); falsy demotes the
  xargs fan-out to one worker.
* docs/contributing/environment/variables.md: collapse the four
  AUTOFORMAT_*/GALAXY_* rows into one `PARALLEL` row covering both
  consumers.
* docs/contributing/tools/make.md: refer to `PARALLEL=0` everywhere;
  add the lint-galaxy parallelism note.

Plus working-tree drift across roles/, group_vars/, inventories/, and
tasks/ that accumulated from the make-test setup phase regenerating
generated artefacts during recent test runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 00:59:24 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 3dc2d54964 fix(pkgmgr): replace dynamic ssh-keyscan lookup with static GitHub host key
Replaces the fragile pipe lookup calling ssh-keyscan at runtime with a
static PKGMGR_GITHUB_HOST_KEY variable to avoid CI failures where TCP:22
to github.com may be blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 00:52:43 +02:00
kevinveenbirkenbach 396d5f5ba6 fix(pkgmgr): remove unused config.yaml generation and use explicit venv pkgmgr binary
- Drop config.yaml creation and related variable as it is no longer used
- Avoid PATH-related issues by calling pkgmgr via its venv binary
- Make pkgmgr path resolution deterministic in web-app roles

https://chatgpt.com/share/69484645-afcc-800f-8ef0-a7cbe2d9b52e
2025-12-21 20:10:55 +01:00
kevinveenbirkenbach 3a79d9d630 Optimized pkgmgr variables and removed 'Ensure main.py is executable' because it should be preset by repositories itself 2025-08-29 10:53:36 +02:00
kevinveenbirkenbach 2ca000795d Optimized portfolio and pkgmgr update procedures 2025-04-10 14:07:50 +02:00