Skip to content

Commit

Permalink
Add priority field to workflow action config (#8356)
Browse files Browse the repository at this point in the history
Allow setting workflow action priorities, using the same semantics as
the `--remote_execution_priority` flag in bazel (priority only applies
within an org, not across orgs)
  • Loading branch information
bduffany authored Feb 10, 2025
1 parent 2e4a7f4 commit 95356d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions enterprise/server/workflow/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Action struct {
SelfHosted bool `yaml:"self_hosted"`
ContainerImage string `yaml:"container_image"`
ResourceRequests ResourceRequests `yaml:"resource_requests"`
Priority int `yaml:"priority"`
User string `yaml:"user"`
GitCleanExclude []string `yaml:"git_clean_exclude"`
GitFetchFilters []string `yaml:"git_fetch_filters"`
Expand Down
3 changes: 3 additions & 0 deletions enterprise/server/workflow/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,9 @@ func (ws *workflowService) attemptExecuteWorkflowAction(ctx context.Context, key
SkipCacheLookup: true,
ActionDigest: ad,
DigestFunction: repb.DigestFunction_BLAKE3,
ExecutionPolicy: &repb.ExecutionPolicy{
Priority: int32(workflowAction.Priority),
},
})
if err != nil {
return "", err
Expand Down

0 comments on commit 95356d1

Please sign in to comment.