Commit Graph
9 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5 b192415a5b fix(decidim): take the ruby fragment path from its one source
patch.py located files/ruby/ relative to its own __file__. That holds in
the repo, where the script sits next to the fragments, but the image
copies the script to /tmp/patch.py and the fragments to /tmp/ruby/, so
parent.parent resolved to / and the build died with
FileNotFoundError: /ruby/omniauth_provider.rb on every retry.

DECIDIM_PATCH_RUBY_DOCKER already decides where the COPY puts the
fragments. Reading it in the script makes that variable the only place
the location is stated, so the layout can change without a second
place silently disagreeing. Missing variable raises instead of
guessing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:03:48 +02:00
kevinveenbirkenbachandClaude Opus 5 5137465c6f style: delete every comment the comments-valid policy rejects
3529 invalid comments in 528 files, grandfathered in while the linter
only saw the working-tree diff. Removal ran through the linter's own
collectors, so detection and deletion cannot drift: a comment whose
opener line is blank before it and whose closer line is blank after it
loses all its lines, anything else loses only the comment region, and a
line left holding a bare delimiter goes with it.

Five files keep their comments behind a nocheck marker instead. Four are
upstream configs whose inline docs are upstream's own (mautrix, systemd
journald, nextcloud-oidc-login, MediaWiki). In littlejs the
commented-out entries ARE the deactivation mechanism for an example
tile, so deleting them would delete configuration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 03:22:02 +02:00
kevinveenbirkenbachandClaude Opus 4.8 f17d68fae3 feat(web-app): SeaweedFS S3 object-store integration for 9 Tier A roles
Wire nine database-backed web-app roles to the shared SeaweedFS object store
via the engine-agnostic objstore lookup, following the existing consumer recipe
(declare the seaweedfs service, render the app S3 config from
lookup('objstore', application_id, ...), add the e2e test). Each app's S3
config keys were verified against the upstream docs/source, and all honor
SeaweedFS path-style addressing + the internal http endpoint:

- fider:     BLOB_STORAGE=s3 + BLOB_STORAGE_S3_*
- snipe-it:  split s3_private/s3_public disks, single bucket via BUCKET_ROOT, *_AWS_PATH_STYLE
- mobilizon: Uploader.S3 + ExAws (private)
- decidim:   ActiveStorage amazon service, force_path_style
- taiga:     django-storages, AWS_S3_ADDRESSING_STYLE=path
- shopware:  Flysystem amazon-s3 adapter, use_path_style_endpoint
- magento:   remote_storage driver aws-s3 + endpoint
- matrix:    s3_storage_provider module baked into the image + media_storage_providers
- gitlab:    consolidated object storage, single bucket split into per-type virtual buckets, path_style

Both object-store guards (test_database_requires_seaweedfs,
test_seaweedfs_consumer_playwright) pass; autoformat clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 15:29:55 +02:00
kevinveenbirkenbachandClaude Opus 4.7 4867ffe66c feat(web-app-decidim): OIDC registration via Playwright TOS form, extracted Ruby
Playwright drives Decidim's first-time OIDC registration (TOS + newsletter
modal) so the biber user is created on first login and reused idempotently
on subsequent runs. Ruby snippets previously inlined in tasks/01_setup.yml
and patch.py are now separate .rb files under files/ruby/, copied into the
image alongside patch.py. patch.py now also fixes Decidim 0.31.3's broken
omniauth_registrations_path view helper (both new.html.erb and
new_tos_fields.html.erb).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 02:10:04 +02:00
Prageeth Panicker dc4af35aca fix(web-app-decidim): use espocrm pattern for patch_decidim.py in Dockerfile
- Add copy task in tasks/main.yml to stage patch_decidim.py into build context
- Pass HOST_REL and DOCKER path as build ARGs via compose.yml.j2
- Use COPY + RUN in Dockerfile with no inline code
- patch_decidim.py remains single source of truth for unit tests
2026-04-20 16:45:38 +00:00
Prageeth Panicker 30a7e38c2b fix(web-app-decidim): remove nil fallbacks from ENV.fetch calls
All OIDC env vars (OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET)
must be present - fail fast with KeyError if missing rather than
silently passing nil to the provider
2026-04-20 04:45:30 +00:00
Prageeth Panicker 43c0c32bd7 fix(web-app-decidim): inline patch_decidim.py into Dockerfile
COPY fails in CI because sys-svc-compose only copies Dockerfile to the
compose directory, not additional files. Inline the patch script using
a heredoc so the build context only needs the Dockerfile itself.
The separate patch_decidim.py file is retained for unit testing.
2026-04-19 17:49:43 +00:00
Prageeth Panicker d25e14e73c fix(web-app-decidim): address reviewer feedback
- Extract inline Dockerfile Python script to files/patch_decidim.py (SRP)
- Add 7 unit tests in tests/test_patch_decidim.py covering all patch functions
- Make patch_secrets_yml idempotent (safe to run multiple times)
- Fix escape sequence warning in OMNIAUTH_INJECTION (raw string)
- Remove unnecessary regex from allowed_hosts.rb.j2 (exact domain match is sufficient)
- Rewrite README.md to follow platform documentation conventions
2026-04-19 13:11:34 +00:00
Prageeth Panicker 0a5ab9bddd fix(web-app-decidim): add OIDC SSO via custom image and fix Playwright tests
- Add custom Dockerfile to install omniauth_openid_connect gem and patch
  Decidim's OmniAuth initializer for OpenID Connect provider registration
- Patch secrets.yml to add openid_connect section to all environments
- Patch omniauth_helper.rb to return correct icon for openid_connect
- Fix redirect_uri to use APPLICATION_HOST env var for correct callback URL
- Fix SSL cert trust by relying on compose.ca.override.yml at runtime
- Add OIDC omniauth settings to organization (enabled + icon only, no
  encrypted credentials - credentials read from env vars at runtime)
- Add biber OIDC login/logout Playwright test and profile access test
- Add SSO button visibility test when OIDC is enabled
- Fix SSO button selector to use href-based locator
- Use form.evaluate() POST with CSRF token for data-method=post links
- Add OIDC_ENABLED to playwright.env.j2
- Add DECIDIM_CUSTOM_IMAGE var for custom built image
- Update compose.yml.j2 to build custom image with OIDC patches
2026-04-19 08:00:26 +00:00