* Unify submission execution implementations into submissionRunner
* Unify contestMonitorTypes definitions between extension & web
* Make line separator in entry use LF
* Add entry.sh for sandbox
* Fix web imports
* Sandbox read from .env
---------
Co-authored-by: orosmatthew <orosmatthew@pm.me>
* Add an Output Panel channel named "BWContest Log"
* Allow client logout when no contest
And make login/logout error messages clearer
* Show contest name & team name in Code extension side panel
* submission icons for sidebar panel
* Start VSCode extension "onStartupFinished"
instead of waiting for Sidebar to be opened
* VSCode: Sidebar UI for up-to-date problem/submissions status
- VSCode: poll API every 30 seconds to get contest metadata and all submission metadata for the logged in team
- The Sidebar now shows all problems in the contest, along with their submissions and overall status, which automatically updates as submissions are submitted & judged
- Web: "contestState" API to get all info for an activeTeam via their token
- Update submit API to return the submission id, allowing the VSCode UI to immediately render it as Pending without waiting for a polling cycle
-
* Add "Compilation Failed" message to submissions that fail to build
* Contest Import - Option to create repos & immediately activate the imported contest
Useful for testing with old contests (including the submissions)
* Test/Submit panel, use fixed-width font in input/output areas
* Fix build error for 'pluralize'
* Clear all state & halt polling loops on logout, restart them on login
* Improve the debug fastPolling option
- Toggleable via package.json config
- Setting the option changes the initial state as well as ability to toggle states
* Web project 'npm run format'
* Send detailed submission run result info to site/database
* Show SubmissionStateReason on site
* Mark Build/TLE errors as graded immediately
* Remove superfluous log
Specific fixes to ensure runs are serialized:
- Added missing await when starting clone/run
- The runJava method now has a single exit path that can only execute when the process has guaranteed been 'close'd. The timeout detection previously sent SIGKILL and assumed it worked, but it was not working on my machine and the student code would continue to run indefinitely after returning.
- To get the SIGKILL to kill the submitted app's process, I added end/destroy calls to the process stdin/stdout/stderr streams.
Added lots of logging while diagnosing these issues, and it seems useful to keep. As part of this, the contest/team names are now included in the 'submissions' web api.
Also, I've structured the result data in more detail within the Sandbox, tracking whether a run succeeded or the way in which it failed. I'm collapsing these back down to just a string "output" with the preexisting failure markers (e.g. "[Timeout after 30 seconds]"), but would like to pass this over to the site/DB in a structured form eventually.