Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Exe-Unit] Fix Supervisor args after recent merges #716

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions agent/provider/src/execution/task_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,6 @@ impl TaskRunner {
args.extend(["--requestor-pub-key", req_pub_key.as_ref()].iter());
}

args.push("service-bus");
args.push(activity_id);
args.push(activity::local::BUS_ID);

let args = args.iter().map(ToString::to_string).collect();

log::info!(
Expand Down
36 changes: 18 additions & 18 deletions exe-unit/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,38 @@ use ya_utils_path::normalize_path;
#[structopt(global_setting = clap::AppSettings::ColoredHelp)]
#[structopt(version = ya_compile_time_utils::crate_version_commit!())]
struct Cli {
/// Agreement file path
#[structopt(long, short)]
agreement: PathBuf,

/// Working directory
#[structopt(long, short)]
work_dir: PathBuf,

/// Common cache directory
#[structopt(long, short)]
cache_dir: PathBuf,

/// Runtime binary path
#[structopt(long, short)]
binary: PathBuf,
/// Hand off resource cap limiting to the Runtime
#[structopt(long = "cap-handoff", parse(from_flag = std::ops::Not::not))]
#[structopt(
long = "cap-handoff",
parse(from_flag = std::ops::Not::not),
set = clap::ArgSettings::Global,
)]
supervise_caps: bool,
/// Enclave secret key used in secure communication
#[structopt(long, env = "EXE_UNIT_SEC_KEY", hide_env_values = true)]
#[structopt(
long,
env = "EXE_UNIT_SEC_KEY",
hide_env_values = true,
set = clap::ArgSettings::Global,
)]
sec_key: Option<String>,
/// Requestor public key used in secure communication
#[structopt(long, env = "EXE_UNIT_REQUESTOR_PUB_KEY", hide_env_values = true)]
#[structopt(
long,
env = "EXE_UNIT_REQUESTOR_PUB_KEY",
hide_env_values = true,
set = clap::ArgSettings::Global,
)]
requestor_pub_key: Option<String>,
#[structopt(subcommand)]
command: Command,
}

#[derive(structopt::StructOpt, Debug)]
#[structopt(global_setting = clap::AppSettings::DeriveDisplayOrder)]
enum Command {
/// Execute commands from file
FromFile {
Expand Down Expand Up @@ -116,9 +119,6 @@ fn run() -> anyhow::Result<()> {
#[allow(unused_mut)]
let mut cli: Cli = Cli::from_args();

if !cli.agreement.exists() {
bail!("Agreement file does not exist: {}", cli.agreement.display());
}
if !cli.binary.exists() {
bail!("Runtime binary does not exist: {}", cli.binary.display());
}
Expand Down