Skip to content

Commit 8b0fa62

Browse files
authored
fix: no magic string replacement in python packages (#966)
## Description: Packages had magic string replacement now they don't
1 parent a6a118d commit 8b0fa62

File tree

1 file changed

+2
-11
lines changed
  • core/server/api_container/server/startosis_engine/kurtosis_instruction/tasks

1 file changed

+2
-11
lines changed

core/server/api_container/server/startosis_engine/kurtosis_instruction/tasks/run_python.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -334,20 +334,11 @@ func (builtin *RunPythonCapabilities) TryResolveWith(instructionsAreEqual bool,
334334
}
335335

336336
func setupRequiredPackages(ctx context.Context, builtin *RunPythonCapabilities) (*exec_result.ExecResult, error) {
337-
var maybePackagesWithRuntimeValuesReplaced []string
338-
for _, pythonPackage := range builtin.packages {
339-
maybePackageWithRuntimeValueReplaced, err := magic_string_helper.ReplaceRuntimeValueInString(pythonPackage, builtin.runtimeValueStore)
340-
if err != nil {
341-
return nil, stacktrace.Propagate(err, "an error occurred while replacing runtime value in a package passed to run_python")
342-
}
343-
maybePackagesWithRuntimeValuesReplaced = append(maybePackagesWithRuntimeValuesReplaced, maybePackageWithRuntimeValueReplaced)
344-
}
345-
346-
if len(maybePackagesWithRuntimeValuesReplaced) == 0 {
337+
if len(builtin.packages) == 0 {
347338
return nil, nil
348339
}
349340

350-
packageInstallationSubCommand := fmt.Sprintf("%v %v", pipInstallCmd, strings.Join(maybePackagesWithRuntimeValuesReplaced, spaceDelimiter))
341+
packageInstallationSubCommand := fmt.Sprintf("%v %v", pipInstallCmd, strings.Join(builtin.packages, spaceDelimiter))
351342
packageInstallationCommand := []string{shellWrapperCommand, "-c", packageInstallationSubCommand}
352343

353344
executionResult, err := builtin.serviceNetwork.RunExec(

0 commit comments

Comments
 (0)