Conversation
Sql autorunner
Change branch filtering
Fix path extraction
Comments fix
|
I have reviewed this conceptually but not at the code level. |
|
@mrpotatocode |
There was a problem hiding this comment.
Overall the code looks really good! There are a few of easy fixes. I have added inline comments.
I think these two are most important:
- Save errors to JSON (not just print) (line 78)
- Empty query (line 39)
Depending upon what we decide about error handling, we can fix review comment on line 20. We can choose to gracefully handle the error and always generate JSON file, for instance.
The rest of review comments are easy fixes.
There was a problem hiding this comment.
@khsergvl Can you please look at
- #anjali-deshpande-hub#1 In this PR, the assignment SQL file had some queries that are missing and Query 4 which has error; but the error shown by autorunner is incorrect.
- #anjali-deshpande-hub#2 Here the assignment SQL file has correct answers, but the runner is failing. The file is running on DbBrowser. Maybe I am missing something. Please check.
|
Hi @khsergvl after merging last changes we have an issue with: Regarding " distinguish empty result set queries from non‑executed or failed ones." we can return something like this for both: You can check my last PR in my repo to use this changes (If you want I can propose this changes to your repo and you can add them to next commit for current PR): |
|
@Dmytro-Bonislavskyi well yeah, the condition of undefined was resolved. A spread of node js ... |
|
@khsergvl Sergii, Yes, I can see it with technically correct query with 2 statement like this (evaluating as error) And, we still can use "no rows returned" kind for "Empty-correct"/"just Empty" results to not just skip them silently. |
|
@khsergvl I add handling for multiple statements Queries in my repo, so now we can have it and also keep error handling as 3rd type. Give me other "limit cases", I can check them too. |
# Conflicts: # .github/workflows/sql_assignment_runner.yml # tests/test_assignment.py
anjali-deshpande-hub
left a comment
There was a problem hiding this comment.
@khsergvl @Dmytro-Bonislavskyi @mrpotatocode I have re-reviewed the code changes. It looks good to be merged now. Looking forward for this to be tested by our select testers.



What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
This pull request adds github workflow to run students queries and help to review assignments.
Result is truncated to up to 3 rows (github supports up to 65k symbols per comment). In case of failures it should not make any problem to students.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
It is built on the top of python unit test runner, and might be useful in case DSI will decide to implement strict
unit test/ test development driven assignment marking. I think we can change a trigger instead of on PR toon workflow_dispatchand trigger it manually during assignment review.Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
There are few limitations here, since runner right now executes only one sql statement within markers(query - end query).
We can collaborate to improve it, if it will be necessary.
How were these changes tested?
Please look here to see testing results:
https://github.com/khsergvl/sql/pulls
Two latest worse attention.
Other cohorts:
assignment sql files need markers to keep file parsed.
Checklist
With love to open-source