-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor import to reuse task_files based on xml_id #1612
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1612 +/- ##
==========================================
+ Coverage 94.14% 94.16% +0.02%
==========================================
Files 123 124 +1
Lines 3004 3034 +30
==========================================
+ Hits 2828 2857 +29
- Misses 176 177 +1 ☔ View full report in Codecov by Sentry. |
4bf18ab
to
832e5b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the changes locally and think everything works as expected 👍
There is just a comment left regarding the implementation.
832e5b5
to
c6f4f5a
Compare
c6f4f5a
to
11265ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thank you! 🦚
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to add another issue to this PR, but I noticed an actual issue when updating changed tasks (through CodeOcean). Consider the following task in the "old" form, updated with the "new" version. (Hint: The bug is also visible through the ZIP upload)
task_845_new.zip
task_845_old.zip
The new task should contain a file for the tests, but after the update it doesn't. The test is present but without any files. Only a second update with the same "new" version "restores" (actually: recreates) the test file.
Reverting back to the old version yields a similar problem, any might optionally display an error.
We should also double check that files get deleted, when they are not present anymore |
@MrSerth I can't seem to get a handle on the problem. Do you have an idea? |
Barely 😵💫. I played around with Rails for many hours and was trying many different things, until finding a suitable (not necessarily nice) solution. Your previous tests were super helpful, thanks again for this true test-driven approach! I am not really satisfied with the approach, and I find overwriting See my PR #1657 for details and the in-depth suggestion. |
We recently discovered an edge case where a moved file was not updated correctly. At first, it got removed and recreated, and later on only removed. While these changes look pretty difficult, they are the best and only working approach I could find to fix the problem ;). For now, I'd suggest to go with this solution. See #1606 for more details.
@MrSerth I merged your suggestions, thanks again for the help. I think this should be finished now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too, and would consider this PR to be ready. Updating a task with moved files (as mentioned earlier in #1612 (review)) is now working correctly 🥳
This enables the reuse of task_file, model_solution and test objects as discussed in #1320