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
380a8b2a
Commit
380a8b2a
authored
6 years ago
by
finnball
Browse files
Options
Downloads
Patches
Plain Diff
Do not store in action cache if non-zero exit code.
parent
09fcfc26
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildgrid/server/scheduler.py
+7
-3
7 additions, 3 deletions
buildgrid/server/scheduler.py
with
7 additions
and
3 deletions
buildgrid/server/scheduler.py
+
7
−
3
View file @
380a8b2a
...
...
@@ -27,6 +27,7 @@ from google.protobuf import any_pb2
from
buildgrid.server._exceptions
import
NotFoundError
from
buildgrid._protos.build.bazel.remote.execution.v2
import
remote_execution_pb2
from
buildgrid._protos.google.longrunning
import
operations_pb2
from
.job
import
ExecuteStage
,
LeaseState
...
...
@@ -84,10 +85,13 @@ class Scheduler:
def
job_complete
(
self
,
name
,
result
):
job
=
self
.
jobs
[
name
]
job
.
result
=
result
job
.
update_execute_stage
(
ExecuteStage
.
COMPLETED
)
action_result
=
remote_execution_pb2
.
ActionResult
()
result
.
Unpack
(
action_result
)
job
.
result
=
action_result
if
not
job
.
do_not_cache
and
self
.
_action_cache
is
not
None
:
self
.
_action_cache
.
update_action_result
(
job
.
action_digest
,
result
)
if
action_result
.
exit_code
:
self
.
_action_cache
.
update_action_result
(
job
.
action_digest
,
result
)
job
.
update_execute_stage
(
ExecuteStage
.
COMPLETED
)
def
get_operations
(
self
):
response
=
operations_pb2
.
ListOperationsResponse
()
...
...
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