Skip to content

Commit 6088af3

Browse files
Merge branch 'main' into run-service-telemetry-environmenturl-complete-job
2 parents 08f10b0 + e5d27da commit 6088af3

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

actionsrunner/runner.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ type RunnerJobRequestRef struct {
434434
ID string `json:"id"`
435435
RunnerRequestID string `json:"runner_request_id"`
436436
RunServiceURL string `json:"run_service_url"`
437+
BillingOwnerID string `json:"billing_owner_id,omitempty"`
437438
}
438439

439440
type plainTextFormatter struct{}
@@ -493,8 +494,9 @@ func runJob(runnerenv RunnerEnvironment, joblock *sync.Mutex, vssConnection *pro
493494
acquirejobURL.Path = path.Join(acquirejobURL.Path, "acquirejob")
494495
vssConnection.TenantURL = runServiceURL
495496
payload := &runservice.AcquireJobRequest{
496-
StreamID: rjrr.RunnerRequestID,
497-
JobMessageID: rjrr.RunnerRequestID,
497+
StreamID: rjrr.RunnerRequestID,
498+
JobMessageID: rjrr.RunnerRequestID,
499+
BillingOwnerID: rjrr.BillingOwnerID,
498500
}
499501
requestErr = vssConnection.RequestWithContext2(jobctx, "POST", acquirejobURL.String(), "", payload, &src)
500502
}

actionsrunner/worker_context.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ type DefaultWorkerContext struct {
4040
func (wc *DefaultWorkerContext) FinishJob(result string, outputs *map[string]protocol.VariableValue) {
4141
if strings.EqualFold(wc.Message().MessageType, "RunnerJobRequest") {
4242
payload := &run.CompleteJobRequest{
43-
PlanID: wc.Message().Plan.PlanID,
44-
JobID: wc.Message().JobID,
45-
Conclusion: strings.ToLower(result),
46-
Outputs: nil,
43+
PlanID: wc.Message().Plan.PlanID,
44+
JobID: wc.Message().JobID,
45+
Conclusion: strings.ToLower(result),
46+
Outputs: nil,
47+
BillingOwnerID: wc.Message().BillingOwnerID,
4748
}
4849
if outputs != nil {
4950
payload.Outputs = *outputs

protocol/misc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ type AgentJobRequestMessage struct {
105105
Variables map[string]VariableValue
106106
Steps []ActionStep
107107
FileTable []string
108+
BillingOwnerID string `json:"billingOwnerId,omitempty"`
108109
}
109110

110111
func (jobreq *AgentJobRequestMessage) GetConnection(name string) (*VssConnection, map[string]string, error) {

protocol/run/contracts.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import (
99
)
1010

1111
type AcquireJobRequest struct {
12-
StreamID string `json:"streamId,omitempty"` // Deprecated: https://github.com/actions/runner/pull/2547
13-
JobMessageID string `json:"jobMessageId"`
12+
StreamID string `json:"streamId,omitempty"` // Deprecated: https://github.com/actions/runner/pull/2547
13+
JobMessageID string `json:"jobMessageId"`
14+
BillingOwnerID string `json:"billingOwnerId,omitempty"`
1415
}
1516

1617
type Telemetry struct {
@@ -27,6 +28,7 @@ type CompleteJobRequest struct {
2728
Annotations []Annotation `json:"annotations,omitempty"`
2829
Telemetry []Telemetry `json:"telemetry,omitempty"`
2930
EnvironmentURL string `json:"environmentUrl,omitempty"`
31+
BillingOwnerID string `json:"billingOwnerId,omitempty"`
3032
}
3133

3234
type RenewJobRequest struct {

0 commit comments

Comments
 (0)