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
3
Snippets
Groups
Projects
Show more breadcrumbs
BuildGrid
buildgrid
Compare revisions
ad4eb44ff04e97503ce26075f7ac902dc917b2f6 to 02692ded1a6de7ed983c67426f146091ade9675b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
BuildGrid/buildgrid
Select target project
No results found
02692ded1a6de7ed983c67426f146091ade9675b
Select Git revision
Branches
coverity
master
sminskyprimu/blake3
sotk/features/lease-audit-table
sotk/logstream-testing
zchen723/skip-scheduler-metrics
Tags
0.0.10
0.0.11
0.0.12
0.0.13
0.0.14
0.0.16
0.0.17
0.0.19
0.0.2
0.0.20
0.0.21
0.0.23
0.0.25
0.0.26
0.0.27
0.0.28
0.0.29
0.0.3
0.0.30
0.0.31
0.0.32
0.0.33
0.0.34
0.0.35
0.0.36
0.0.37
0.0.38
0.0.39
0.0.4
0.0.40
0.0.41
0.0.42
0.0.43
0.0.44
0.0.45
0.0.46
0.0.47
0.0.48
0.0.49
0.0.5
0.0.50
0.0.51
0.0.52
0.0.53
0.0.54
0.0.55
0.0.56
0.0.57
0.0.58
0.0.59
0.0.6
0.0.60
0.0.61
0.0.62
0.0.63
0.0.64
0.0.65
0.0.66
0.0.67
0.0.68
0.0.69
0.0.7
0.0.70
0.0.71
0.0.72
0.0.73
0.0.74
0.0.75
0.0.76
0.0.78
0.0.79
0.0.8
0.0.80
0.0.81
0.0.82
0.0.83
0.0.84
0.0.85
0.0.86
0.0.87
0.0.88
0.0.89
0.0.9
0.0.90
0.0.91
0.0.92
0.0.93
0.0.94
0.0.95
0.0.96
0.0.97
0.0.98
0.1.0
0.1.1
0.1.10
0.1.11
0.1.12
0.1.13
0.1.14
0.1.15
106 results
Swap
Target
BuildGrid/buildgrid
Select target project
edbaunton/buildgrid
BuildGrid/buildgrid
bloomberg/buildgrid
devcurmudgeon/buildgrid
mhadjimichael/buildgrid
jmacarthur/buildgrid
rkothur/buildgrid
valentindavid/buildgrid
jjardon/buildgrid
RichKen/buildgrid
jbonney/buildgrid
onsha_alexander/buildgrid
santigl/buildgrid
mostynb/buildgrid
hoffbrinkle/buildgrid
Malinskiy/buildgrid
coldtom/buildgrid
azeemb_a/buildgrid
pointswaves/buildgrid
BenjaminSchubert/buildgrid
michaellee8/buildgrid
anil-anil/buildgrid
seanborg/buildgrid
jdelong12/buildgrid
jclay/buildgrid
bweston92/buildgrid
zchen723/buildgrid
cpratt34/buildgrid
armbiant/apache-buildgrid
armbiant/android-buildgrid
itsme300/buildgrid
sbairoliya/buildgrid
32 results
ad4eb44ff04e97503ce26075f7ac902dc917b2f6
Select Git revision
Branches
coverity
master
sminskyprimu/blake3
sotk/features/lease-audit-table
sotk/logstream-testing
zchen723/skip-scheduler-metrics
Tags
0.0.10
0.0.11
0.0.12
0.0.13
0.0.14
0.0.16
0.0.17
0.0.19
0.0.2
0.0.20
0.0.21
0.0.23
0.0.25
0.0.26
0.0.27
0.0.28
0.0.29
0.0.3
0.0.30
0.0.31
0.0.32
0.0.33
0.0.34
0.0.35
0.0.36
0.0.37
0.0.38
0.0.39
0.0.4
0.0.40
0.0.41
0.0.42
0.0.43
0.0.44
0.0.45
0.0.46
0.0.47
0.0.48
0.0.49
0.0.5
0.0.50
0.0.51
0.0.52
0.0.53
0.0.54
0.0.55
0.0.56
0.0.57
0.0.58
0.0.59
0.0.6
0.0.60
0.0.61
0.0.62
0.0.63
0.0.64
0.0.65
0.0.66
0.0.67
0.0.68
0.0.69
0.0.7
0.0.70
0.0.71
0.0.72
0.0.73
0.0.74
0.0.75
0.0.76
0.0.78
0.0.79
0.0.8
0.0.80
0.0.81
0.0.82
0.0.83
0.0.84
0.0.85
0.0.86
0.0.87
0.0.88
0.0.89
0.0.9
0.0.90
0.0.91
0.0.92
0.0.93
0.0.94
0.0.95
0.0.96
0.0.97
0.0.98
0.1.0
0.1.1
0.1.10
0.1.11
0.1.12
0.1.13
0.1.14
0.1.15
106 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
server/instance.py: Deactivate SO_REUSEPORT option
· 15d44d3b
Martin Blanchard
authored
6 years ago
#138
15d44d3b
_exceptions.py: Add a PermissionDeniedError
· 4a600cfc
Martin Blanchard
authored
6 years ago
#138
4a600cfc
server/instance.py: Raise an error on socket binding failure
· 89f2b765
Martin Blanchard
authored
6 years ago
#138
89f2b765
cmd_server.py: Catch socket configuration errors
· 02692ded
Martin Blanchard
authored
6 years ago
#138
02692ded
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
buildgrid/_app/commands/cmd_server.py
+8
-2
8 additions, 2 deletions
buildgrid/_app/commands/cmd_server.py
buildgrid/_exceptions.py
+6
-0
6 additions, 0 deletions
buildgrid/_exceptions.py
buildgrid/server/instance.py
+9
-1
9 additions, 1 deletion
buildgrid/server/instance.py
with
23 additions
and
3 deletions
buildgrid/_app/commands/cmd_server.py
View file @
02692ded
...
...
@@ -24,6 +24,7 @@ import sys
import
click
from
buildgrid._exceptions
import
PermissionDeniedError
from
buildgrid.server._authentication
import
AuthMetadataMethod
,
AuthMetadataAlgorithm
from
buildgrid.server.instance
import
BuildGridServer
from
buildgrid.server._monitoring
import
MonitoringOutputType
,
MonitoringOutputFormat
...
...
@@ -120,9 +121,14 @@ def _create_server_from_config(configuration):
server
=
BuildGridServer
(
**
kargs
)
try
:
for
channel
in
network
:
server
.
add_port
(
channel
.
address
,
channel
.
credentials
)
except
PermissionDeniedError
as
e
:
click
.
echo
(
"
Error: {}.
"
.
format
(
e
),
err
=
True
)
sys
.
exit
(
-
1
)
for
instance
in
instances
:
instance_name
=
instance
[
'
name
'
]
services
=
instance
[
'
services
'
]
...
...
This diff is collapsed.
Click to expand it.
buildgrid/_exceptions.py
View file @
02692ded
...
...
@@ -89,3 +89,9 @@ class FailedPreconditionError(BgdError):
able to fix the errors and retry.
"""
def
__init__
(
self
,
message
,
detail
=
None
,
reason
=
None
):
super
().
__init__
(
message
,
detail
=
detail
,
domain
=
ErrorDomain
.
SERVER
,
reason
=
reason
)
class
PermissionDeniedError
(
BgdError
):
"""
The caller does not have permission to execute the specified operation.
"""
def
__init__
(
self
,
message
,
detail
=
None
,
reason
=
None
):
super
().
__init__
(
message
,
detail
=
detail
,
domain
=
ErrorDomain
.
SERVER
,
reason
=
reason
)
This diff is collapsed.
Click to expand it.
buildgrid/server/instance.py
View file @
02692ded
...
...
@@ -27,6 +27,7 @@ import grpc
import
janus
from
buildgrid._enums
import
BotStatus
,
LogRecordLevel
,
MetricRecordDomain
,
MetricRecordType
from
buildgrid._exceptions
import
PermissionDeniedError
from
buildgrid._protos.buildgrid.v2
import
monitoring_pb2
from
buildgrid.server.actioncache.service
import
ActionCacheService
from
buildgrid.server._authentication
import
AuthMetadataMethod
,
AuthMetadataAlgorithm
...
...
@@ -87,7 +88,8 @@ class BuildGridServer:
AuthContext
.
interceptor
=
self
.
__grpc_auth_interceptor
self
.
__grpc_executor
=
futures
.
ThreadPoolExecutor
(
max_workers
)
self
.
__grpc_server
=
grpc
.
server
(
self
.
__grpc_executor
)
self
.
__grpc_server
=
grpc
.
server
(
self
.
__grpc_executor
,
options
=
((
'
grpc.so_reuseport
'
,
0
),))
self
.
__main_loop
=
asyncio
.
get_event_loop
()
...
...
@@ -205,6 +207,9 @@ class BuildGridServer:
Returns:
int: Number of the bound port.
Raises:
PermissionDeniedError: If socket binding fails.
"""
if
credentials
is
not
None
:
self
.
__logger
.
info
(
"
Adding secure connection on: [%s]
"
,
address
)
...
...
@@ -214,6 +219,9 @@ class BuildGridServer:
self
.
__logger
.
info
(
"
Adding insecure connection on [%s]
"
,
address
)
port_number
=
self
.
__grpc_server
.
add_insecure_port
(
address
)
if
not
port_number
:
raise
PermissionDeniedError
(
"
Unable to configure socket
"
)
return
port_number
def
add_execution_instance
(
self
,
instance
,
instance_name
):
...
...
This diff is collapsed.
Click to expand it.