-
Notifications
You must be signed in to change notification settings - Fork 699
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
reload on connect in quizsummarypage; avoid possible error w/ missing… #12554
base: develop
Are you sure you want to change the base?
reload on connect in quizsummarypage; avoid possible error w/ missing… #12554
Conversation
Build Artifacts
|
Hi @nucleogenesis, following the directions in 'Path 1: Fake replication' I managed to actually replicate the original issue that is - I can see the quiz details page with "Resource not found on device" shown and I can't delete the quiz after having successfully restarted the server. Only if I manually refresh the entire page, then I can delete it. 2024-08-13_15-25-09.mp4Logs: logs.zip |
9054f85
to
278cd17
Compare
@pcenov I've updated the PR so that the deletion modal uses the always present @rtibbles @AlexVelezLl -- I've updated the QuizSummaryPage a bit here. We were duplicating the fetch from the backend to get data we already had available by way of the classSummary store. So the component got the same data two different ways and used them differently. My changes consolidate them into one |
Hi @nucleogenesis - I confirm that now it's possible to delete a quiz while the 'Resource not found on device' message is displayed: delete.mp4I can also see the missing resources loaded correctly when I manually refresh the page after the successful server restart: reload.mp4 |
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 don't have any concrete reason to think this is a problem, but I suspect there could be a regression lurking in here somewhere.
Most likely if the quiz being loaded is an old quiz made on 0.16 or older.
As a final manual test here before we merge, @pcenov could you:
|
Hi @rtibbles - I confirm that there is a regression when opening a quiz created in 0.16: errors.when.opening.a.quiz.created.in.0.16.mp4I'm seeing the following error in the console:
Here's the entire home folder: |
278cd17
to
5bebdd3
Compare
@pcenov I've updated the PR and two things to note:
Could you test the scenarios again mentioned in the reviewer's guidance? |
Hi @nucleogenesis - could you check why the build checks have not passed yet and there are no new build artefacts for this PR? |
5bebdd3
to
fce634d
Compare
Hi @nucleogenesis - I see that there are new build artifacts now - is it ready for testing? |
Hi @nucleogenesis,
2024-12-16_18-31-57.mp4
|
@pcenov thank you! I spoke w/ @rtibbles about the issue of not seeing the questions when editing a quiz from 0.16 In 0.17, Richard introduced two separate models - an Exam and a DraftExam. Prior to this, we only had Exam. Users are only able to edit a DraftExam - so when a new exam is created in >=0.17 the user is creating a DraftExam - they can edit this until they start the exam. One reason for this is that the DraftExam cannot be synced so we can never run into an situation like:
So since the Exam was created as an Exam in 0.16, when the Kolibri is upgraded, it is still an Exam and not a DraftExam, thus it cannot be edited and the questions are not listed in the "Edit Quiz" page. |
@@ -47,6 +47,9 @@ export default [ | |||
name: PageNames.EXAM_CREATION_ROOT, | |||
path: CLASS + QUIZ + '/edit/:sectionIndex', | |||
component: CreateExamPage, | |||
meta: { |
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.
This silences an error message
@@ -260,8 +251,7 @@ | |||
methods: { | |||
// @public | |||
setData(data) { | |||
const { exam, difficultQuestions } = data; | |||
this.quiz = exam; | |||
const { difficultQuestions } = data; |
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.
exam is removed here because we have a computed property exam
which gets the data from examMap
for us
@@ -351,7 +341,7 @@ | |||
}); | |||
}, | |||
detailLink(learnerId) { | |||
return this.classRoute(PageNames.QUIZ_LEARNER_PAGE_ROOT, { | |||
return this.classRoute(this.PageNames.QUIZ_LEARNER_PAGE_ROOT, { |
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.
This was weird to find but it's because we don't import PageNames here, but rather, we get it from the commonCoach
mixin
Summary
Closes #12388
I was only able to replicate the error described there by @AlexVelezLl when I forced specifically a 502 error within the
size
endpoint's handler. I don't know any way that a 502 would come through unless the server is disconnected somehow during the page load.I could not replicate it naturally, however, so I cannot be 100% this addresses the issue at hand here.
But, ultimately, what it came down to was that if the page got a 502 error, it would show the proper "disconnected" snackbar & backdrop. In this case, the value used
this.quizId
was not yet initialized.The change here ensures that when the user regains connection to the server, their page will reload, hopefully successfully.
One thing of concern is that if there is a way in which we could end up getting some kind of unjustified 502, then this could just result in an infinite loop of failing to connect and reloading.
The only way that I can think of that the size endpoint's handler would cause a 502 is if it's crashing the server. I've made some large quizzes during development on EQM and I've not had any issues with it and trying it didn't help replicate the issue.
Without some kind of stack trace for the error from a naturally occurring replication of the error this will be hard to debug, as there are several calls within that could cause the failure:
Also worth noting that my first thought was to force an error within the function there, but that just resulted in the expected
400 Bad request
rather than the502
that is the direct cause of this issue.Reviewer guidance
Code review
QA
Path 1: Fake replication
kolibri stop
, causing the backend to no longer be availablePath 2: Possibly replicate it naturally