Commit Graph
7329 Commits
Author SHA1 Message Date
evangelostsak c2ffe56a68 Add health check for Penpot API before Playwright tests to ensure backend readiness 2026-06-06 08:22:12 +02:00
evangelostsak d2ce6b00b7 Revert "Restore clear-on-success in Playwright to handle retries during test execution"
This reverts commit 5bcd969b23f69ed8e2e8cc0fd7b9051c243031e1.
2026-06-06 08:22:12 +02:00
evangelostsak 8beaa3e03c Restore clear-on-success in Playwright to handle retries during test execution 2026-06-06 08:22:12 +02:00
evangelostsak d2906a9f63 fix(web-app-penpot): clear Playwright failures on role success 2026-06-06 08:22:12 +02:00
evangelostsak 5e8f7e4f6a fix(test-e2e-playwright): remove clearing of failure state on success for retries 2026-06-06 08:22:12 +02:00
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
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.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.8 3bd5c12502 fix(web-app-friendica): reset follow state so admin-follow-biber test stays deterministic
The earlier idempotent guard latched onto a hidden duplicate of biber's handle (submitButton.or(handle).first() resolved to a hidden vcard-short-addr div), so the follow test still timed out on the async pass.

Reset the relationship before following instead: a single GET to /contact/unfollow?auto=1&url=<profile> unfollows biber when already followed and is a harmless redirect otherwise. The follow confirmation form is then always fresh, so every run exercises the real follow action (submit, 302 to /contact/<id>, biber's handle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:20:43 +02:00
kevinveenbirkenbachandClaude Opus 4.8 eca39f903d fix(web-app-friendica): make admin-follow-biber playwright test idempotent
The async deploy pass re-runs the suite against the same persistent instance, where biber is already a contact. /contact/follow then renders an "already added this contact" page without #dfrn-request-submit-button, so the test timed out 60s waiting for the submit button (only the sync pass passed).

Wait for the submit button or biber's identity handle, submit the confirmation only on the fresh-follow path, and assert biber's handle as the shared post-follow proof across both passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:20:43 +02:00
kevinveenbirkenbachandClaude Opus 4.8 bfed033544 fix(web-app-funkwhale): start api with gunicorn and bind port
The api service had no command, so the CA-trust entrypoint wrapper ran the image entrypoint with no argument and it crash-looped (parameter not set). Pass command: gunicorn and set FUNKWHALE_API_PORT so the entrypoint binds 0.0.0.0:5000, matching the compose port mapping.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 20:06:35 +02:00
kevinveenbirkenbachandClaude Opus 4.8 dac52a7c42 fix(web-app-friendica): strip trailing slash from base URL
lookup('tls', ...).url.base keeps a trailing slash, so Friendica generated double-slash profile URLs (host//profile/<nick>) that broke local-follow contact resolution (no confirmation form rendered). Strip it via a shared FRIENDICA_BASE_URL var reused by env.j2 and the local.config.php patch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 20:06:35 +02:00