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
becd3571
Commit
becd3571
authored
6 years ago
by
finnball
Browse files
Options
Downloads
Patches
Plain Diff
Added ReferenceCache parser.
Added refrence storage to cas config.
parent
eb959e27
No related branches found
No related tags found
Loading
Pipeline
#30370557
passed
6 years ago
Stage: test
Stage: post
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
buildgrid/_app/settings/cas.yml
+6
-1
6 additions, 1 deletion
buildgrid/_app/settings/cas.yml
buildgrid/_app/settings/parser.py
+11
-2
11 additions, 2 deletions
buildgrid/_app/settings/parser.py
with
17 additions
and
3 deletions
buildgrid/_app/settings/cas.yml
+
6
−
1
View file @
becd3571
...
...
@@ -7,7 +7,7 @@ server:
tls-client-certs
:
null
description
:
|
Just a CAS.
Just a CAS
with some reference storage
.
instances
:
-
name
:
main
...
...
@@ -24,3 +24,8 @@ instances:
-
!bytestream
storage
:
*main-storage
-
!reference-cache
storage
:
*main-storage
max_cached_refs
:
256
allow_updates
:
true
This diff is collapsed.
Click to expand it.
buildgrid/_app/settings/parser.py
+
11
−
2
View file @
becd3571
...
...
@@ -23,6 +23,7 @@ import yaml
from
buildgrid.server.controller
import
ExecutionController
from
buildgrid.server.actioncache.storage
import
ActionCache
from
buildgrid.server.referencestorage.storage
import
ReferenceCache
from
buildgrid.server.cas.instance
import
ByteStreamInstance
,
ContentAddressableStorageInstance
from
buildgrid.server.cas.storage.disk
import
DiskStorage
from
buildgrid.server.cas.storage.lru_memory_cache
import
LRUMemoryCache
...
...
@@ -126,10 +127,18 @@ class Action(YamlFactory):
yaml_tag
=
u
'
!action-cache
'
def
__new__
(
cls
,
storage
,
max_cached_refs
=
0
,
allow_updates
=
True
):
def
__new__
(
cls
,
storage
,
max_cached_refs
,
allow_updates
=
True
):
return
ActionCache
(
storage
,
max_cached_refs
,
allow_updates
)
class
Reference
(
YamlFactory
):
yaml_tag
=
u
'
!reference-cache
'
def
__new__
(
cls
,
storage
,
max_cached_refs
,
allow_updates
=
True
):
return
ReferenceCache
(
storage
,
max_cached_refs
,
allow_updates
)
class
CAS
(
YamlFactory
):
yaml_tag
=
u
'
!cas
'
...
...
@@ -160,9 +169,9 @@ def _parse_size(size):
def
get_parser
():
yaml
.
SafeLoader
.
add_constructor
(
Execution
.
yaml_tag
,
Execution
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
Execution
.
yaml_tag
,
Execution
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
Action
.
yaml_tag
,
Action
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
Reference
.
yaml_tag
,
Reference
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
Disk
.
yaml_tag
,
Disk
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
LRU
.
yaml_tag
,
LRU
.
from_yaml
)
yaml
.
SafeLoader
.
add_constructor
(
S3
.
yaml_tag
,
S3
.
from_yaml
)
...
...
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