Commit Graph
14682 Commits
Author SHA1 Message Date
evangelostsak 5da5730677 fix(test-e2e-playwright): remove reset of Playwright failure accumulator 2026-06-06 08:22:12 +02:00
evangelostsak 7168af76ff fix(web-app-penpot): use JVM_OPTS to point to custom truststore with CA cert 2026-06-06 08:22:12 +02:00
evangelostsak 09239316f3 fix(web-app-penpot): import CA cert into JVM default cacerts so OIDC TLS works 2026-06-06 08:22:12 +02:00
evangelostsak 29266c19d8 fix(test-e2e-playwright): clear failure state on success to handle retries 2026-06-06 08:22:12 +02:00
evangelostsak 72b55eabd7 fix(test-e2e-playwright): reset failure list before role loop 2026-06-06 08:22:12 +02:00
evangelostsak f2f5f6276f fix(web-app-penpot): render PENPOT_SMTP_TLS as lowercase boolean 2026-06-06 08:22:12 +02:00
evangelostsak f36387a0b6 fix(web-app-penpot): remove environment passthrough that overrides env_file values
Backend/exporter/frontend services were listing environment variables
without values (e.g. - PENPOT_DATABASE_PASSWORD) which causes Docker
Compose to pass through from host environment. Since these aren't set
on the host, they become null and override the env_file values.

Fixed by removing environment sections - env_file already contains all
needed variables with correct values.
2026-06-06 08:22:12 +02:00
evangelostsak f1cf4a227a fix(web-app-penpot): use proper YAML multiline format for backend command
Changed from single-line array format to multiline YAML block style
for better readability and to avoid potential parsing issues with
complex shell commands containing comments and special characters.

