Skip to content

Commit

Permalink
fix: improved some descriptions for starlark instructions (#2168)
Browse files Browse the repository at this point in the history
Kevin had given some feedback on #2147 ; this PR works on those
  • Loading branch information
h4ck3rk3y authored Feb 16, 2024
1 parent acdd42d commit d7fdbc5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (builtin *RunPythonCapabilities) FillPersistableAttributes(builder *enclave
}

func (builtin *RunPythonCapabilities) Description() string {
return "Running a one time python script"
return "Running Python script"
}

func setupRequiredPackages(ctx context.Context, builtin *RunPythonCapabilities) (*exec_result.ExecResult, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import (
const (
RunShBuiltinName = "run_sh"

defaultRunShImageName = "badouralix/curl-jq"
defaultRunShImageName = "badouralix/curl-jq"
shScriptPrintCharLimit = 80
runningShScriptPrefix = "Running sh script"
)

func NewRunShService(serviceNetwork service_network.ServiceNetwork, runtimeValueStore *runtime_value_store.RuntimeValueStore, nonBlockingMode bool) *kurtosis_plan_instruction.KurtosisPlanInstruction {
Expand Down Expand Up @@ -273,7 +275,10 @@ func (builtin *RunShCapabilities) FillPersistableAttributes(builder *enclave_pla
}

func (builtin *RunShCapabilities) Description() string {
return "Running a one time bash script"
if len(builtin.run) < shScriptPrintCharLimit {
return fmt.Sprintf("%v: `%v`", runningShScriptPrefix, builtin.run)
}
return runningShScriptPrefix
}

func getCommandToRun(builtin *RunShCapabilities) (string, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,5 @@ func (builtin *UploadFilesCapabilities) FillPersistableAttributes(builder *encla
}

func (builtin *UploadFilesCapabilities) Description() string {
return fmt.Sprintf("Uploading file '%v' to files articact '%v'", builtin.src, builtin.artifactName)
return fmt.Sprintf("Uploading file '%v' to files artifact '%v'", builtin.src, builtin.artifactName)
}

0 comments on commit d7fdbc5

Please sign in to comment.