[INFO] cloning repository https://github.com/Darrenmeehan/register-on-upload [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Darrenmeehan/register-on-upload" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDarrenmeehan%2Fregister-on-upload", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDarrenmeehan%2Fregister-on-upload'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3d5c5a6be0e0908ad3252487970ef17f488ba503 [INFO] testing Darrenmeehan/register-on-upload against master#99e3aef02079e9c10583638520cd0c134dc3a01d for pr-85530 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDarrenmeehan%2Fregister-on-upload" "/workspace/builds/worker-14/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-14/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Darrenmeehan/register-on-upload on toolchain 99e3aef02079e9c10583638520cd0c134dc3a01d [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-14/source/.cargo/config [INFO] started tweaking git repo https://github.com/Darrenmeehan/register-on-upload [INFO] finished tweaking git repo https://github.com/Darrenmeehan/register-on-upload [INFO] tweaked toml for git repo https://github.com/Darrenmeehan/register-on-upload written to /workspace/builds/worker-14/source/Cargo.toml [INFO] crate git repo https://github.com/Darrenmeehan/register-on-upload already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 221aefda54dafdb14ded86f57499acd38cbbf136ab6bd75aa2977dd10be619d9 [INFO] running `Command { std: "docker" "start" "-a" "221aefda54dafdb14ded86f57499acd38cbbf136ab6bd75aa2977dd10be619d9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "221aefda54dafdb14ded86f57499acd38cbbf136ab6bd75aa2977dd10be619d9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "221aefda54dafdb14ded86f57499acd38cbbf136ab6bd75aa2977dd10be619d9", kill_on_drop: false }` [INFO] [stdout] 221aefda54dafdb14ded86f57499acd38cbbf136ab6bd75aa2977dd10be619d9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 05bf37191fa27a8d4363612ffc1fe67d5b523bfb51d7830abd29a2acc6773683 [INFO] running `Command { std: "docker" "start" "-a" "05bf37191fa27a8d4363612ffc1fe67d5b523bfb51d7830abd29a2acc6773683", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.69 [INFO] [stderr] Compiling autocfg v1.0.0 [INFO] [stderr] Compiling unicode-xid v0.2.0 [INFO] [stderr] Compiling syn v1.0.38 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling fnv v1.0.6 [INFO] [stderr] Compiling semver-parser v0.7.0 [INFO] [stderr] Compiling futures v0.1.29 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling cc v1.0.52 [INFO] [stderr] Compiling proc-macro-hack v0.5.15 [INFO] [stderr] Compiling futures-core v0.3.4 [INFO] [stderr] Compiling either v1.5.3 [INFO] [stderr] Compiling maybe-uninit v2.0.0 [INFO] [stderr] Compiling proc-macro-nested v0.1.4 [INFO] [stderr] Compiling futures-sink v0.3.4 [INFO] [stderr] Compiling arc-swap v0.4.6 [INFO] [stderr] Compiling futures-task v0.3.4 [INFO] [stderr] Compiling pkg-config v0.3.17 [INFO] [stderr] Compiling futures-io v0.3.4 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling standback v0.2.8 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling failure_derive v0.1.7 [INFO] [stderr] Compiling regex-syntax v0.6.17 [INFO] [stderr] Compiling rustc-demangle v0.1.16 [INFO] [stderr] Compiling zeroize v1.1.0 [INFO] [stderr] Compiling base64 v0.12.0 [INFO] [stderr] Compiling genawaiter-macro v0.99.1 [INFO] [stderr] Compiling xml-rs v0.8.3 [INFO] [stderr] Compiling rusoto v0.24.2 [INFO] [stderr] Compiling lock_api v0.3.4 [INFO] [stderr] Compiling proc-macro-error-attr v0.4.12 [INFO] [stderr] Compiling tracing-core v0.1.10 [INFO] [stderr] Compiling time v0.2.14 [INFO] [stderr] Compiling proc-macro-error v0.4.12 [INFO] [stderr] Compiling sharded-slab v0.0.9 [INFO] [stderr] Compiling http v0.2.1 [INFO] [stderr] Compiling proc-macro2 v1.0.19 [INFO] [stderr] Compiling futures-channel v0.3.4 [INFO] [stderr] Compiling sha2 v0.8.1 [INFO] [stderr] Compiling semver v0.9.0 [INFO] [stderr] Compiling smallvec v0.6.13 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Compiling indexmap v1.3.2 [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Compiling memoffset v0.5.4 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Compiling want v0.3.0 [INFO] [stderr] Compiling rustc_version v0.2.3 [INFO] [stderr] Compiling quote v1.0.3 [INFO] [stderr] Compiling aho-corasick v0.7.10 [INFO] [stderr] Compiling tracing-subscriber v0.2.5 [INFO] [stderr] Compiling parking_lot_core v0.6.2 [INFO] [stderr] Compiling parking_lot v0.9.0 [INFO] [stderr] Compiling hyper v0.12.35 [INFO] [stderr] Compiling rusoto_core v0.44.0 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling openssl-sys v0.9.55 [INFO] [stderr] Compiling backtrace-sys v0.1.36 [INFO] [stderr] Compiling iovec v0.1.4 [INFO] [stderr] Compiling num_cpus v1.13.0 [INFO] [stderr] Compiling net2 v0.2.33 [INFO] [stderr] Compiling signal-hook-registry v1.2.0 [INFO] [stderr] Compiling time v0.1.43 [INFO] [stderr] Compiling dirs-sys v0.3.4 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling colored v1.9.3 [INFO] [stderr] Compiling bytes v0.4.12 [INFO] [stderr] Compiling dirs v2.0.2 [INFO] [stderr] Compiling crossbeam-queue v0.2.1 [INFO] [stderr] Compiling mio v0.6.21 [INFO] [stderr] Compiling crossbeam-deque v0.7.3 [INFO] [stderr] Compiling http v0.1.21 [INFO] [stderr] Compiling string v0.2.1 [INFO] [stderr] Compiling tokio-executor v0.1.10 [INFO] [stderr] Compiling tokio-io v0.1.13 [INFO] [stderr] Compiling tokio-sync v0.1.8 [INFO] [stderr] Compiling tokio-buf v0.1.1 [INFO] [stderr] Compiling want v0.2.0 [INFO] [stderr] Compiling futures-cpupool v0.1.8 [INFO] [stderr] Compiling openssl v0.10.29 [INFO] [stderr] Compiling native-tls v0.2.4 [INFO] [stderr] Compiling tokio-threadpool v0.1.18 [INFO] [stderr] Compiling tokio-timer v0.2.13 [INFO] [stderr] Compiling tokio-current-thread v0.1.7 [INFO] [stderr] Compiling backtrace v0.3.46 [INFO] [stderr] Compiling tokio-codec v0.1.2 [INFO] [stderr] Compiling mio-uds v0.6.7 [INFO] [stderr] Compiling tokio-reactor v0.1.12 [INFO] [stderr] Compiling tokio-tcp v0.1.4 [INFO] [stderr] Compiling tokio-udp v0.1.6 [INFO] [stderr] Compiling tokio-uds v0.2.6 [INFO] [stderr] Compiling tokio-fs v0.1.7 [INFO] [stderr] Compiling http-body v0.3.1 [INFO] [stderr] Compiling regex v1.3.7 [INFO] [stderr] Compiling tokio v0.1.22 [INFO] [stderr] Compiling h2 v0.1.26 [INFO] [stderr] Compiling http-body v0.1.0 [INFO] [stderr] Compiling synstructure v0.10.2 [INFO] [stderr] Compiling syn-mid v0.5.0 [INFO] [stderr] Compiling synstructure v0.12.3 [INFO] [stderr] Compiling lambda_runtime_errors_derive v0.1.1 [INFO] [stderr] Compiling futures-macro v0.3.4 [INFO] [stderr] Compiling serde_derive v1.0.115 [INFO] [stderr] Compiling tokio-macros v0.2.5 [INFO] [stderr] Compiling pin-project-internal v0.4.9 [INFO] [stderr] Compiling time-macros-impl v0.1.1 [INFO] [stderr] Compiling async-trait v0.1.30 [INFO] [stderr] Compiling tracing-attributes v0.1.7 [INFO] [stderr] Compiling lambda-attributes v0.1.0 (https://github.com/awslabs/aws-lambda-rust-runtime/?branch=master#ed3fd167) [INFO] [stderr] Compiling failure v0.1.7 [INFO] [stderr] Compiling time-macros v0.1.0 [INFO] [stderr] Compiling tokio v0.2.22 [INFO] [stderr] Compiling genawaiter-proc-macro v0.99.1 [INFO] [stderr] Compiling tracing v0.1.13 [INFO] [stderr] Compiling tracing-error v0.1.2 [INFO] [stderr] Compiling futures-util v0.3.4 [INFO] [stderr] Compiling genawaiter v0.99.1 [INFO] [stderr] Compiling pin-project v0.4.9 [INFO] [stderr] Compiling tracing-futures v0.2.4 [INFO] [stderr] Compiling futures-executor v0.3.4 [INFO] [stderr] Compiling futures v0.3.4 [INFO] [stderr] Compiling tokio-util v0.3.1 [INFO] [stderr] Compiling tokio-tls v0.3.0 [INFO] [stderr] Compiling h2 v0.2.4 [INFO] [stderr] Compiling serde v1.0.115 [INFO] [stderr] Compiling hyper v0.13.5 [INFO] [stderr] Compiling serde_json v1.0.57 [INFO] [stderr] Compiling chrono v0.4.11 [INFO] [stderr] Compiling simple_logger v1.11.0 [INFO] [stderr] Compiling lambda_runtime_errors v0.1.1 [INFO] [stderr] Compiling lambda_runtime_client v0.2.2 [INFO] [stderr] Compiling rusoto_credential v0.44.0 [INFO] [stderr] Compiling hyper-tls v0.4.1 [INFO] [stderr] Compiling lambda v0.1.0 (https://github.com/awslabs/aws-lambda-rust-runtime/?branch=master#ed3fd167) [INFO] [stderr] Compiling rusoto_signature v0.44.0 [INFO] [stderr] Compiling rusoto_dynamodb v0.44.0 [INFO] [stderr] Compiling register-on-upload v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `#[tokio::main] [INFO] [stdout] async fn main(event: Value) -> Result { [INFO] [stdout] let logger = simple_logger::init(); [INFO] [stdout] match logger { [INFO] [stdout] Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stdout] Err(error) => println!("Something went wrong"), [INFO] [stdout] }; [INFO] [stdout] debug!("event={}", event); [INFO] [stdout] [INFO] [stdout] let table_name = get_dynamodb_table_name(); [INFO] [stdout] [INFO] [stdout] // FIXME Add support for more than one record.. [INFO] [stdout] let image_information = get_image_information(&event); [INFO] [stdout] let id = event["Records"][0]["s3"]["object"]["key"].to_string(); [INFO] [stdout] debug!("id={}", id); [INFO] [stdout] [INFO] [stdout] let details = AttributeValue { [INFO] [stdout] s: Option::from(image_information), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] let id_value = AttributeValue { [INFO] [stdout] s: Option::from(id), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] [INFO] [stdout] // FIXME Hardcoded value for now is ok as currently all photos are uploaded by me [INFO] [stdout] // Adding stubbed value to enable API queries required by UI.. [INFO] [stdout] let owner = AttributeValue { [INFO] [stdout] s: Option::from("darren.meehan".to_string()), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] [INFO] [stdout] let mut item: HashMap = HashMap::new(); [INFO] [stdout] item.insert("id".to_string(), id_value); [INFO] [stdout] item.insert("Details".to_string(), details); [INFO] [stdout] item.insert("OwnedBy".to_string(), owner); [INFO] [stdout] let input = PutItemInput { [INFO] [stdout] item, [INFO] [stdout] table_name, [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] let client = DynamoDbClient::new(Region::EuWest1); [INFO] [stdout] let response = client.put_item(input).await; [INFO] [stdout] [INFO] [stdout] // FIXME Return response [INFO] [stdout] let response = match response { [INFO] [stdout] Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stdout] // FIXME Fail Lambda run on error [INFO] [stdout] Err(error) => panic!("Problem adding to DB: {}", error), [INFO] [stdout] }; [INFO] [stdout] Ok(event) [INFO] [stdout] }` [INFO] [stdout] --> src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / #[tokio::main] [INFO] [stdout] 14 | | async fn main(event: Value) -> Result { [INFO] [stdout] 15 | | let logger = simple_logger::init(); [INFO] [stdout] 16 | | match logger { [INFO] [stdout] ... | [INFO] [stdout] 63 | | Ok(event) [INFO] [stdout] 64 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `simple_logger::init`: Please use the Builder pattern instead. [INFO] [stdout] --> src/main.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | let logger = simple_logger::init(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `logger` [INFO] [stdout] --> src/main.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_logger` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `error` [INFO] [stdout] --> src/main.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | Err(error) => println!("Something went wrong"), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `response` [INFO] [stdout] --> src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let response = match response { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_response` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry` [INFO] [stdout] --> src/main.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_entry` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2m 02s [INFO] running `Command { std: "docker" "inspect" "05bf37191fa27a8d4363612ffc1fe67d5b523bfb51d7830abd29a2acc6773683", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "05bf37191fa27a8d4363612ffc1fe67d5b523bfb51d7830abd29a2acc6773683", kill_on_drop: false }` [INFO] [stdout] 05bf37191fa27a8d4363612ffc1fe67d5b523bfb51d7830abd29a2acc6773683 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2ce10c3d8ba82ad15d2340eeb2784556e55fb9c9e9e4c68f1c247d0b83fc4d84 [INFO] running `Command { std: "docker" "start" "-a" "2ce10c3d8ba82ad15d2340eeb2784556e55fb9c9e9e4c68f1c247d0b83fc4d84", kill_on_drop: false }` [INFO] [stderr] Compiling register-on-upload v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `#[tokio::main] [INFO] [stdout] async fn main(event: Value) -> Result { [INFO] [stdout] let logger = simple_logger::init(); [INFO] [stdout] match logger { [INFO] [stdout] Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stdout] Err(error) => println!("Something went wrong"), [INFO] [stdout] }; [INFO] [stdout] debug!("event={}", event); [INFO] [stdout] [INFO] [stdout] let table_name = get_dynamodb_table_name(); [INFO] [stdout] [INFO] [stdout] // FIXME Add support for more than one record.. [INFO] [stdout] let image_information = get_image_information(&event); [INFO] [stdout] let id = event["Records"][0]["s3"]["object"]["key"].to_string(); [INFO] [stdout] debug!("id={}", id); [INFO] [stdout] [INFO] [stdout] let details = AttributeValue { [INFO] [stdout] s: Option::from(image_information), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] let id_value = AttributeValue { [INFO] [stdout] s: Option::from(id), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] [INFO] [stdout] // FIXME Hardcoded value for now is ok as currently all photos are uploaded by me [INFO] [stdout] // Adding stubbed value to enable API queries required by UI.. [INFO] [stdout] let owner = AttributeValue { [INFO] [stdout] s: Option::from("darren.meehan".to_string()), [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] [INFO] [stdout] let mut item: HashMap = HashMap::new(); [INFO] [stdout] item.insert("id".to_string(), id_value); [INFO] [stdout] item.insert("Details".to_string(), details); [INFO] [stdout] item.insert("OwnedBy".to_string(), owner); [INFO] [stdout] let input = PutItemInput { [INFO] [stdout] item, [INFO] [stdout] table_name, [INFO] [stdout] ..Default::default() [INFO] [stdout] }; [INFO] [stdout] let client = DynamoDbClient::new(Region::EuWest1); [INFO] [stdout] let response = client.put_item(input).await; [INFO] [stdout] [INFO] [stdout] // FIXME Return response [INFO] [stdout] let response = match response { [INFO] [stdout] Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stdout] // FIXME Fail Lambda run on error [INFO] [stdout] Err(error) => panic!("Problem adding to DB: {}", error), [INFO] [stdout] }; [INFO] [stdout] Ok(event) [INFO] [stdout] }` [INFO] [stdout] --> src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / #[tokio::main] [INFO] [stdout] 14 | | async fn main(event: Value) -> Result { [INFO] [stdout] 15 | | let logger = simple_logger::init(); [INFO] [stdout] 16 | | match logger { [INFO] [stdout] ... | [INFO] [stdout] 63 | | Ok(event) [INFO] [stdout] 64 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `simple_logger::init`: Please use the Builder pattern instead. [INFO] [stdout] --> src/main.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | let logger = simple_logger::init(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `logger` [INFO] [stdout] --> src/main.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_logger` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `error` [INFO] [stdout] --> src/main.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | Err(error) => println!("Something went wrong"), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `response` [INFO] [stdout] --> src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let response = match response { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_response` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry` [INFO] [stdout] --> src/main.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_entry` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 1.22s [INFO] running `Command { std: "docker" "inspect" "2ce10c3d8ba82ad15d2340eeb2784556e55fb9c9e9e4c68f1c247d0b83fc4d84", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2ce10c3d8ba82ad15d2340eeb2784556e55fb9c9e9e4c68f1c247d0b83fc4d84", kill_on_drop: false }` [INFO] [stdout] 2ce10c3d8ba82ad15d2340eeb2784556e55fb9c9e9e4c68f1c247d0b83fc4d84 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+99e3aef02079e9c10583638520cd0c134dc3a01d" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 96802f315e43e6e2ed1149f96e2579c0d244cdf3544d9bb70667502976461bd3 [INFO] running `Command { std: "docker" "start" "-a" "96802f315e43e6e2ed1149f96e2579c0d244cdf3544d9bb70667502976461bd3", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `#[tokio::main] [INFO] [stderr] async fn main(event: Value) -> Result { [INFO] [stderr] let logger = simple_logger::init(); [INFO] [stderr] match logger { [INFO] [stderr] Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stderr] Err(error) => println!("Something went wrong"), [INFO] [stderr] }; [INFO] [stderr] debug!("event={}", event); [INFO] [stderr] [INFO] [stderr] let table_name = get_dynamodb_table_name(); [INFO] [stderr] [INFO] [stderr] // FIXME Add support for more than one record.. [INFO] [stderr] let image_information = get_image_information(&event); [INFO] [stderr] let id = event["Records"][0]["s3"]["object"]["key"].to_string(); [INFO] [stderr] debug!("id={}", id); [INFO] [stderr] [INFO] [stderr] let details = AttributeValue { [INFO] [stderr] s: Option::from(image_information), [INFO] [stderr] ..Default::default() [INFO] [stderr] }; [INFO] [stderr] let id_value = AttributeValue { [INFO] [stderr] s: Option::from(id), [INFO] [stderr] ..Default::default() [INFO] [stderr] }; [INFO] [stderr] [INFO] [stderr] // FIXME Hardcoded value for now is ok as currently all photos are uploaded by me [INFO] [stderr] // Adding stubbed value to enable API queries required by UI.. [INFO] [stderr] let owner = AttributeValue { [INFO] [stderr] s: Option::from("darren.meehan".to_string()), [INFO] [stderr] ..Default::default() [INFO] [stderr] }; [INFO] [stderr] [INFO] [stderr] let mut item: HashMap = HashMap::new(); [INFO] [stderr] item.insert("id".to_string(), id_value); [INFO] [stderr] item.insert("Details".to_string(), details); [INFO] [stderr] item.insert("OwnedBy".to_string(), owner); [INFO] [stderr] let input = PutItemInput { [INFO] [stderr] item, [INFO] [stderr] table_name, [INFO] [stderr] ..Default::default() [INFO] [stderr] }; [INFO] [stderr] let client = DynamoDbClient::new(Region::EuWest1); [INFO] [stderr] let response = client.put_item(input).await; [INFO] [stderr] [INFO] [stderr] // FIXME Return response [INFO] [stderr] let response = match response { [INFO] [stderr] Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stderr] // FIXME Fail Lambda run on error [INFO] [stderr] Err(error) => panic!("Problem adding to DB: {}", error), [INFO] [stderr] }; [INFO] [stderr] Ok(event) [INFO] [stderr] }` [INFO] [stderr] --> src/main.rs:13:1 [INFO] [stderr] | [INFO] [stderr] 13 | / #[tokio::main] [INFO] [stderr] 14 | | async fn main(event: Value) -> Result { [INFO] [stderr] 15 | | let logger = simple_logger::init(); [INFO] [stderr] 16 | | match logger { [INFO] [stderr] ... | [INFO] [stderr] 63 | | Ok(event) [INFO] [stderr] 64 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated function `simple_logger::init`: Please use the Builder pattern instead. [INFO] [stderr] --> src/main.rs:15:18 [INFO] [stderr] | [INFO] [stderr] 15 | let logger = simple_logger::init(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(deprecated)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `logger` [INFO] [stderr] --> src/main.rs:17:12 [INFO] [stderr] | [INFO] [stderr] 17 | Ok(logger) => debug!("Logger has been setup successfully"), [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_logger` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `error` [INFO] [stderr] --> src/main.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | Err(error) => println!("Something went wrong"), [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_error` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `response` [INFO] [stderr] --> src/main.rs:58:9 [INFO] [stderr] | [INFO] [stderr] 58 | let response = match response { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_response` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `entry` [INFO] [stderr] --> src/main.rs:59:12 [INFO] [stderr] | [INFO] [stderr] 59 | Ok(entry) => debug!("Added entry"), // FIXME Figure out how to log entry [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_entry` [INFO] [stderr] [INFO] [stderr] warning: 6 warnings emitted [INFO] [stderr] [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.17s [INFO] [stderr] Running unittests (/opt/rustwide/target/debug/deps/register_on_upload-4791f9692f334350) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "96802f315e43e6e2ed1149f96e2579c0d244cdf3544d9bb70667502976461bd3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "96802f315e43e6e2ed1149f96e2579c0d244cdf3544d9bb70667502976461bd3", kill_on_drop: false }` [INFO] [stdout] 96802f315e43e6e2ed1149f96e2579c0d244cdf3544d9bb70667502976461bd3