Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send turbo version to run payload #4786

Merged
merged 2 commits into from May 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 20 additions & 8 deletions cli/internal/runsummary/spaces.go
Expand Up @@ -10,15 +10,22 @@ type spacesRunResponse struct {
URL string
}

type spacesClientSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
}

type spacesRunPayload struct {
StartTime int64 `json:"startTime,omitempty"` // when the run was started
EndTime int64 `json:"endTime,omitempty"` // when the run ended. we should never submit start and end at the same time.
Status string `json:"status,omitempty"` // Status is "running" or "completed"
Type string `json:"type,omitempty"` // hardcoded to "TURBO"
ExitCode int `json:"exitCode,omitempty"` // exit code for the full run
Command string `json:"command,omitempty"` // the thing that kicked off the turbo run
RepositoryPath string `json:"repositoryPath,omitempty"` // where the command was invoked from
Context string `json:"context,omitempty"` // the host on which this Run was executed (e.g. Github Action, Vercel, etc)
StartTime int64 `json:"startTime,omitempty"` // when the run was started
EndTime int64 `json:"endTime,omitempty"` // when the run ended. we should never submit start and end at the same time.
Status string `json:"status,omitempty"` // Status is "running" or "completed"
Type string `json:"type,omitempty"` // hardcoded to "TURBO"
ExitCode int `json:"exitCode,omitempty"` // exit code for the full run
Command string `json:"command,omitempty"` // the thing that kicked off the turbo run
RepositoryPath string `json:"repositoryPath,omitempty"` // where the command was invoked from
Context string `json:"context,omitempty"` // the host on which this Run was executed (e.g. Github Action, Vercel, etc)
Client spacesClientSummary `json:"client"` // Details about the turbo client

// TODO: we need to add these in
// originationUser string
Expand Down Expand Up @@ -64,6 +71,11 @@ func (rsm *Meta) newSpacesRunCreatePayload() *spacesRunPayload {
RepositoryPath: rsm.repoPath.ToString(),
Type: "TURBO",
Context: context,
Client: spacesClientSummary{
ID: "turbo",
Name: "Turbo",
Version: rsm.RunSummary.TurboVersion,
},
}
}

Expand Down