- Always enable OpenTelemetry instrumentation, use OTEL_EXPORT_ENABLED for data export control
- Remove conditional checks from middleware, metrics, and decorators
- Simplify CI configuration to use single test job instead of parallel jobs
- Update tests to remove conditional logic and mocking of is_enabled()
- Add comprehensive environment variable documentation to README
- Update config.py to always add OpenTelemetry middleware
- Replace ENABLE_OPENTELEMETRY/OTEL_ENABLED with OTEL_EXPORT_ENABLED
This approach is much simpler and eliminates the complexity of conditional
OpenTelemetry loading while still allowing control over data export.
- Remove explicit TEST.NAME configuration that was causing conflicts
- Let Django use its default test database naming convention
- Prevents 'database already exists' errors in CI
- Django will now create test databases with names like 'test_django_db_with_otel'
- Fix test to use SimpleUploadedFile instead of raw file object
- Change form.save() from static to instance method to access stored file data
- Fix file data handling in form save method to use sanitized/stored data
- Remove debug logging after successful resolution
- All upload tests now pass with full security validation enabled
The issue was that Django's InMemoryUploadedFile objects can only be read once,
so calling data.read() in the save method returned empty bytes after the
form validation had already read the file. The fix ensures we use the
stored file data from the form validation instead of trying to re-read
the file object.
- Add ENABLE_FILE_SECURITY_VALIDATION setting to config.py
- Make security validation conditional in forms.py
- Add debug logging to Photo.save() and form save methods
- Temporarily disable security validation to isolate test issues
- Confirm issue is not with security validation but with test file handling
The test failures are caused by improper file object handling in tests,
not by our security validation implementation.
This adds support for authenticating with Fedora's OpenID Connect (OIDC) provider.
Existing users will be matched by email address, they should be able to use the new authentication method transparently.
This requires getting a `client_id` and a `client_secret` from Fedora Infra, see `INSTALL.md`.
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
- Slight reformatting in some parts; Non-functional changes
- ugettext(_lazy) no longer available in Django > 4, changing to
gettext(_lazy)
- Since django-openid-auth doesn't work with Django > 4 yet, we need to
pin this project to Django < 4 until that issue is solved