-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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!: Drop the block_structure.storage_backing_for_cache WaffleSwitch #35185
base: master
Are you sure you want to change the base?
Commits on Nov 5, 2024
-
feat: Turn ON the storage backing for cache by default.
Any places where the storage backing cache for block structures was on conditionally previously it will be ON by default.
Configuration menu - View commit details
-
Copy full SHA for 16d440a - Browse repository at this point
Copy the full SHA 16d440aView commit details -
test: Remove test variants that test without a cache.
Since the cache is now always on, remove test cases that test the case when it's disabled.
Configuration menu - View commit details
-
Copy full SHA for 57cdbfa - Browse repository at this point
Copy the full SHA 57cdbfaView commit details -
feat!: Drop an unnecessary function.
Remove the `enable_storage_backing_for_cache_in_request` function and its uses in the platform. The function is no longer needed because the storage backing for the block_structure cache will be ON by default moving forward. BREAKING CHANGE: This `enable_storage_backing_for_cache_in_request` function no longer exists and any calls to it should be removed. The cache it enables is now always ON.
Configuration menu - View commit details
-
Copy full SHA for 261b498 - Browse repository at this point
Copy the full SHA 261b498View commit details -
feat!: Drop the block_structure.storage_backing_for_cache waffle switch.
This work is part of DEPR openedx/public-engineering#32 Now that we've removed all uses for this switch remove the decleration as well. BREAKING CHANGE: The `block_structure.storage_backing_for_cache` will no longer exist and its value will be ignored. If you have this switch set in your instance you can remove it. The backing cache is now always ON.
Configuration menu - View commit details
-
Copy full SHA for fab0267 - Browse repository at this point
Copy the full SHA fab0267View commit details -
test: Update a BlockStructureFactory test mixin.
Previously, we were not caching BlockStructures to the database when we were adding them to the store by default. Now that we are doing that, the BlockStructureFactory test failed because it was taking a shortcut that would no longer work. It was just creating a blockstructure that had relations but not any block information. Now that we're always persisting updates to the database, this broke because to persist the structure to the database, we have to look up the block information from the block_structure which now fails. This change updates the test mixin to add more data so that the content can be persisted to the database successfully as a part of this test.
Configuration menu - View commit details
-
Copy full SHA for 9164e92 - Browse repository at this point
Copy the full SHA 9164e92View commit details -
test: Change call counts with model back as default.
We don't call the modulestore or update the cache here now that we are backed by the database model. Previously the cache would change because the `_encode_root_cache_key` function in `BlockStructureStore` class used the `BlockstoreBlockData.VERSION` as a part of the cache key when the data was not being cached in a DB model.
Configuration menu - View commit details
-
Copy full SHA for e52253d - Browse repository at this point
Copy the full SHA e52253dView commit details -
feat: Remove the unused
StubModel
class.Now that the model backed cache is on by default, we don't need to keep the StubModel object around.
Configuration menu - View commit details
-
Copy full SHA for e5f698a - Browse repository at this point
Copy the full SHA e5f698aView commit details -
With the new block_structure model cache enabled by default, we're donig queries to it as a part of other tests.
Configuration menu - View commit details
-
Copy full SHA for db266e2 - Browse repository at this point
Copy the full SHA db266e2View commit details -
test: Update the course in the cache after it's got new content.
Because signals are disabled by default for performance reasons, this doesn't happen automatically. So we manually refresh the course in the cache after all the changes have been made so that the course in the cache matches the latest version in the modulestore.
Configuration menu - View commit details
-
Copy full SHA for cf37ca4 - Browse repository at this point
Copy the full SHA cf37ca4View commit details -
refactor: Make the test easier to debug in the future.
This test had a redundant call to get the course data from the store because that already happens at the end of the setup function. And also because expected call structure was being built inside the assert, it made it harder to inspect when debugging. Make the code a little bit easire to debug in case we're back here in the future.
Configuration menu - View commit details
-
Copy full SHA for f0f18f8 - Browse repository at this point
Copy the full SHA f0f18f8View commit details -
docs: Cross link to wiki docs related to block structures.
Provide a link to more docs from the code in case we need more context in the future.
Configuration menu - View commit details
-
Copy full SHA for 8741417 - Browse repository at this point
Copy the full SHA 8741417View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80ed5ee - Browse repository at this point
Copy the full SHA 80ed5eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for d58dea3 - Browse repository at this point
Copy the full SHA d58dea3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6e5b81 - Browse repository at this point
Copy the full SHA a6e5b81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 398160c - Browse repository at this point
Copy the full SHA 398160cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4768568 - Browse repository at this point
Copy the full SHA 4768568View commit details