You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/02/18 09:03:33 UTC

[GitHub] [buildstream] gtristan commented on issue #946: Local source allows inclusion of random/data data

gtristan commented on issue #946:
URL: https://github.com/apache/buildstream/issues/946#issuecomment-1044179388


   NOTE: This is no longer an issue for `project.refs` and elements, since build time tracking has been removed in master for a long time.
   
   That said it is still reasonable to presume that a user might modify files during the build.
   
   HOWEVER, my assessment is that this is already happily fixed (as least in as reasonable a way as I can see possible), as a side effect of optimizing how local files are staged now that we have `SourceCache`.
   
   Explanation:
   * When the `local` source computes it's cache key, it does so *as a result of staging the source in CAS*
   * When the `local` source is later *staged*, it will use the already computed digest (from cache key calculation) to *stage the data directly from CAS*
   
   This means that regardless of whether there is a race condition where the user might modify locally staged files before they are built, at least the cache key will unconditionally reflect the source that is actually used during the build.
   
   If the user modifies the file *after* cache key is calculated for that source, then the previous file content will be used and the modification will be ignored.
   
   I'll close this.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org