The container-based SSL certificate import approach is correct since
keytool only exists inside the Java container, not on the host.
2026-06-06 08:22:11 +02:00
evangelostsak 751fc7225c fix(web-app-penpot): remove backend healthcheck, let Playwright handle readiness
- Removed backend healthcheck that was blocking stack startup
- Backend depends_on redis (healthy), frontend waits for backend (started)
- Playwright test.beforeAll() already polls backend API for up to 16 minutes
- This matches pattern from commit 332ef7833 (other roles without healthchecks)
- Avoids Docker Compose blocking on backend health determination
- Simpler, more reliable: let application-level tests handle readiness
2026-06-06 08:22:11 +02:00
evangelostsak 1784a6fef8 fix(web-app-penpot): use bash TCP socket for healthcheck instead of wget/curl
- Changed from wget/curl (not available in penpotapp/backend image) to bash TCP socket
- Uses: exec 3<>/dev/tcp/localhost/6060 with HTTP GET request
- Pure bash built-in, guaranteed to work since backend command uses /bin/bash
- Matches pattern used by other roles (e.g., sys-svc-container/templates/healthcheck/tcp.yml.j2)
2026-06-06 08:22:11 +02:00
evangelostsak a35ce714dd fix(web-app-penpot): use robust healthcheck with wget/curl fallback and longer start period
- Change healthcheck to try wget first, then curl as fallback (more compatible)
- Increase start_period from 120s to 300s (5 minutes) for Java backend startup
- Backend needs time for: SSL cert import, DB migrations, JVM warmup
- Total healthcheck timeout: 5min start + (10 retries * 30s interval) = ~10min max
2026-06-06 08:22:11 +02:00
evangelostsak d06d632440 fix(web-app-penpot): add backend healthcheck and fix service dependencies
- Add healthcheck to backend service (curl http://localhost:6060/)
  * interval: 30s, timeout: 10s, retries: 10, start_period: 120s
  * This ensures backend is truly ready before tests run
- Update depends_on to use health conditions instead of just service_started
  * frontend waits for backend to be healthy
  * backend and exporter wait for redis to be healthy
- Add unsafe-eval to script-src-elem and script-src-attr in CSP config
  * Ensures CSP2 fallback merge includes unsafe-eval for Penpot's eval() usage

Fixes #204 - Resolves 502 Bad Gateway errors during Playwright tests by ensuring proper container startup ordering
2026-06-06 08:22:11 +02:00
evangelostsak 9d41d0472b fix(web-app-penpot): increase beforeAll timeout to 16 minutes
The test.beforeAll() hook polls backend API for up to 15 minutes to wait
for Java backend startup. However, Playwright's default beforeAll timeout
is only 5 minutes (300s), causing 'beforeAll hook timeout exceeded' error.

Add test.setTimeout(960000) at start of beforeAll hook to set 16-minute
timeout (15min wait + 1min buffer), allowing sufficient time for backend
readiness check to complete in CI environment.

Fixes CI run 25076502349 failure where CSP test failed with:
'beforeAll hook timeout of 300000ms exceeded'

Ref: #204
2026-06-06 08:22:11 +02:00
evangelostsak ee9ddb7d15 fix(tests): add missing SYSTEM_EMAIL_DOMAIN and fix test failures
- Define SYSTEM_EMAIL_DOMAIN variable (defaults to DOMAIN_PRIMARY)
- Add missing __init__.py in tests/integration/application_id/
- Add default_users and defaults_applications to ignored test keys
- All 165 tests now pass
2026-06-06 08:22:11 +02:00
evangelostsak 88c942d65b fix(web-app-penpot): add backend readiness check in Playwright tests
- Backend startup can take 10-15 minutes (Java, SSL certs, DB migrations)
- Without wait, tests hit Bad Gateway error from frontend
- Poll /api/rpc/command/get-profile endpoint before tests run
- Accept 200/401/403 status codes (all mean backend is responding)
- 15-minute timeout with 5-second retry interval
- Replaces Ansible uri_retry with Playwright-based wait
2026-06-06 08:22:11 +02:00
evangelostsak 347611b20f fix(web-app-penpot): wait for login container instead of body
Penpot frontend briefly shows black screen during JavaScript initialization.
Wait for actual login UI elements (main_ui_auth_login, auth, login classes)
instead of just body element to ensure frontend fully loaded before tests.

Increases timeout to 120s to handle slow CI initialization.
2026-06-06 08:22:11 +02:00
evangelostsak 3a9c4efb68 fix(web-app-penpot): remove uri_retry waits - let Playwright handle timing
Removed both frontend and backend uri_retry waits from main.yml.
Penpot has no post-deploy Ansible configuration tasks, so these waits
serve no purpose and cause CI failures (502 Bad Gateway after 15min).

Pattern analysis of 10+ other roles shows uri_retry is only used when
post-deploy Ansible tasks need to configure the application (e.g., Gitea,
Odoo). Roles without such tasks (Taiga, Discourse, Matrix, Mattermost, etc.)
have no waits and rely on Playwright's generous built-in timeouts (60-120s).

Local test results: 4/4 Playwright tests passed in 1.3m
- CSP test: 3.7s
- Admin OIDC login/logout: 29.4s
- Biber OIDC login/logout: 18.8s
- Project creation: 24.0s

Fixes CI deployment timeout that occurred in runs 25045210187,
25053926236, and 25060875762 where backend API check failed with
502 after 181 retries (15 minutes).
2026-06-06 08:22:11 +02:00
evangelostsak d073a82a21 Replace fixed pause with active backend API polling
After analyzing CI runs 25045210187 and 25053926236:
- Even with 180s pause, SPA still showing loading screen (3 img tags)
- Frontend HTTP 200 doesn't guarantee backend is ready
- CI artifacts show backend takes longer to initialize

Solution: Actively poll backend API endpoint until it responds.
Using /api/main/methods/get-profile with uri_retry, accepting
200/401/403 status codes (auth errors mean API is up).

Max wait: 180 retries × 5s = 15 minutes
2026-06-06 08:22:11 +02:00
evangelostsak daf1f443bd Increase SPA initialization pause from 90s to 180s for CI
After analyzing CI artifacts from run 25045210187:
- Admin test: SPA still showing loading screen (3 img tags)
- Biber test: SPA loaded but backend returned Bad Gateway

90s was insufficient for both SPA initialization and backend
readiness in CI's resource-constrained environment. Increasing to
180s to provide adequate buffer for full stack initialization.
2026-06-06 08:22:11 +02:00
evangelostsak 9b264bb981 feat(web-app-penpot): customize SSO button text and add SPA initialization pause
Changes:
1. SSO Button Customization:
   - Set PENPOT_OIDC_NAME to 'SSO with Infinito.nexus' (replaces 'OpenID')
   - Pass variable to frontend and backend containers
   - Update Playwright tests to recognize new button text

2. SPA Initialization Fix:
   - Add 90s pause after frontend HTTP check passes
   - Root cause: Nginx responds immediately but Penpot SPA needs time to:
     * Load JavaScript bundles
     * Initialize ClojureScript/React app
     * Render OIDC login button
   - CI error: 'No OIDC login button found' - button not rendered yet
   - Tests were starting before SPA fully initialized
   - Solution: Give CI environment time for resource-constrained initialization

Verified:
- Local deployment: 17 minutes
- All 4 Playwright tests passing (1.1m)
2026-06-06 08:22:11 +02:00
evangelostsak 4912aa79e7 fix(web-app-penpot): add 90s pause for SPA initialization
Root cause: Frontend HTTP 200 != JavaScript app ready
- Nginx responds immediately but Penpot SPA needs time to:
  * Load JavaScript bundles
  * Initialize ClojureScript/React app
  * Render OIDC login button
- CI error: 'No OIDC login button found' - button not rendered yet
- Tests were starting before SPA fully initialized

Solution: Add 90s pause after frontend HTTP check passes
- Gives CI environment time for resource-constrained initialization
- Addresses actual failure: button missing, not container readiness
2026-06-06 08:22:11 +02:00
evangelostsak 66ad32b835 fix(web-app-penpot): use docker exec to check backend health (port not published to host) 2026-06-06 08:22:11 +02:00
evangelostsak a8c82a6649 fix(web-app-penpot): add lifecycle: beta to enable CI discovery 2026-06-06 08:22:11 +02:00
evangelostsak dd8e861e63 fix(web-app-penpot): remove unused variables PENPOT_CONFIG_DIRECTORY, PENPOT_INSTANCE_DIRECTORY, PENPOT_DATABASE_VOLUME 2026-06-06 08:22:11 +02:00
evangelostsak e5d533d230 fix(README): update maintainer information and website link 2026-06-06 08:22:11 +02:00
evangelostsak 87a3ca6cf3 feat(penpot): add main.yml for Penpot configuration including OIDC, LDAP, and Docker settings 2026-06-06 08:22:11 +02:00
evangelostsak 788a9d0c7a feat(penpot): add administrator user configuration in main.yml 2026-06-06 08:22:11 +02:00
evangelostsak 9df5913b36 feat(penpot): add playwright.env.j2 template for Playwright configuration 2026-06-06 08:22:11 +02:00
evangelostsak 696bf2eec7 feat(penpot): add env.j2 template for Penpot configuration including OIDC and LDAP settings 2026-06-06 08:22:11 +02:00
evangelostsak f09f081876 feat(penpot): add Docker Compose configuration for frontend, backend, exporter, and Redis services 2026-06-06 08:22:10 +02:00
evangelostsak 7ef199a89c feat(penpot): add main.yml for web-app-penpot tasks and deployment 2026-06-06 08:22:10 +02:00
evangelostsak d35852f8be feat(penpot): add main.yml for Penpot deployment metadata 2026-06-06 08:22:10 +02:00
evangelostsak ed2918cadf feat(penpot): add Playwright tests for OIDC login, logout, and project creation 2026-06-06 08:22:10 +02:00
evangelostsak 902f1aba2a feat(penpot): add custom JavaScript file for Penpot frontend integration 2026-06-06 08:22:10 +02:00
evangelostsak 561deda310 feat(penpot): add main configuration file for web-app-penpot services 2026-06-06 08:22:10 +02:00
evangelostsak 71921a6fb6 feat(penpot): add README documentation for Penpot deployment and features 2026-06-06 08:22:10 +02:00
evangelostsak 07344e2ca7 feat(penpot): add setup documentation for Penpot integration in Infinito.Nexus 2026-06-06 08:22:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 a23100c4c5 fix(web-app-matrix): cascade host network mode to addons + jitsi
Static analysis of MDAD's group_vars/matrix_servers shows that every
bridge (heisenbridge, hookshot, appservice-*, mautrix-*), element-call,
livekit-server, livekit-jwt-service, alertmanager-receiver and the
mautrix-bluesky/discord/signal/slack/googlechat/kakaotalk roles inherit
matrix_addons_container_network (default 'matrix-addons') — not
matrix_homeserver_container_network. Pinning only the homeserver
network to host therefore left all the addons stranded on an inner
bridge with no path to the outer postgres/openldap networks.

Set matrix_addons_container_network: host so the entire bridges/RTC
stack cascades to host networking and inherits matrix-mdad's outer
network attachments.

Jitsi's four components don't inherit either base — pin each
explicitly: jitsi_web/jvb/prosody/jicofo _container_network: host.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 04:11:24 +02:00
kevinveenbirkenbachandClaude Opus 4.7 22bf806073 fix(web-app-matrix): rename matrix_coturn_* to coturn_* for MASH role
MDAD upstream moved matrix-coturn to the MASH organisation
(https://github.com/mother-of-all-self-hosting/ansible-role-coturn)
and renamed every variable from the matrix_coturn_* prefix to coturn_*.
CI failed with:

  msg: The matrix-coturn role in the playbook now lives under the MASH
  organization. Please rename matrix_coturn_* -> coturn_* on your
  configuration file (vars.yml). The following variables in your
  configuration need to be renamed: matrix_coturn_docker_network,
  matrix_coturn_enabled

Rename the two we set:
- matrix_coturn_docker_network -> coturn_container_network
- matrix_coturn_enabled -> coturn_enabled

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 04:04:56 +02:00
kevinveenbirkenbach 3b8c3a246f Change Scorecard cron schedule to daily 2026-06-06 03:21:59 +02:00
kevinveenbirkenbach 577b5fb5c8 Merge pull request #301 from infinito-nexus/update/docker-image-versions-20260606-36b8e5f
update(images): update Docker image versions
2026-06-06 02:24:07 +02:00
infinito-nexus-updater[bot] aa66daadb1 update(images): update Docker image versions 2026-06-06 00:21:17 +00:00
kevinveenbirkenbach 3c73d7c825 Merge pull request #299 from infinito-nexus/update/docker-image-versions-20260604-eed85fc
update(images): update Docker image versions
2026-06-06 02:20:59 +02:00
kevinveenbirkenbachandClaude Opus 4.7 a3c75bde74 fix(ci): load default.yml inventory vars in swarm deploy step
The swarm CI deploy invoked cli.administration.deploy.swarm with only
swarm.yml and the runtime extras as -e files. Default-inventory vars
(OIDC.CLIENT.SECRET, users, design, ...) were applied only to
host_vars/<MGR>.yml via the provision step's --vars-file argument, so
they reached mgr-01 but not the workers. Workers without OIDC.CLIENT
defaults rendered roles/web-app-keycloak/templates/import/clients/default.json.j2
into "object of type 'dict' has no attribute 'SECRET'" at the realm
import step (CI run 27044129926).

Load default.yml as inventory-wide extra-vars before swarm.yml, so the
two are merged uniformly across mgr-01 and workers. swarm.yml still
overrides any keys it sets (extra-vars merge left-to-right, last wins).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 01:53:43 +02:00
kevinveenbirkenbachandClaude Opus 4.7 09d46c2782 fix(conf_template): seed templar.available_variables before rendering
CI run 27044129926 failed every nginx-templating job with
"The value '{{ IS_STACK_HOST | default(false) | bool }}' is not a
valid boolean". Action plugins must explicitly expose task_vars to
their templar before calling template(); without it the renderer has
no variable scope and returns the Jinja string verbatim, which
_to_bool then rejects.

Sets self._templar.available_variables = task_vars in run(), matching
the standard pattern for action plugins that template against play
vars. Adds a unit test that holds the FakeTemplar's available_variables
mirror in place so any future regression that drops the seed call
fails the suite.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 01:35:55 +02:00
kevinveenbirkenbachandClaude Opus 4.7 251ce17c23 feat(web-app-matrix): central coturn + DiD-host-network via MDAD fork
Switch the ansible flavor over to a forked
github.com/kevinveenbirkenbach/matrix-docker-ansible-deploy that
supports container_network='host'. Inside the matrix-mdad DiD
container, every homeserver-stack service (synapse, element, coturn)
runs with --network=host so it shares matrix-mdad's network
namespace, which is attached to the outer compose's `postgres` and
`openldap` networks. Synapse/bridges therefore resolve `database`,
`openldap` via outer Docker DNS — no inner postgres or LDAP needed.

meta/services.yml:
- upstream.repo -> the fork; ref kept at `master` (the host-network
  patches live there). The pinned-commit story comes once the fork
  push lands.
- postgres.enabled stays `true` (matrix always needs a DB); postgres.shared
  becomes `'svc-db-postgres' in group_names` again — central when the
  DB role is up, dedicated per-app when it isn't. Both paths reach
  matrix-mdad's NS via the outer Docker daemon's DNS now that we run
  Synapse on --network=host.
- coturn becomes a first-class shared-service toggle: enabled+shared
  follow `'web-svc-coturn' in group_names`. When the central role is
  present, MDAD's bundled coturn stays off and Synapse's TURN URIs
  point at the central coturn (`turn:HOST:STUN_PORT` + tls variant)
  with the shared static_auth_secret pulled from web-svc-coturn
  credentials.

meta/variants.yml:
- V1 (ansible all-on): postgres.shared=true, coturn.shared=true.
- V2 (ansible no-auth): postgres.shared=false (dedicated path),
  coturn off — exercises both polarities for the variant-coverage
  lint and the dedicated DB code path.
- V3 (compose all-on): postgres.shared=true, coturn.shared=true.

vars/main.yml:
- MATRIX_COTURN_SHARED + MATRIX_COTURN_{HOST,STUN_TURN_PORT,STUN_TURN_TLS_PORT,AUTH_SECRET}
  lookups (gated on shared so dedicated runs don't try to read
  credentials that are not in scope).

templates/flavor/ansible/vars.yml.j2:
- matrix_homeserver_container_network / matrix_synapse_container_network
  / matrix_client_element_container_network / matrix_coturn_docker_network
  all pinned to `host`. Hits the fork's `when: var not in ['', 'host']`
  task guards (no 403 on docker_network create) and the
  `{% if var not in ['', 'host'] %}` systemd-template guards (no
  ExecStartPre=docker network connect against an additional bridge,
  which is invalid on host networking).
- When central coturn is shared: matrix_coturn_enabled=false +
  matrix_synapse_turn_uris (udp/tcp + turns udp/tcp) +
  matrix_synapse_turn_shared_secret wired to MATRIX_COTURN_AUTH_SECRET.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 01:24:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 d4925c8fe1 style(conf_template): re-stage ruff autoformat line wraps
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 00:48:27 +02:00
kevinveenbirkenbachandClaude Opus 4.7 2921ab6f03 feat(ansible): conf_template action plugin enforces IS_STACK_HOST gate
Adds plugins/action/conf_template.py, a drop-in `template:` replacement
that returns `skipped: true` whenever IS_STACK_HOST evaluates to false.
Routes the rendered Jinja through ansible.module_utils.parsing.convert_bool
so both Python bool and string "True"/"False" templar outputs resolve
correctly. Inherits every standard template module argument.

Migrates seven nginx-tree consumers that previously aborted on workers
with "Destination directory does not exist": sys-front-tls,
svc-db-openldap, sys-svc-webserver-core (nginx.conf + default_server.conf),
web-app-matrix (synapse vhost), web-app-peertube (per-domain vhost),
web-opt-rdr-domains (redirect vhost), and web-app-prometheus.

Tags twelve legitimate bare `template:` callers with
`# nocheck: conf-template`: per-host system configs (locale, nix, systemd
manager defaults, journald, msmtprc) and per-app compose-dir configs
(magento x2, mailu x2, moodle, odoo, taiga) that intentionally bypass the
project's nginx tree.

Adds tests/lint/ansible/modules/test_conf_template_migration.py as the
drift guard: any future `template:` task whose `src:` ends in `.conf.j2`
must adopt conf_template or carry the nocheck marker. Adds seven unit
tests for the plugin covering skip semantics, dispatch, mode defaults,
mode overrides, full-arg passthrough, and the string-bool templar path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 22:25:13 +02:00
kevinveenbirkenbachandClaude Opus 4.8 ff4125f622 fix(web-app-erpnext): clear Frappe cache after applying social-login/LDAP/email config
On Frappe v16 the /login page is served from cache, so enabling the Keycloak Social Login Key without invalidating the cache leaves the OIDC button missing; the Playwright OIDC login tests then fall back to the login_via_keycloak callback and hit a 500 (run 27029748629, web-app-erpnext variant-0/sync).

apply_api_bot.py already calls frappe.clear_cache() after commit. Mirror it in the OIDC, LDAP and email apply scripts so every committed config change refreshes cached state (LDAP/email are preventive: same auth/config cache class).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:36:46 +02:00
kevinveenbirkenbachandClaude Opus 4.7 34520de573 fix(test-swarm): drop hardcoded dev inventory path from docstring
The inventory-vars-file SPOT drift guard
(tests/unit/cli/administration/deploy/development/test_inventory_vars_file_spot.py)
flagged the literal "inventories/development/default.yml" in the
docstring as a missed SPOT migration. Refer to "the development
inventory" in prose instead — the env var name (INFINITO_DOMAIN) is the
contract; the consuming file's path is not.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 21:06:16 +02:00