Feat/setup#1
Merged
Merged
Conversation
- Register Image + ImageTask in admin with inline task view - create_test_users: idempotent, test1/test2 accounts - generate_placeholders: 3 sizes via Pillow default font (cross-platform) - createbucket: create MinIO bucket on first run
Wire Django auto-instrumentation in AppConfig.ready() gated on OTEL_SDK_DISABLED env var. Add manual spans to generate_thumbnail with task/image attributes, and child spans for MinIO upload/download. Celery context propagation and BotocoreInstrumentor deferred to 4.6-4.7.
- Rewrite test_image_upload management command to use native Python (Django ORM, model methods, Celery task) instead of curl subprocesses - Fix urllib presigned URL PUT by overriding default Content-Type header - Fix img.format capture before thumbnail() call to prevent None format Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Bootstrap 5 templates: base, login, gallery, upload - Add HTML views: gallery, upload, login/logout, image delete - Add LoginForm and UploadForm - Prefill test1 credentials on login page for demo - Extract Image.upload_original() and Image.delete_from_storage() model methods - Extract ImageTask.create_and_dispatch() classmethod - Replace string literals with HTTPMethod/ImageStatus enums throughout views - Rewire urls.py: API prefix moved into images/urls.py, HTML routes added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add API tests: auth, image CRUD, task create/status/cancel, cross-user isolation - Add task tests: success path, invalid image, S3 error, thumbnail key/size - Add test factories with Faker for realistic data, USER_PLAIN_PASSWORD constant - Add tests/utils.py with shared make_image_buf helper - Fix /api/images/ GET+POST route collision by merging into single view - Fix CELERY_TASK_ALWAYS_EAGER None task ID violating NOT NULL constraint - Fix tasks.py img.format capture before thumbnail() call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dockerfile + docker-compose web/worker services for full stack - smoke_test_image_upload.sh end-to-end test - presigned URLs use MINIO_PUBLIC_ENDPOINT_URL with S3v4 signature - Makefile sectioned with help target Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove _traced decorator; rely on BotocoreInstrumentor auto-spans - Fix circular import between models.py and utils.py via TYPE_CHECKING - Inline parse_json_body; remove @csrf_exempt from session-auth API views - Split docker-compose into infra/app profiles; add up-infra/up-app/logs-* make targets - Rename createbucket → create_bucket; refactor create_test_users with NamedTuple - Add docs/OBSERVABILITY.md; rewrite README to project overview - Add pyrightconfig.json and .dockerignore
- Extract TestValidateImageBuffer/TestCreateThumbnailBuffer into
test_task_utils.py (no django_db mark, xdist-parallelisable)
- Add pytest-xdist; set `-n auto` in pyproject.toml addopts
- Fix UserFactory deprecation: explicit post_generation save +
skip_postgeneration_save = True
Move Django app and project package out of the django_thumbnail/ subdirectory so manage.py, images/, and django_thumbnail/ sit at repo root. Avoids the extra path nesting with no functional benefit. - Replace Dockerfile with Dockerfile.dev that installs deps into /venv (not /app/.venv) so volume-mounting . at /app does not clobber the virtualenv - Update docker-compose to use Dockerfile.dev and mount . at /app - Drop working-directory override from CI (tests now run from root) - Update pyproject.toml pythonpath from ["django_thumbnail"] to ["."] - Use uv run python3 in smoke test via shell function alias Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two separate clients for internal ops (download/upload/delete) and public presign URLs — each with its own endpoint and config. Eliminates per-call client construction and clarifies intent at call sites.
Celery prefork workers don't inherit the BatchSpanProcessor exporter thread after fork, so spans never reached Jaeger. Split setup into: - setup_otel_for_django_web() called from manage.py - setup_otel_for_celery_worker() called from worker_process_init signal generate_thumbnail now uses the CeleryInstrumentor-created span and force_flushes the provider so spans export before the worker idles. Also: add smoke-test CI workflow, trim Makefile, drop main.py and the shell smoke-test script. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.