-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 Sep 23, 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 cf4ac22 - Browse repository at this point
Copy the full SHA cf4ac22View 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 150ecf1 - Browse repository at this point
Copy the full SHA 150ecf1View 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 63af535 - Browse repository at this point
Copy the full SHA 63af535View 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 cb065dc - Browse repository at this point
Copy the full SHA cb065dcView 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 5c2a4af - Browse repository at this point
Copy the full SHA 5c2a4afView 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 67fe92b - Browse repository at this point
Copy the full SHA 67fe92bView 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 a642781 - Browse repository at this point
Copy the full SHA a642781View 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 7f2f7b7 - Browse repository at this point
Copy the full SHA 7f2f7b7View 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 290d6ee - Browse repository at this point
Copy the full SHA 290d6eeView 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 bf72f4e - Browse repository at this point
Copy the full SHA bf72f4eView 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 c489093 - Browse repository at this point
Copy the full SHA c489093View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0819dd - Browse repository at this point
Copy the full SHA b0819ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d24b18 - Browse repository at this point
Copy the full SHA 3d24b18View commit details -
Configuration menu - View commit details
-
Copy full SHA for e900a5e - Browse repository at this point
Copy the full SHA e900a5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a64dad5 - Browse repository at this point
Copy the full SHA a64dad5View commit details