diff --git a/core/server/api_container/server/startosis_engine/builtins/import_module/import_module.go b/core/server/api_container/server/startosis_engine/builtins/import_module/import_module.go index 2bc7c02860..40daa464b8 100644 --- a/core/server/api_container/server/startosis_engine/builtins/import_module/import_module.go +++ b/core/server/api_container/server/startosis_engine/builtins/import_module/import_module.go @@ -48,7 +48,7 @@ func NewImportModule( IsOptional: false, ZeroValueProvider: builtin_argument.ZeroValueProvider[starlark.String], Validator: func(value starlark.Value) *startosis_errors.InterpretationError { - return builtin_argument.LocatorValidator(value, packageId, ModuleFileArgName) + return builtin_argument.NonEmptyString(value, ModuleFileArgName) }, }, }, diff --git a/core/server/api_container/server/startosis_engine/builtins/read_file/read_file.go b/core/server/api_container/server/startosis_engine/builtins/read_file/read_file.go index 687fc6d467..6ab3d5197a 100644 --- a/core/server/api_container/server/startosis_engine/builtins/read_file/read_file.go +++ b/core/server/api_container/server/startosis_engine/builtins/read_file/read_file.go @@ -29,7 +29,7 @@ func NewReadFileHelper( IsOptional: false, ZeroValueProvider: builtin_argument.ZeroValueProvider[starlark.String], Validator: func(value starlark.Value) *startosis_errors.InterpretationError { - return builtin_argument.LocatorValidator(value, packageId, SrcArgName) + return builtin_argument.NonEmptyString(value, SrcArgName) }, }, }, diff --git a/core/server/api_container/server/startosis_engine/kurtosis_instruction/upload_files/upload_files.go b/core/server/api_container/server/startosis_engine/kurtosis_instruction/upload_files/upload_files.go index 57da6c303c..cee28132b0 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_instruction/upload_files/upload_files.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_instruction/upload_files/upload_files.go @@ -46,7 +46,7 @@ func NewUploadFiles( IsOptional: false, ZeroValueProvider: builtin_argument.ZeroValueProvider[starlark.String], Validator: func(value starlark.Value) *startosis_errors.InterpretationError { - return builtin_argument.LocatorValidator(value, packageId, SrcArgName) + return builtin_argument.NonEmptyString(value, SrcArgName) }, }, { diff --git a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go index 119227df5c..2ec22580d4 100644 --- a/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go +++ b/core/server/api_container/server/startosis_engine/kurtosis_starlark_framework/builtin_argument/validators.go @@ -110,16 +110,3 @@ func DurationOrNone(value starlark.Value, attributeName string) *startosis_error } return nil } - -func LocatorValidator(locatorStarlarkValue starlark.Value, packageId string, argNameForLogging string) *startosis_errors.InterpretationError { - - if err := NonEmptyString(locatorStarlarkValue, argNameForLogging); err != nil { - return err - } - - _, ok := locatorStarlarkValue.(starlark.String) - if !ok { - return startosis_errors.NewInterpretationError("Value for '%s' was expected to be a starlark.String but was '%s'", argNameForLogging, reflect.TypeOf(locatorStarlarkValue)) - } - return nil -}