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 startup errors, add unit test for scheduled task errors (fixes #5209) #5269

Merged
merged 6 commits into from
Dec 21, 2024

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Dec 18, 2024

No description provided.

@Nutomic Nutomic changed the title CI check to ensure Lemmy doesnt throw errors at startup Fix startup errors, add ci check (fixes #5209) Dec 19, 2024
@Nutomic Nutomic changed the title Fix startup errors, add ci check (fixes #5209) Fix startup errors, add unit test for scheduled task errors (fixes #5209) Dec 19, 2024
@@ -111,49 +141,44 @@ pub async fn setup(context: Data<LemmyContext>) -> LemmyResult<()> {
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed this file so that all the individual tasks return result, and only the top-level handler logs them. That way we can use a simple unit test to ensure that no errors are thrown.

@Nutomic Nutomic marked this pull request as ready for review December 19, 2024 15:39
src/scheduled_tasks.rs Show resolved Hide resolved
Copy link
Collaborator

@dullbananas dullbananas left a comment

Choose a reason for hiding this comment

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

Because you changes utils.sql and #4673 has not been merged yet, you must add a migration that just runs SELECT;, as explained in comments in schema_setup.rs

@Nutomic
Copy link
Member Author

Nutomic commented Dec 20, 2024

@dullbananas Done.

@dessalines dessalines merged commit 7585aac into main Dec 21, 2024
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.

3 participants