Skip to content
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

Use websockets to display autotest run errors #6878

Merged

Conversation

david-yz-liu
Copy link
Collaborator

@david-yz-liu david-yz-liu commented Dec 15, 2023

Motivation and Context

Currently if there is an autotest setup error (e.g., an error in package installation), the autotests fail to run, but no error message is displayed until the page is refreshed.

Your Changes

Description: Modified the AutotestRunJob so that it reports errors using websockets. This ensures the error messages are displayed in real-time.

Because I removed the old error flash message, I also modified the submissions table to use websockets to track autotesting status. This required updating the AutotestRunJob and AutotestResultsJob to broadcast messages for both individual and batch test runs.

Type of change (select all that apply):

  • Bug fix (non-breaking change which fixes an issue)

Testing

Tested manually in the UI for both instructor-run (individual and batch) and student-run tests.

Questions and Comments (if applicable)

Checklist

  • I have performed a self-review of my own code.
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported on Coveralls.
  • I have updated the Changelog.md file.

@david-yz-liu david-yz-liu added this to the v2.4.2 milestone Dec 15, 2023
@coveralls
Copy link
Collaborator

coveralls commented Dec 15, 2023

Pull Request Test Coverage Report for Build 7250454142

  • 63 of 67 (94.03%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 91.66%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/assets/javascripts/flash.js 0 4 0.0%
Totals Coverage Status
Change from base Build 7249447703: 0.09%
Covered Lines: 38659
Relevant Lines: 41555

💛 - Coveralls

@david-yz-liu david-yz-liu force-pushed the test-run-broadcast-errors branch 3 times, most recently from 8bee671 to 9fe42ba Compare December 17, 2023 02:03
Also improve display of autotest run status in general by
differentiating between AutotestRunJob and AutotestResultsJob
completing. Also add websocket support for autotest results to
submission table.
@david-yz-liu david-yz-liu force-pushed the test-run-broadcast-errors branch from 9fe42ba to 48f70e7 Compare December 18, 2023 15:47
@donny-wong donny-wong requested review from pretendWhale and removed request for donny-wong January 4, 2024 13:03
@donny-wong donny-wong merged commit e4105e4 into MarkUsProject:master Jan 5, 2024
2 checks passed
donny-wong pushed a commit to donny-wong/Markus that referenced this pull request Jan 12, 2024
Also improve display of autotest run status in general by
differentiating between AutotestRunJob and AutotestResultsJob
completing. Also add websocket support for autotest results to
submission table.
@david-yz-liu david-yz-liu deleted the test-run-broadcast-errors branch August 9, 2024 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants