Skip to content
Snippets Groups Projects

Add the name of build deps to the strict cache key

Closed James Ennis requested to merge jennis/add_dep_name_to_cache_key into master
All threads resolved!

Description

As it currently stands:

  1. When we calculate the weak cache key, we add the names of build dependencies to the cache key: https://gitlab.com/BuildStream/buildstream/blob/master/src/buildstream/element.py#L3095
  2. When we calculate the strong cache key, we use the strict cache keys of build deps (and not their names): https://gitlab.com/BuildStream/buildstream/blob/master/src/buildstream/element.py#L3106

This means that changing the name of a dependency would trigger a rebuild with non-strict but not with strict.

Additionally, we store the element_name of build dependencies in the artifact proto: https://gitlab.com/BuildStream/buildstream/blob/master/src/buildstream/_protos/buildstream/v2/artifact.proto#L57

This means that we change the name of a dependency, we not trigger a change in the strict cache key and thus, the proto would get out of sync

This MR addresses this.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • James Ennis mentioned in merge request !1548 (merged)

    mentioned in merge request !1548 (merged)

  • Darius Makovsky resolved all threads

    resolved all threads

  • Darius Makovsky approved this merge request

    approved this merge request

  • Tom Pollard
  • Tom Pollard resolved all threads

    resolved all threads

  • bst-marge-bot added 8 commits

    added 8 commits

    • d9a73dca...1f702026 - 6 commits from branch master
    • 1461aec9 - tests/frontend/buildcheckout.py: Stop using explicit cache keys
    • f296a235 - element.py: Add the build dependency names to the cache key dict

    Compare with previous version

  • bst-marge-bot assigned to @jennis and unassigned @marge-bot123

    assigned to @jennis and unassigned @marge-bot123

  • I couldn't merge this branch: CI failed!

  • James Ennis added 8 commits

    added 8 commits

    • f296a235...dd03a017 - 6 commits from branch master
    • 124bb873 - tests/frontend/buildcheckout.py: Stop using explicit cache keys
    • 1c560e56 - element.py: Add the build dependency names to the cache key dict

    Compare with previous version

  • Darius Makovsky approved this merge request

    approved this merge request

  • LGTM, though should this take up a NEWS entry about changing cache keys?

  • Tristan Maat approved this merge request

    approved this merge request

  • Author Developer

    Thanks for the reviews. Closing in favour of !1548 (merged) as this includes identical changes.

  • closed

  • Please register or sign in to reply
    Loading