[wip] single runtime handling
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
//! This keeps the pack directory clean and read-only.
|
||||
|
||||
use attune_common::models::runtime::{
|
||||
DependencyConfig, EnvironmentConfig, InterpreterConfig, RuntimeExecutionConfig,
|
||||
DependencyConfig, EnvironmentConfig, InlineExecutionConfig, InterpreterConfig,
|
||||
RuntimeExecutionConfig,
|
||||
};
|
||||
use attune_worker::runtime::process::ProcessRuntime;
|
||||
use attune_worker::runtime::ExecutionContext;
|
||||
@@ -26,6 +27,7 @@ fn make_python_config() -> RuntimeExecutionConfig {
|
||||
args: vec!["-u".to_string()],
|
||||
file_extension: Some(".py".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: Some(EnvironmentConfig {
|
||||
env_type: "virtualenv".to_string(),
|
||||
dir_name: ".venv".to_string(),
|
||||
@@ -59,6 +61,7 @@ fn make_shell_config() -> RuntimeExecutionConfig {
|
||||
args: vec![],
|
||||
file_extension: Some(".sh".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
//! Tests that verify stdout/stderr are properly truncated when they exceed
|
||||
//! configured size limits, preventing OOM issues with large output.
|
||||
|
||||
use attune_common::models::runtime::{InterpreterConfig, RuntimeExecutionConfig};
|
||||
use attune_common::models::runtime::{
|
||||
InlineExecutionConfig, InterpreterConfig, RuntimeExecutionConfig,
|
||||
};
|
||||
use attune_worker::runtime::process::ProcessRuntime;
|
||||
use attune_worker::runtime::{ExecutionContext, Runtime, ShellRuntime};
|
||||
use std::collections::HashMap;
|
||||
@@ -17,6 +19,7 @@ fn make_python_process_runtime(packs_base_dir: PathBuf) -> ProcessRuntime {
|
||||
args: vec!["-u".to_string()],
|
||||
file_extension: Some(".py".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
@@ -270,6 +273,7 @@ async fn test_shell_process_runtime_truncation() {
|
||||
args: vec![],
|
||||
file_extension: Some(".sh".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
//! These tests verify that secrets are NOT exposed in process environment
|
||||
//! or command-line arguments, ensuring secure secret passing via stdin.
|
||||
|
||||
use attune_common::models::runtime::{InterpreterConfig, RuntimeExecutionConfig};
|
||||
use attune_common::models::runtime::{
|
||||
InlineExecutionConfig, InterpreterConfig, RuntimeExecutionConfig,
|
||||
};
|
||||
use attune_worker::runtime::process::ProcessRuntime;
|
||||
use attune_worker::runtime::shell::ShellRuntime;
|
||||
use attune_worker::runtime::{ExecutionContext, Runtime};
|
||||
@@ -18,6 +20,7 @@ fn make_python_process_runtime(packs_base_dir: PathBuf) -> ProcessRuntime {
|
||||
args: vec!["-u".to_string()],
|
||||
file_extension: Some(".py".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
@@ -440,6 +443,7 @@ echo "PASS: No secrets in environment"
|
||||
args: vec![],
|
||||
file_extension: Some(".sh".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
@@ -520,6 +524,7 @@ print(json.dumps({"leaked": leaked}))
|
||||
args: vec!["-u".to_string()],
|
||||
file_extension: Some(".py".to_string()),
|
||||
},
|
||||
inline_execution: InlineExecutionConfig::default(),
|
||||
environment: None,
|
||||
dependencies: None,
|
||||
env_vars: std::collections::HashMap::new(),
|
||||
|
||||
Reference in New Issue
Block a user