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

feat(seed): Implement a more graceful seeding mechanism #18140

Closed
wants to merge 14 commits into from
Closed

feat(seed): Implement a more graceful seeding mechanism #18140

wants to merge 14 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 16, 2018

Closes #17803

Pre-Submission Checklist

  • Your pull request targets the staging branch of freeCodeCamp.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

  • Tested changes locally.
  • Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #17803

Description

I've made changes to the existing mechanism for updating the curriculum in the database so that:

  • doesn't remove all documents from the block and challenge collection in order to update the database

  • upserts any changes to the documents in the block and challenge collection.

  • removes documents from the collection that do not have a corresponding entry in the @freecodecamp/curriculum module.

  • it doesn't cause a bottleneck in the database

I've also implemented an api endpoint to force cachedMap to be regenerated.

@raisedadead raisedadead changed the base branch from staging to master September 26, 2018 12:06
@raisedadead raisedadead added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Sep 26, 2018
Signed-off-by: Jonathan Grah <theflametrooper@gmail.com>
@raisedadead raisedadead added status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. and removed status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find a more graceful way to update blocks/challenges in the database
7 participants