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

Fix: failure in Student_role_spec #6086

Conversation

Formasitchijoh
Copy link
Contributor

@Formasitchijoh Formasitchijoh commented Jan 3, 2025

What this PR does

This PR resolves the recent failure in the multiwiki_assignment_spec and student_role_spec failure by fixing useNavigationUtils access and updating course creation date

Screenshots

Before:
Screenshot 2025-01-03 at 17 06 32

Screenshot 2025-01-03 at 17 05 28 Screenshot 2025-01-03 at 17 06 53

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

I see that exported method from useNavigationUtils has a different name than the file itself — this was like an accident on the part of @Abishekcs — but I don't understand why that should matter, as all files that import it use the corresponding method and file names. This spec isn't failing every time.

start: '2015-01-01'.to_date,
end: '2025-01-01'.to_date)
start: '2025-01-01'.to_date,
end: '2025-03-01'.to_date)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A course cannot be joined after it has ended, so I think just the end date is relevant here. This appears to be unrelated to the multiwiki assignment spec; I imagine this just started failing at the beginning of the year.

A better fix will be to only change the end date, and make it dynamic (like 1.month.from_now) so that it will never break again because of the same issue.

This is best done in a separate PR, since it's not about the multiwiki bit.

Copy link
Contributor Author

@Formasitchijoh Formasitchijoh Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiwiki_assignement_spec passed when i pulled from the master branch, when you merged the changes i made earlier. I will just have to confirm that validate if this build passes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to fix both the failures in this PR because they both have been occurring along side for the recent failed builds. do you think i should separate them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think a separate PR just for the student_role_spec is appropriate. We have a clear understanding of this new failure and the fix should be easy.

@Formasitchijoh
Copy link
Contributor Author

I see that exported method from useNavigationUtils has a different name than the file itself — this was like an accident on the part of @Abishekcs — but I don't understand why that should matter, as all files that import it use the corresponding method and file names. This spec isn't failing every time.

Recently, for the last five or more builds, the test suite has been failing, including the multiwiki_assignment_spec, with no test passing even locally.

The primary issue was an unresolved access to the useNavigationUtils method, which caused the Webpack bundle to throw an error, preventing the tests from progressing.

Additionally, the course's start and end dates were problematic. The enrollment date for the course had already passed, making the "Join Course" button and other related buttons or links inaccessible to students.

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

I haven't seen any of the cases where unresolved access to useNavigationUtils was a problem on CI builds. If this was happening locally, you might have had a problem with the local assets, which probably got fixed when you rebuilt the assets during this set of changes.

@Formasitchijoh
Copy link
Contributor Author

I haven't seen any of the cases where unresolved access to useNavigationUtils was a problem on CI builds. If this was happening locally, you might have had a problem with the local assets, which probably got fixed when you rebuilt the assets during this set of changes.

Alright, but the new failure is with respect to some Javascript vega-embed.min.js file, currently checking what that is for

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

That's a file that gets served externally (see _vega.html.haml), so either a CDN failure (for Wiki Education mode) or a problem with toolforge.org (for Programs & Events mode) would make that file fail to load.

@Formasitchijoh
Copy link
Contributor Author

It seems to be with the toolforge http://wikiedudashboard.toolforge.org/vega-embed.min.js
Screenshot 2025-01-03 at 18 16 38

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

Is that usually the same error we see with the account requests spec? I haven't noticed it before, but I haven't paid attention to it.

@Formasitchijoh
Copy link
Contributor Author

In the Github Worflow , it is possible to be able to trigger a build to rerun apart from making a PR, but i haven't been able to see that when i check the failed build in the Actions tab

@Formasitchijoh
Copy link
Contributor Author

Is that usually the same error we see with the account requests spec? I haven't noticed it before, but I haven't paid attention to it.

No this isn't the error with the account request spec was with respect to ElementNotFound for the Ok Button

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

Okay. I suspect this was a temporary disruption of toolforge, and is probably not worth focusing on currently.

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

In the Github Worflow , it is possible to be able to trigger a build to rerun apart from making a PR, but i haven't been able to see that when i check the failed build in the Actions tab

It probably requires more permissions than you have for this repo. Ping me on slack if you want me to trigger a re-run of any build.

@Formasitchijoh
Copy link
Contributor Author

Alright I will try, rerunning again

@Formasitchijoh
Copy link
Contributor Author

In the Github Worflow , it is possible to be able to trigger a build to rerun apart from making a PR, but i haven't been able to see that when i check the failed build in the Actions tab

It probably requires more permissions than you have for this repo. Ping me on slack if you want me to trigger a re-run of any build.

Okay then thank you

@Formasitchijoh
Copy link
Contributor Author

@ragesoss Please could you check this out when you are chanced, so everyone could have the updated changes

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

This still contains commits from two unrelated things. I'd like a separate PR that just includes the student_role_spec change. I don't think the useNavigationUtils changes do anything.

@Formasitchijoh
Copy link
Contributor Author

Alright since this PR contains just the changes for the useNavigation i will revert it and keep the student_role_spec and update the PR name

@ragesoss
Copy link
Member

ragesoss commented Jan 3, 2025

Sounds good. Please clean up the commit history as well; this just needs one commit.

@Formasitchijoh Formasitchijoh force-pushed the @fix/multiwiki_student_role_spec branch from d4f33f0 to 7517540 Compare January 4, 2025 00:24
@Formasitchijoh Formasitchijoh reopened this Jan 4, 2025
@Formasitchijoh Formasitchijoh changed the title Fix: Multiwiki-error Fix: failure in Student_role_spec Jan 4, 2025
@Formasitchijoh Formasitchijoh force-pushed the @fix/multiwiki_student_role_spec branch from 93f4c02 to 7517540 Compare January 4, 2025 01:25
@Formasitchijoh Formasitchijoh reopened this Jan 4, 2025
@ragesoss ragesoss merged commit 320b525 into WikiEducationFoundation:master Jan 4, 2025
1 of 2 checks passed
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.

2 participants