Skip to content

Conversation

LLKruczek
Copy link
Collaborator

@LLKruczek LLKruczek commented Sep 2, 2025

@LLKruczek LLKruczek requested a review from lucaspar September 2, 2025 19:00
@lucaspar
Copy link
Member

lucaspar commented Sep 5, 2025

Supersedes #160 and #187.

@lucaspar lucaspar mentioned this pull request Sep 5, 2025
@lucaspar lucaspar changed the title Upload captures: squashed update with all changes Capture upload via web UI Sep 5, 2025
@lucaspar lucaspar added feature New feature or request gateway Gateway component javascript Pull requests that update javascript code labels Sep 5, 2025
@lucaspar
Copy link
Member

lucaspar commented Sep 5, 2025

@LLKruczek let's work on this PR; I closed #160 , but check the unresolved conversations there and ping me when ready.

@lucaspar lucaspar removed their request for review September 5, 2025 18:42
@lucaspar lucaspar mentioned this pull request Sep 5, 2025
@LLKruczek LLKruczek force-pushed the upload-captures-squashed branch from 413bfb3 to 2041c73 Compare September 11, 2025 16:54
@lucaspar lucaspar requested a review from Copilot September 11, 2025 18:57
Copy link
Contributor

@Copilot 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

This PR implements a capture upload feature via the web UI, allowing users to upload files and create captures through a browser interface.

  • Adds new views for file upload validation, file content checking, and capture creation
  • Implements client-side file deduplication using BLAKE3 hashing to avoid uploading duplicate files
  • Provides a modal-based UI with support for folder uploads, capture type selection, and chunked file uploads

Reviewed Changes

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

Show a summary per file
File Description
gateway/sds_gateway/users/views.py Adds UploadCaptureView and CheckFileExistsView for handling file uploads and duplicate checking
gateway/sds_gateway/users/urls.py Registers new upload endpoints for web UI access
gateway/sds_gateway/templates/users/file_list.html Implements comprehensive upload modal UI with progress tracking and file validation
gateway/sds_gateway/static/css/file-list.css Adds styling for upload modal components
gateway/sds_gateway/api_methods/views/file_endpoints.py Removes debug logging statements
gateway/sds_gateway/api_methods/views/capture_endpoints.py Refactors capture creation with better error handling and transaction management
gateway/sds_gateway/api_methods/utils/metadata_schemas.py Fixes circular import issues in capture type handling
gateway/sds_gateway/api_methods/serializers/file_serializers.py Removes debug logging from file existence checking
gateway/sds_gateway/api_methods/helpers/file_helpers.py Adds helper functions for file upload and capture creation operations
gateway/config/settings/base.py Increases file upload limits for handling larger uploads
Comments suppressed due to low confidence (1)

gateway/sds_gateway/users/views.py:1

  • Missing space in log message: 'conflictsfor' should be 'conflicts for'.
import datetime

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@lucaspar lucaspar left a comment

Choose a reason for hiding this comment

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

just undo the changes to pyproject.toml; then run make test, make pre-commit and merge it if it looks good - thanks

@lucaspar lucaspar force-pushed the upload-captures-squashed branch from 3dee8a2 to 5e92997 Compare September 17, 2025 17:55
lucaspar added a commit that referenced this pull request Sep 17, 2025
lucaspar added a commit that referenced this pull request Sep 17, 2025
This reverts commit 0b22063.

Reason: failing tests.
@lucaspar
Copy link
Member

@LLKruczek some tests are failing on this branch:

=============================================================================================================================================================================================== short test summary info ===============================================================================================================================================================================================
FAILED sds_gateway/api_methods/tests/test_capture_endpoints.py::CaptureTestCases::test_create_drf_capture_v0_201 - AssertionError: Status 400 != 201
FAILED sds_gateway/api_methods/tests/test_capture_endpoints.py::CaptureTestCases::test_create_drf_capture_v1_201 - AssertionError: Status 400 != 201
FAILED sds_gateway/api_methods/tests/test_capture_endpoints.py::CaptureTestCases::test_create_rh_capture_201 - AssertionError: Unexpected status code: 400

Results (21.60s):
      30 passed
       3 failed
         - sds_gateway/api_methods/tests/test_capture_endpoints.py:230 CaptureTestCases.test_create_drf_capture_v0_201
         - sds_gateway/api_methods/tests/test_capture_endpoints.py:280 CaptureTestCases.test_create_drf_capture_v1_201
         - sds_gateway/api_methods/tests/test_capture_endpoints.py:333 CaptureTestCases.test_create_rh_capture_201

@LLKruczek LLKruczek force-pushed the upload-captures-squashed branch 2 times, most recently from 664693b to d2e6843 Compare September 18, 2025 19:07
	modified:   gateway/config/settings/base.py
	new file:   gateway/sds_gateway/api_methods/helpers/file_helpers.py
	modified:   gateway/sds_gateway/api_methods/models.py
	modified:   gateway/sds_gateway/api_methods/serializers/file_serializers.py
@LLKruczek LLKruczek force-pushed the upload-captures-squashed branch from d2e6843 to 3bea963 Compare September 18, 2025 19:09
Copy link
Member

@lucaspar lucaspar left a comment

Choose a reason for hiding this comment

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

There are failing SDK integration tests. I'll send you the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request gateway Gateway component javascript Pull requests that update javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants