MCPcopy Create free account
hub / github.com/featureform/featureform / ExecuteScript

Method ExecuteScript

provider/k8s.go:244–258  ·  view source on GitHub ↗
(envVars map[string]string, args *metadata.KubernetesArgs)

Source from the content-addressed store, hash-verified

242}
243
244func (local LocalExecutor) ExecuteScript(envVars map[string]string, args *metadata.KubernetesArgs) error {
245 envVars["MODE"] = "local"
246 for key, value := range envVars {
247 if err := os.Setenv(key, value); err != nil {
248 return fmt.Errorf("could not set env variable: %s: %w", key, err)
249 }
250 }
251 cmd := exec.Command("python3", local.scriptPath)
252 cmd.Stdout = os.Stdout
253 cmd.Stderr = os.Stderr
254 if err := cmd.Run(); err != nil {
255 return fmt.Errorf("could not execute python function: %v", err)
256 }
257 return nil
258}
259
260type LocalExecutorConfig struct {
261 ScriptPath string

Callers 1

TestExecutorRunLocalFunction · 0.95

Calls 1

RunMethod · 0.65

Tested by 1

TestExecutorRunLocalFunction · 0.76