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

Migrate set thread status from database layer #1435

Merged
merged 24 commits into from
May 6, 2024

Conversation

AndreasHuber
Copy link
Contributor

No description provided.

@AndreasHuber AndreasHuber force-pushed the migrate-set-thread-status-from-database-layer branch from df44ac7 to b941ce9 Compare April 25, 2024 16:43
Copy link
Member

@hugotiburtino hugotiburtino left a comment

Choose a reason for hiding this comment

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

Please check the code manually, I tested it in my machine and it didn't work. If iI made a mistake and it works on yours, could you please add a checks in the automatic tests that the status was really changed?

@AndreasHuber AndreasHuber marked this pull request as draft April 25, 2024 22:48
@kulla kulla mentioned this pull request May 1, 2024
Copy link
Member

@kulla kulla left a comment

Choose a reason for hiding this comment

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

Can be merged and after #1441 it can be refactored => Learning: before migrating mutation we should always update the queries first.

thread: { setThreadStatus: { success: true } },
})
given('UuidQuery').for({ ...comment, id: 35163, status: 'done' })
Copy link
Member

Choose a reason for hiding this comment

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

This is needed as long as #1441 is not merged => The reason is that in resolving threads the old uuid resolver is used which does not read from DB

Comment on lines 307 to 309
await context.dataSources.model.serlo.getUuid._querySpec.removeCache({
payloads: ids.map((id) => ({ id })),
})
Copy link
Member

Choose a reason for hiding this comment

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

This is needed as long as #1441 is not merged.

@AndreasHuber AndreasHuber marked this pull request as ready for review May 6, 2024 08:49
@AndreasHuber AndreasHuber dismissed hugotiburtino’s stale review May 6, 2024 08:55

Added a test after the comment. The test revealed four bugs, including three from #1351, that are now fixed.

@AndreasHuber AndreasHuber added this pull request to the merge queue May 6, 2024
Merged via the queue into staging with commit 09dd1cc May 6, 2024
8 checks passed
@AndreasHuber AndreasHuber deleted the migrate-set-thread-status-from-database-layer branch May 6, 2024 09:02
@hugotiburtino hugotiburtino mentioned this pull request May 6, 2024
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