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

Don't convert file data to string when saving project files #40006

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

maddiedierker
Copy link
Contributor

@maddiedierker maddiedierker commented Apr 9, 2021

Fixes a bug where images weren't being saved correctly from curriculum starter image files because the image data was converted to a string before saving, causing us to save corrupted image data.

Repro steps (as of the time of writing, this will consistently repro on production):

  1. Visit a level with a starter image (e.g., /s/csd2-2020/stage/9/puzzle/6)
  2. Make any code change (to trigger a project save)
  3. Reload the page

Expected: My change was saved, and all assets render properly.
Actual: My change was saved, but image assets do not render properly (render as broken image links).

Users that have encountered this situation will need to reset version history to get back to a good state.

Links

Testing story

This issue wasn't caught by unit tests since we have to mock this data. I've created a ticket as follow-up work to cover this scenario with a UI test (likely an Eyes test).

Follow-up work

  • STAR-1525 (create a UI test for this scenario)

@maddiedierker maddiedierker requested a review from a team April 9, 2021 18:54
@maddiedierker maddiedierker merged commit 143085b into staging Apr 9, 2021
@maddiedierker maddiedierker deleted the fix-broken-weblab-img branch April 9, 2021 20:07
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