Skip to content

Commit

Permalink
match comment style with other comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Peaorl committed Aug 10, 2020
1 parent 601fe24 commit 41a78d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/apis/pipeline/v1beta1/task_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ type Step struct {
Script string `json:"script,omitempty"`
}

// Sidecar has nearly the same data structure as Step, consisting of a Container and an optional Script, but does not have the ability to timeout.
// Sidecar embeds the Container type, which allows it to include fields not
// provided by Container.
type Sidecar struct {
corev1.Container `json:",inline"`

Expand Down
4 changes: 2 additions & 2 deletions pkg/pod/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func convertScripts(shellImage string, steps []v1beta1.Step, sidecars []v1beta1.
}

convertedStepContainers := convertListOfSteps(steps, &placeScriptsInit, &placeScripts, "script")
// As the Sidecar type will divert slightly from the Step type in https://github.com/tektoncd/pipeline/issues/1690 and https://github.com/tektoncd/pipeline/pull/3013,
// while convertListOfSteps operates on overlapping fields, Sidecar is converted into Step by copying the overlapping fields between the types to avoid code duplication
// convertListOfSteps operates on overlapping fields across Step and Sidecar, hence a conversion
// from Sidecar into Step
sideCarSteps := []v1beta1.Step{}
for _, step := range sidecars {
sidecarStep := v1beta1.Step{
Expand Down

0 comments on commit 41a78d5

Please sign in to comment.