Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Upgrade ActiveModelSerializers gem to 10.x, take 2 - #36686

#36686
Merged
uponthesun merged 2 commits into
stagingcode-dot-org/code-dot-org:stagingfrom
serializer-upgrade-fixcode-dot-org/code-dot-org:serializer-upgrade-fixCopy head branch name to clipboard
Sep 10, 2020
Merged

Upgrade ActiveModelSerializers gem to 10.x, take 2#36686
uponthesun merged 2 commits into
stagingcode-dot-org/code-dot-org:stagingfrom
serializer-upgrade-fixcode-dot-org/code-dot-org:serializer-upgrade-fixCopy head branch name to clipboard

Conversation

@uponthesun

Copy link
Copy Markdown

Re-applies #36560, which was reverted here #36676 because it broke the ability for teachers to hide lessons.

The only change on top of that is this commit: c0f7d1c which fixes the behavior for ScriptLevelsController#hidden_stage_ids.

Testing story

Manually tested hiding lessons on /s/allthethings locally as a Teacher, and viewing /s/allthethings as a Student in that teacher's section and verifying that the lesson is correctly hidden.

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


hidden = JSON.parse(response.body)
assert_equal [@custom_lesson_1.id.to_s], hidden
assert_equal [@custom_lesson_1.id], hidden

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The shape returned from this API for students is now technically different - It used to be ["123"] and now it's [123] - but I manually tested to confirm that it still works with the javascript code. It doesn't make a ton of sense why they were returned as strings to begin with.

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new code change looks good! Notes for additional context (please correct me if I have something wrong):

  • previous attempt #36560 failed during DTT (not drone) because the tests that broke were eyes tests
  • since then, unit tests were added in #36681 which would now fail drone if the same regression were to occur again

@cforkish cforkish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wow, such a little issue caused such a big problem! thanks for tracking this down @uponthesun!

@uponthesun
uponthesun merged commit 6abe70c into staging Sep 10, 2020
@uponthesun
uponthesun deleted the serializer-upgrade-fix branch September 10, 2020 17:33
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.