Closed hectorsector closed 3 years ago
We set the proper error for the situation. The payload that got sent to looking glass contains and invalid schema which is why we got the ValueError.
We need to fix the grading action to forward the error to looking glass properly.
Which is essentially exactly what you said 😂
Tests would help. The other thing is figuring out what part of Actions threw that error. Was it the thrown as the workflow file was read for the run and if so how should we handle that output.
This is more for a note when I come back to this issue than it is a resolution to the problem
@hectorsector I also think something is crossed up.
This screenshot seems to be for scheduled events and this repo is for enable pages 😂😂
This screenshot seems to be for scheduled events and this repo is for enable pages 😂😂
my bad, fixed now
@hectorsector The more I think about this, them more I'm wondering "who" has the responsibility here.
IF it's an Actions failure, like an invalid workflow rather than an invalid answer, then we should just prevent the Looking Glass step from running.
I'd even be willing to be the grading action didn't run either.
Can you send me a link to the workflow run please?
I used the workflow run that was linked in slack, which threw the same error as you posted. The payload that was sent to Looking Glass is as follows:
{
"reports": [
{
"filename": "/home/runner/work/supreme-engine/supreme-engine/.github/workflows/stale-weekly.yml",
"isCorrect": false,
"display_type": "actions",
"level": "fatal",
"msg": "",
"error": {
"expected": "",
"got": "An internal error occurred. Please open an issue at: https://github.com/githubtraining/lab-scheduled-events and let us know! Thank you"
}
}
]
}
So looking at this I'm starting to think Looking glass failed to handle it properly. It apparently didn't like the blank expected
field even though it should have converted the blank value into null
.
I'll examine LG to see if I can find the probelm.
all of this is being addressed in this pull
When a user uses improper workflow syntax:
We don't send the right
error.expected
anderror.got
fields to Looking Glass. In response, Looking Glass threw out:Additionally, could we write some tests so that the author can't get themselves into this problem for this (and future) labs?
/cc @mattdavis0351