-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Include logs when posting task summary #4642
Merged
mehulkar
merged 4 commits into
main
from
mehulkar/turbo-891-include-logs-when-posting-task-summary
Apr 20, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,30 +11,14 @@ type spacesRunResponse struct { | |
} | ||
|
||
type spacesRunPayload struct { | ||
// StartTime is when this run was started | ||
StartTime int64 `json:"startTime,omitempty"` | ||
|
||
// EndTime is when this run ended. We will never be submitting start and endtime at the same time. | ||
EndTime int64 `json:"endTime,omitempty"` | ||
|
||
// Status is | ||
Status string `json:"status,omitempty"` | ||
|
||
// Type should be hardcoded to TURBO | ||
Type string `json:"type,omitempty"` | ||
|
||
// ExitCode is the exit code for the full run | ||
ExitCode int `json:"exitCode,omitempty"` | ||
|
||
// The command that kicked off the turbo run | ||
Command string `json:"command,omitempty"` | ||
|
||
// RepositoryPath is the relative directory from the turborepo root to where | ||
// the command was invoked. | ||
RepositoryPath string `json:"repositoryPath,omitempty"` | ||
|
||
// Context is the host on which this Run was executed (e.g. Github Action, Vercel, etc) | ||
Context string `json:"context,omitempty"` | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no changes, just tightened it up by putting comments on the same line |
||
|
||
// TODO: we need to add these in | ||
// originationUser string | ||
|
@@ -64,6 +48,7 @@ type spacesTask struct { | |
ExitCode int `json:"exitCode,omitempty"` | ||
Dependencies []string `json:"dependencies,omitempty"` | ||
Dependents []string `json:"dependents,omitempty"` | ||
Logs string `json:"log"` | ||
} | ||
|
||
func (rsm *Meta) newSpacesRunCreatePayload() *spacesRunPayload { | ||
|
@@ -106,5 +91,6 @@ func newSpacesTaskPayload(taskSummary *TaskSummary) *spacesTask { | |
ExitCode: *taskSummary.Execution.exitCode, | ||
Dependencies: taskSummary.Dependencies, | ||
Dependents: taskSummary.Dependents, | ||
Logs: string(taskSummary.GetLogs()), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm using this correctly, but would appreciate another look