Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions actionsrunner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ type RunnerJobRequestRef struct {
ID string `json:"id"`
RunnerRequestID string `json:"runner_request_id"`
RunServiceURL string `json:"run_service_url"`
BillingOwnerID string `json:"billing_owner_id,omitempty"`
}

type plainTextFormatter struct{}
Expand Down Expand Up @@ -493,8 +494,9 @@ func runJob(runnerenv RunnerEnvironment, joblock *sync.Mutex, vssConnection *pro
acquirejobURL.Path = path.Join(acquirejobURL.Path, "acquirejob")
vssConnection.TenantURL = runServiceURL
payload := &runservice.AcquireJobRequest{
StreamID: rjrr.RunnerRequestID,
JobMessageID: rjrr.RunnerRequestID,
StreamID: rjrr.RunnerRequestID,
JobMessageID: rjrr.RunnerRequestID,
BillingOwnerID: rjrr.BillingOwnerID,
}
requestErr = vssConnection.RequestWithContext2(jobctx, "POST", acquirejobURL.String(), "", payload, &src)
}
Expand Down
9 changes: 5 additions & 4 deletions actionsrunner/worker_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ type DefaultWorkerContext struct {
func (wc *DefaultWorkerContext) FinishJob(result string, outputs *map[string]protocol.VariableValue) {
if strings.EqualFold(wc.Message().MessageType, "RunnerJobRequest") {
payload := &run.CompleteJobRequest{
PlanID: wc.Message().Plan.PlanID,
JobID: wc.Message().JobID,
Conclusion: strings.ToLower(result),
Outputs: nil,
PlanID: wc.Message().Plan.PlanID,
JobID: wc.Message().JobID,
Conclusion: strings.ToLower(result),
Outputs: nil,
BillingOwnerID: wc.Message().BillingOwnerID,
}
if outputs != nil {
payload.Outputs = *outputs
Expand Down
1 change: 1 addition & 0 deletions protocol/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type AgentJobRequestMessage struct {
Variables map[string]VariableValue
Steps []ActionStep
FileTable []string
BillingOwnerID string `json:"billingOwnerId,omitempty"`
}

func (jobreq *AgentJobRequestMessage) GetConnection(name string) (*VssConnection, map[string]string, error) {
Expand Down
18 changes: 10 additions & 8 deletions protocol/run/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ import (
)

type AcquireJobRequest struct {
StreamID string `json:"streamId,omitempty"` // Deprecated: https://github.com/actions/runner/pull/2547
JobMessageID string `json:"jobMessageId"`
StreamID string `json:"streamId,omitempty"` // Deprecated: https://github.com/actions/runner/pull/2547
JobMessageID string `json:"jobMessageId"`
BillingOwnerID string `json:"billingOwnerId,omitempty"`
}

type CompleteJobRequest struct {
PlanID string `json:"planId,omitempty"`
JobID string `json:"jobId,omitempty"`
Conclusion string `json:"conclusion"`
Outputs map[string]protocol.VariableValue `json:"outputs,omitempty"`
StepResults []StepResult `json:"stepResults,omitempty"`
Annotations []Annotation `json:"annotations,omitempty"`
PlanID string `json:"planId,omitempty"`
JobID string `json:"jobId,omitempty"`
Conclusion string `json:"conclusion"`
Outputs map[string]protocol.VariableValue `json:"outputs,omitempty"`
StepResults []StepResult `json:"stepResults,omitempty"`
Annotations []Annotation `json:"annotations,omitempty"`
BillingOwnerID string `json:"billingOwnerId,omitempty"`
}

type RenewJobRequest struct {
Expand Down
Loading