[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#432e145bd5a974c5b6f4dd9b352891bd7502b69d for pr-87041 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDarrenmeehan%2Fregister-on-upload" "/workspace/builds/worker-4/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Darrenmeehan/register-on-upload on toolchain 432e145bd5a974c5b6f4dd9b352891bd7502b69d [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-4/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-4/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" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] dcd8ce3450b430a646e56ede1b044569ea8b8ddfc1c270b9288c5daa8141da1a [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "dcd8ce3450b430a646e56ede1b044569ea8b8ddfc1c270b9288c5daa8141da1a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dcd8ce3450b430a646e56ede1b044569ea8b8ddfc1c270b9288c5daa8141da1a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dcd8ce3450b430a646e56ede1b044569ea8b8ddfc1c270b9288c5daa8141da1a", kill_on_drop: false }` [INFO] [stdout] dcd8ce3450b430a646e56ede1b044569ea8b8ddfc1c270b9288c5daa8141da1a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 688baebd5f8b0bfe107cb1a7e3d7264a7a32fef7214f7490d2b065c43c8b2ff9 [INFO] running `Command { std: "docker" "start" "-a" "688baebd5f8b0bfe107cb1a7e3d7264a7a32fef7214f7490d2b065c43c8b2ff9", kill_on_drop: false }` [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 slab v0.4.2 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling itoa v0.4.5 [INFO] [stderr] Compiling version_check v0.9.1 [INFO] [stderr] Compiling bytes v0.5.4 [INFO] [stderr] Compiling arc-swap v0.4.6 [INFO] [stderr] Compiling pkg-config v0.3.17 [INFO] [stderr] Compiling httparse v1.3.4 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling ryu v1.0.4 [INFO] [stderr] Compiling standback v0.2.8 [INFO] [stderr] Compiling tower-service v0.3.0 [INFO] [stderr] Compiling foreign-types-shared v0.1.1 [INFO] [stderr] Compiling openssl v0.10.29 [INFO] [stderr] Compiling native-tls v0.2.4 [INFO] [stderr] Compiling openssl-probe v0.1.2 [INFO] [stderr] Compiling failure_derive v0.1.7 [INFO] [stderr] Compiling zeroize v1.1.0 [INFO] [stderr] Compiling xml-rs v0.8.3 [INFO] [stderr] Compiling genawaiter-macro v0.99.1 [INFO] [stderr] Compiling rusoto v0.24.2 [INFO] [stderr] Compiling tokio-sync v0.1.8 [INFO] [stderr] Compiling backtrace-sys v0.1.36 [INFO] [stderr] Compiling thread_local v1.0.1 [INFO] [stderr] Compiling tracing-core v0.1.10 [INFO] [stderr] Compiling sharded-slab v0.0.9 [INFO] [stderr] Compiling lock_api v0.3.4 [INFO] [stderr] Compiling foreign-types v0.3.2 [INFO] [stderr] Compiling proc-macro2 v1.0.19 [INFO] [stderr] Compiling http v0.2.1 [INFO] [stderr] Compiling net2 v0.2.33 [INFO] [stderr] Compiling time v0.1.43 [INFO] [stderr] Compiling signal-hook-registry v1.2.0 [INFO] [stderr] Compiling dirs-sys v0.3.4 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Compiling indexmap v1.3.2 [INFO] [stderr] Compiling memoffset v0.5.4 [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Compiling parking_lot_core v0.6.2 [INFO] [stderr] Compiling parking_lot v0.9.0 [INFO] [stderr] Compiling rusoto_core v0.44.0 [INFO] [stderr] Compiling hyper v0.12.35 [INFO] [stderr] Compiling smallvec v0.6.13 [INFO] [stderr] Compiling futures-cpupool v0.1.8 [INFO] [stderr] Compiling proc-macro-error-attr v0.4.12 [INFO] [stderr] Compiling proc-macro-error v0.4.12 [INFO] [stderr] Compiling time v0.2.14 [INFO] [stderr] Compiling want v0.3.0 [INFO] [stderr] Compiling want v0.2.0 [INFO] [stderr] Compiling colored v1.9.3 [INFO] [stderr] Compiling dirs v2.0.2 [INFO] [stderr] Compiling mio v0.6.21 [INFO] [stderr] Compiling openssl-sys v0.9.55 [INFO] [stderr] Compiling aho-corasick v0.7.10 [INFO] [stderr] Compiling tracing-subscriber v0.2.5 [INFO] [stderr] Compiling quote v1.0.3 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling bytes v0.4.12 [INFO] [stderr] Compiling block-buffer v0.7.3 [INFO] [stderr] Compiling backtrace v0.3.46 [INFO] [stderr] Compiling mio-uds v0.6.7 [INFO] [stderr] Compiling sha2 v0.8.1 [INFO] [stderr] Compiling tokio-executor v0.1.10 [INFO] [stderr] Compiling crossbeam-queue v0.2.1 [INFO] [stderr] Compiling regex v1.3.7 [INFO] [stderr] Compiling tokio-io v0.1.13 [INFO] [stderr] Compiling http v0.1.21 [INFO] [stderr] Compiling tokio-buf v0.1.1 [INFO] [stderr] Compiling string v0.2.1 [INFO] [stderr] Compiling tokio-timer v0.2.13 [INFO] [stderr] Compiling tokio-current-thread v0.1.7 [INFO] [stderr] Compiling crossbeam-deque v0.7.3 [INFO] [stderr] Compiling http-body v0.3.1 [INFO] [stderr] Compiling tokio-threadpool v0.1.18 [INFO] [stderr] Compiling tokio-reactor v0.1.12 [INFO] [stderr] Compiling tokio-codec v0.1.2 [INFO] [stderr] Compiling tokio-udp v0.1.6 [INFO] [stderr] Compiling tokio-uds v0.2.6 [INFO] [stderr] Compiling tokio-tcp v0.1.4 [INFO] [stderr] Compiling tokio-fs v0.1.7 [INFO] [stderr] Compiling tokio v0.1.22 [INFO] [stderr] Compiling synstructure v0.10.2 [INFO] [stderr] Compiling http-body v0.1.0 [INFO] [stderr] Compiling h2 v0.1.26 [INFO] [stderr] Compiling lambda_runtime_errors_derive v0.1.1 [INFO] [stderr] Compiling syn-mid v0.5.0 [INFO] [stderr] Compiling synstructure v0.12.3 [INFO] [stderr] Compiling serde_derive v1.0.115 [INFO] [stderr] Compiling tokio-macros v0.2.5 [INFO] [stderr] Compiling futures-macro v0.3.4 [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 genawaiter-proc-macro v0.99.1 [INFO] [stderr] Compiling tokio v0.2.22 [INFO] [stderr] Compiling time-macros v0.1.0 [INFO] [stderr] Compiling futures-util v0.3.4 [INFO] [stderr] Compiling failure v0.1.7 [INFO] [stderr] Compiling tracing v0.1.13 [INFO] [stderr] Compiling tracing-error v0.1.2 [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 hyper-tls v0.4.1 [INFO] [stderr] Compiling simple_logger v1.11.0 [INFO] [stderr] Compiling rusoto_credential v0.44.0 [INFO] [stderr] Compiling lambda_runtime_errors v0.1.1 [INFO] [stderr] Compiling lambda v0.1.0 (https://github.com/awslabs/aws-lambda-rust-runtime/?branch=master#ed3fd167) [INFO] [stderr] Compiling lambda_runtime_client v0.2.2 [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 31s [INFO] running `Command { std: "docker" "inspect" "688baebd5f8b0bfe107cb1a7e3d7264a7a32fef7214f7490d2b065c43c8b2ff9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "688baebd5f8b0bfe107cb1a7e3d7264a7a32fef7214f7490d2b065c43c8b2ff9", kill_on_drop: false }` [INFO] [stdout] 688baebd5f8b0bfe107cb1a7e3d7264a7a32fef7214f7490d2b065c43c8b2ff9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 591bcb2b1af5557e9c2ece8091b2be98a26ca941a42eec912b3c79152e060bd2 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "591bcb2b1af5557e9c2ece8091b2be98a26ca941a42eec912b3c79152e060bd2", 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 2.54s [INFO] running `Command { std: "docker" "inspect" "591bcb2b1af5557e9c2ece8091b2be98a26ca941a42eec912b3c79152e060bd2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "591bcb2b1af5557e9c2ece8091b2be98a26ca941a42eec912b3c79152e060bd2", kill_on_drop: false }` [INFO] [stdout] 591bcb2b1af5557e9c2ece8091b2be98a26ca941a42eec912b3c79152e060bd2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "test" "--frozen", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] ca40cd805b116d99d5ae889b338cad9341028c525526e88e611ab1f08202b2f7 [INFO] running `Command { std: "docker" "start" "-a" "ca40cd805b116d99d5ae889b338cad9341028c525526e88e611ab1f08202b2f7", 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.14s [INFO] [stderr] Running unittests (/opt/rustwide/target/debug/deps/register_on_upload-67fd9269f272054e) [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" "ca40cd805b116d99d5ae889b338cad9341028c525526e88e611ab1f08202b2f7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ca40cd805b116d99d5ae889b338cad9341028c525526e88e611ab1f08202b2f7", kill_on_drop: false }` [INFO] [stdout] ca40cd805b116d99d5ae889b338cad9341028c525526e88e611ab1f08202b2f7