Merged
Conversation
66b19ef to
b388ee6
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR redirects submission outputs from GridFS to MinIO, updates related configuration, and adjusts tests to use a temporary MinIO container.
- Adds
output_minio_pathtoCaseResultand stores zipped outputs in MinIO inprocess_result - Introduces helper methods (
_get_output_raw,_generate_output_minio_path) and updates retrieval (get_single_output,get_detailed_result) - Changes test setup to start a MinIO container via Testcontainers and removes the
pytest-minio-mockdependency
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/submission.py | Calls submission.reload() after faking outputs |
| tests/unittest/test_problem.py | Removes obsolete MinIO mock setup |
| tests/conftest.py | Adds module-scoped Testcontainers MinIO fixture |
| pyproject.toml | Replaces pytest-minio-mock with testcontainers[minio] |
| mongo/utils.py | Switches Minio client to read credentials from config |
| mongo/submission.py | Implements MinIO storage for submission output |
| mongo/engine.py | Adds output_minio_path field and adjusts code definition |
| mongo/config.py | Tweaks default env handling for MinIO settings |
| model/submission.py | Updates HTTP status code for validation errors |
Comments suppressed due to low confidence (2)
mongo/submission.py:194
- There are new behaviors in
get_single_outputandget_detailed_resultthat read from MinIO; add unit tests to verify output retrieval and error handling for missing or pending outputs.
) -> SubmissionResultOutput:
mongo/config.py:4
- [nitpick] Removing the default
localhost:9000forMINIO_HOSTmay break local development; consider retaining a sensible default or clearly documenting this change.
MINIO_HOST = os.getenv('MINIO_HOST')
b3504b0 to
1130b61
Compare
0ba6d40 to
a58efc1
Compare
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.