-
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 Sep 27, 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 f03594d - Browse repository at this point
Copy the full SHA f03594dView 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 c3ef120 - Browse repository at this point
Copy the full SHA c3ef120View 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 9cae873 - Browse repository at this point
Copy the full SHA 9cae873View 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 17989ee - Browse repository at this point
Copy the full SHA 17989eeView 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 4472b6c - Browse repository at this point
Copy the full SHA 4472b6cView 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 a168d58 - Browse repository at this point
Copy the full SHA a168d58View 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 57b7977 - Browse repository at this point
Copy the full SHA 57b7977View 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 599bcaa - Browse repository at this point
Copy the full SHA 599bcaaView 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 5e3b195 - Browse repository at this point
Copy the full SHA 5e3b195View 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 e7aac7c - Browse repository at this point
Copy the full SHA e7aac7cView 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 30f8418 - Browse repository at this point
Copy the full SHA 30f8418View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d2970d - Browse repository at this point
Copy the full SHA 1d2970dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ad3163 - Browse repository at this point
Copy the full SHA 9ad3163View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7e8816 - Browse repository at this point
Copy the full SHA c7e8816View commit details -
Configuration menu - View commit details
-
Copy full SHA for e64bd7e - Browse repository at this point
Copy the full SHA e64bd7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5541aae - Browse repository at this point
Copy the full SHA 5541aaeView commit details