Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildgrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
BuildGrid
buildgrid
Commits
ba76d225
Commit
ba76d225
authored
6 years ago
by
Finn
Browse files
Options
Downloads
Patches
Plain Diff
Adding cache capabilities to CAS instance.
Hash type, batch size and symlink strategy.
parent
41b8b8d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildgrid/server/cas/instance.py
+14
-0
14 additions, 0 deletions
buildgrid/server/cas/instance.py
with
14 additions
and
0 deletions
buildgrid/server/cas/instance.py
+
14
−
0
View file @
ba76d225
...
...
@@ -25,6 +25,7 @@ from buildgrid._exceptions import InvalidArgumentError, NotFoundError, OutOfRang
from
buildgrid._protos.google.bytestream
import
bytestream_pb2
from
buildgrid._protos.build.bazel.remote.execution.v2
import
remote_execution_pb2
as
re_pb2
from
buildgrid.settings
import
HASH
,
HASH_LENGTH
from
buildgrid.utils
import
get_hash_type
class
ContentAddressableStorageInstance
:
...
...
@@ -37,6 +38,19 @@ class ContentAddressableStorageInstance:
def
register_instance_with_server
(
self
,
instance_name
,
server
):
server
.
add_cas_instance
(
self
,
instance_name
)
def
hash_type
(
self
):
return
get_hash_type
()
def
max_batch_total_size_bytes
(
self
):
# TODO: link with max size
# Should be added from settings in MR !119
return
2000000
def
symlink_absolute_path_strategy
(
self
):
# Currently this strategy is hardcoded into BuildGrid
# With no setting to reference
return
re_pb2
.
CacheCapabilities
().
DISALLOWED
def
find_missing_blobs
(
self
,
blob_digests
):
storage
=
self
.
_storage
return
re_pb2
.
FindMissingBlobsResponse
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment