File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1667,7 +1667,13 @@ def get_component_checksum(self, *paths):
16671667 if not hasattr (self , "_component_checksum_cache" ):
16681668 self ._component_checksum_cache = {}
16691669
1670- cache_key = tuple (sorted (paths ))
1670+ # Include bucket and prefix in cache key to force rebuild when they change
1671+ cache_key = (
1672+ tuple (sorted (paths )),
1673+ self .bucket ,
1674+ self .prefix_and_version ,
1675+ self .region ,
1676+ )
16711677 if cache_key in self ._component_checksum_cache :
16721678 return self ._component_checksum_cache [cache_key ]
16731679
@@ -1680,7 +1686,10 @@ def get_component_checksum(self, *paths):
16801686 # For directories, use source files checksum
16811687 checksums .append (self .get_source_files_checksum (path ))
16821688
1683- combined = "" .join (checksums )
1689+ # Include deployment context in checksum calculation
1690+ combined = (
1691+ "" .join (checksums ) + self .bucket + self .prefix_and_version + self .region
1692+ )
16841693 result = hashlib .sha256 (combined .encode ()).hexdigest ()
16851694
16861695 # Cache the result
You can’t perform that action at this time.
0 commit comments