Skip to content

Implement public report endpoint with models and rate limiting#6

Open
Batirro wants to merge 11 commits intomainfrom
feat/public-report-api
Open

Implement public report endpoint with models and rate limiting#6
Batirro wants to merge 11 commits intomainfrom
feat/public-report-api

Conversation

@Batirro
Copy link
Copy Markdown
Member

@Batirro Batirro commented Mar 31, 2026

Pull request overview

Adds a new reports Django app that exposes a public, rate-limited endpoint for submitting bug reports (issues) with optional attachments, and persists them in the database for later moderation/integration work.

Changes:

  • Introduces Application, Issue, and IssueAttachment models (+ initial migration) and registers them in Django admin.
  • Implements POST /report/<uuid:app_id> public API endpoint with DRF serializer validation, atomic DB writes, and anonymous throttling.
  • Adds APITestCase coverage for happy-path creation, validation errors, and throttling behavior; wires app + URLs + DRF settings into the project.

Batirro added 7 commits March 28, 2026 17:15
- Add 5MB size limit to base64 attachments to prevent OOM OOM errors
- Wrap report and attachments creation in database transaction
  (`transaction.atomic`)
- Register Application, Issue, and IssueAttachment models in Django
  Admin
- Add comprehensive E2E tests for PublicReportCreateView
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new reports Django app that exposes a public, rate-limited endpoint for submitting bug reports (issues) with optional attachments, and persists them in the database for later moderation/integration work.

Changes:

  • Introduces Application, Issue, and IssueAttachment models (+ initial migration) and registers them in Django admin.
  • Implements POST /report/<uuid:app_id> public API endpoint with DRF serializer validation, atomic DB writes, and anonymous throttling.
  • Adds APITestCase coverage for happy-path creation, validation errors, and throttling behavior; wires app + URLs + DRF settings into the project.

Reviewed changes

Copilot reviewed 10 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
reports/views.py Adds the public report creation API view and custom throttle classes.
reports/urls.py Routes the public report creation endpoint.
reports/serializers.py Adds request validation for reports and attachment inputs (size/type/base64).
reports/models.py Defines the core persistence models for applications, issues, and attachments.
reports/migrations/0001_initial.py Creates initial database schema for the new reports app.
reports/admin.py Adds admin views for managing applications/issues/attachments.
reports/apps.py Declares the Django app config.
reports/tests/test_report_create.py Adds API tests for create, validation, and throttling.
backend_solvro_feedback/urls.py Includes the reports URLConf at the project root.
backend_solvro_feedback/settings.py Adds rest_framework, reports, and DRF throttle rate settings.
.gitignore Adds Zed editor folder to ignored files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 15 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants