Skip to content

Improve element cache state handling

Jürg Billeter requested to merge juerg/element-cache-state into master
  • Remove Element.__update_strict_cache_key_of_rdeps() and Element.__update_ready_for_runtime()

    As bst build --track and unstable workspace cache keys have been removed, dynamic cache key updates across the element graph are no longer needed.

  • Calculate strict cache key before weak cache key

    This reduces the number of states an element can be in, reducing the risk of state handling bugs.

  • Fix strict artifact handling in non-strict mode

    In non-strict mode, Element._pull_pending() checked whether the strict artifact is already in the local cache to determine whether to attempt pulling the strict artifact from a remote cache. However, when staging a cached element, BuildStream always used the weak cache key. The weak cache key is not guaranteed to point to the same artifact as the strict cache key even if the strict artifact is cached.

  • tests/frontend/rebuild.py: Add test_modify_and_revert as regression test for the above fix

Merge request reports