Changes to delete file handling#57
Merged
Merged
Conversation
Contributor
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
norbusan
reviewed
May 20, 2026
| 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""" |
This will now correctly just display a jwt of the first user when run a second time.
norbusan
reviewed
May 20, 2026
- 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
norbusan
approved these changes
May 20, 2026
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.