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

recover gracefully when fetching stage descriptions #34040

Merged
merged 2 commits into from Apr 4, 2020

Conversation

davidsbailey
Copy link
Member

Quick fix for broken pull-through of stage descriptions when levelbuilder has more stages than curriculum builder does. See https://codedotorg.slack.com/archives/CA3KCSGTD/p1585949395130800 for more context.

Testing story

manually verified locally that when LB has more stages than CB, the operation succeeds instead of failing, and there is enough info in the output to see which stages are missing from CB:
Screen Shot 2020-04-03 at 3 34 23 PM

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

Copy link
Contributor

@mvkski mvkski left a comment

Choose a reason for hiding this comment

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

LGTM! Is it possible to also add unit tests for this case? Possibly after shipping, if this is time sensitive

@davidsbailey
Copy link
Member Author

Good idea! Please take another look.

@davidsbailey
Copy link
Member Author

I confirmed that this test passes locally, but if i run it without the code change, it fails in the way we were seeing on levelbuilder:

FAILED TESTS:
  entry tests
    StageDescriptions
      ✖ recovers when importedDescriptions are missing
        PhantomJS 2.1.1 (Mac OS X 0.0.0)
      Fake XHR onreadystatechange handler threw exception: undefined is not an object (evaluating 'importedStage.descriptionStudent')
      webpack:///src/lib/script-editor/StageDescriptions.jsx:155:47 <- test/entry-tests.js:108306:56

Copy link
Contributor

@mvkski mvkski left a comment

Choose a reason for hiding this comment

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

👍👍

@davidsbailey davidsbailey merged commit 9e5f5e8 into staging Apr 4, 2020
@davidsbailey davidsbailey deleted the stage-desc-recover branch April 4, 2020 04:12
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.

None yet

2 participants