Skip to content

Changes to delete file handling#57

Merged
bdc34 merged 9 commits into
developfrom
bdc34/submission-35-multi-archive
May 20, 2026
Merged

Changes to delete file handling#57
bdc34 merged 9 commits into
developfrom
bdc34/submission-35-multi-archive

Conversation

@bdc34
Copy link
Copy Markdown
Contributor

@bdc34 bdc34 commented May 19, 2026

  • Consolidated common delete file handling code
  • Un-skipped some tests
  • add some delete tests
  • changes file store to handle file deletes by subtracting the file size instead of re-reading the sizes of all the files in GS

@bdc34 bdc34 requested a review from a team as a code owner May 19, 2026 21:13
Comment thread submit_ce/implementations/file_store/gs_file_store.py Outdated
Comment thread submit_ce/implementations/file_store/gs_file_store.py Outdated
Comment thread submit_ce/implementations/file_store/gs_file_store.py Outdated
Comment thread submit_ce/api/file_store.py Outdated
def store_source_package(self, submission_id: str, content: SubmitFile, chunk_size: int) -> list[FileStatus]:
"""Store a source package (tgz, tar, gzip or zip) for a submission.

Returns checksum"""
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Returns a list of FileStatus.

Comment thread submit_ce/implementations/legacy_implementation/__init__.py
@bdc34 bdc34 requested a review from norbusan May 20, 2026 17:24
This will now correctly just display a jwt of the first user when run a second
time.
Comment thread submit_ce/implementations/__init__.py Outdated
bdc34 added 3 commits May 20, 2026 14:07
  - Private _*_path helpers in GsFileStore now return str via posixpath.join.
    _blob_to_file_status uses string ops (removeprefix, posixpath.basename,
    startswith) in place of pathlib operations.
  - Aligns SubmissionFileStore signatures with the impl: get_full_submission_path
    -> str (was Path), get_workspace -> Workspace (was Optional), delete_workspace
    -> None, store_preview gets a chunk_size=4096 default.
  - Adds missing @OverRide on get_source_package_checksum, get_full_*_path (x3),
    and store_zzrm.
  - Adds type annotations to _full_base_path and _blob_to_file_status.
  - Adds None guards for tar.extractfile() and blob.name.
  - Widens _source_path to accept int|str; narrows _check_path_safe path to str.

  `uvx ty check` on gs_file_store.py now passes (was 13 diagnostics).

Claude authored
@bdc34 bdc34 requested a review from norbusan May 20, 2026 19:27
@bdc34 bdc34 merged commit c030d0c into develop May 20, 2026
1 check passed
@bdc34 bdc34 deleted the bdc34/submission-35-multi-archive branch May 20, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants