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

Fixes to get the process_executor CLI tool working again. #10435

Merged
merged 1 commit into from
Jul 23, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/rust/engine/fs/store/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ impl ByteStore {
serverset,
headers: oauth_bearer_token
.iter()
.map(|t| (String::from("authorization"), format!("Bearer {}", t)))
.map(|t| {
(
String::from("authorization"),
format!("Bearer {}", t.trim()),
)
})
.collect(),
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl CommandRunner {
if let Some(oauth_bearer_token) = oauth_bearer_token {
headers.insert(
String::from("authorization"),
format!("Bearer {}", oauth_bearer_token),
format!("Bearer {}", oauth_bearer_token.trim()),
);
}

Expand Down
3 changes: 3 additions & 0 deletions src/rust/engine/process_executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use process_execution::{
};
use store::{BackoffConfig, Store};
use tokio::runtime::Handle;
use workunit_store::WorkunitStore;

/// A binary which takes args of format:
/// process_executor --env=FOO=bar --env=SOME=value --input-digest=abc123 --input-digest-length=80
Expand All @@ -54,6 +55,8 @@ use tokio::runtime::Handle;
#[tokio::main]
async fn main() {
env_logger::init();
let workunit_store = WorkunitStore::new(false);
workunit_store.init_thread_state(None);

let args = App::new("process_executor")
.arg(
Expand Down