summaryrefslogtreecommitdiff
path: root/src/buildstream/_sourcecache.py
Commit message (Collapse)AuthorAgeFilesLines
* cascache.py: Also fetch file blobs in _fetch_directory()Jürg Billeter2020-12-091-3/+0
| | | | | This eliminates code duplication in `ArtifactCache`, `SourceCache` and `ElementSourcesCache`.
* Add ElementSourcesCacheJürg Billeter2020-09-031-10/+2
| | | | | | | | | | | | | | | | | | Sources have been cached in CAS individually, except for sources that transform other sources, which have been cached combined with all previous sources of the element. This caching structure may be confusing as sources are specified in the element as a list and this is not a good fit for #1274 where we want to support caching individual sources in a Remote Asset server with a BuildStream-independent URI (especially the `directory` configuration would be problematic). This replaces the combined caching of 'previous' sources with an element-level source cache, which caches all sources of an element staged together. Sources that don't depend on previous sources are still cached individually. This also makes it possible to add a list of all element sources to the source proto used by the element-level source cache.
* _assetcache.py: Drop index_remote_class and storage_remote_classJürg Billeter2020-08-131-2/+1
| | | | They no longer differ among subclasses.
* _sourcecache.py: Use AssetRemoteJürg Billeter2020-08-131-102/+25
| | | | | This migrates the source cache from the BuildStream Source protocol to the Remote Asset API.
* Rename BaseCache to AssetCacheJürg Billeter2020-08-131-2/+2
|
* Remove unused BaseCache._spec_errorJürg Billeter2020-08-131-1/+0
|
* Return names of grpc errorstraveltissues/grpccodesDarius Makovsky2020-05-111-3/+3
|
* cascache.py: Add allow_partial parameter to fetch_blobs()Jürg Billeter2020-04-201-5/+1
| | | | This fixes handling of missing blobs in `ArtifactCache.pull()`.
* _sourcecache: remove unused _update_mtimeDarius Makovsky2019-12-241-6/+0
|
* _sourcecache: remove unused _reachable_directoriesDarius Makovsky2019-12-241-9/+0
|
* _sourcecache: remove unused _remove_sourceDarius Makovsky2019-12-241-3/+0
|
* _sourcecache: remove unused list_sourcesDarius Makovsky2019-12-241-10/+0
|
* _*cache.py: Standardize cache basedirsTristan Maat2019-12-031-6/+6
|
* Reformat code using BlackChandan Singh2019-11-141-22/+18
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* _sourcecache.py: Fix reporting of capabilities for the source cacheBenjamin Schubert2019-11-121-12/+9
| | | | This also adds a test to ensure we are correctly setting the cache up
* _sourcecache.py: Reset source_service in SourceRemote.close()Jürg Billeter2019-10-151-0/+4
|
* _sourcecache: Fallback to fetch source when remote has missing blobsBenjamin Schubert2019-10-101-0/+5
| | | | | | If a remote has some missing blobs for a source, we should not fail abruptly but instead continue to the next remote, and, in the worst case, fetch the source again.
* _sourcecache.py: Move capabilities check to _check() and extend itJürg Billeter2019-09-191-10/+22
| | | | | | | It's sufficient to check the capabilities once per bst session. This avoids the extra round trip in remote.init(). This also adds a check for allow_updates for push remotes.
* Allow splitting artifact cachesTristan Maat2019-09-061-77/+118
| | | | | | | This is now split into storage/index remotes, where the former is expected to be a CASRemote and the latter a BuildStream-specific remote with the extensions required to store BuildStream artifact protos.
* Remove cache-specifc spec classesTristan Maat2019-09-061-12/+1
| | | | This was almost entirely just historical code duplication.
* _sourcecache.py: Remove unused code tracking required sourcesJürg Billeter2019-08-201-38/+0
|
* cascache.py: Remove add_reachable_*_callback() methodsJürg Billeter2019-08-201-2/+0
|
* Remove CASQuota and CASCacheUsageJürg Billeter2019-08-201-3/+0
|
* _sourcecache: rm unused required_sourcesAngelos Evripiotis2019-07-091-12/+0
|
* Source cache uses new proto methodsRaoul Hidalgo Charman2019-07-081-31/+182
| | | | | | | | | This changes the location of source refs from `cache/cas/refs` to `cache/sources_protos` and fixes tests that looked in the old reference place. Source cache now uses the new protocol buffer and grpc methods defined, for storing locally, and pushing and pulling to remotes. Part of #1038
* Add BST_STAGE_VIRTUAL_DIRECTORY optionRaoul Hidalgo Charman2019-05-221-5/+8
| | | | | | | | Add flag to indicate whether sources can stage directly to a virtual directory. Adds `__stage_previous_sources` method which stages previous sources taking into account whether they use virtual directories or not. Part of #983
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-211-0/+249
This was discussed in #1008. Fixes #1009.