[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] building Darrenmeehan/register-on-upload against master#a7f375789bab1a4e4a291c963081a8ca7d2b6bd7 for pr-93180 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDarrenmeehan%2Fregister-on-upload" "/workspace/builds/worker-17/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-17/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Darrenmeehan/register-on-upload on toolchain a7f375789bab1a4e4a291c963081a8ca7d2b6bd7 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a7f375789bab1a4e4a291c963081a8ca7d2b6bd7" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-17/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-17/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" "+a7f375789bab1a4e4a291c963081a8ca7d2b6bd7" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/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:0cd99ca24d8e8c98e67c542213511d985b8778b5bdcbb160e038429496686047" "/opt/rustwide/cargo-home/bin/cargo" "+a7f375789bab1a4e4a291c963081a8ca7d2b6bd7" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6ef1427a5b35a2c3ead8ed9f6b0dd85a38ce37486a14c051b6d4aea4e14cf84b [INFO] running `Command { std: "docker" "start" "-a" "6ef1427a5b35a2c3ead8ed9f6b0dd85a38ce37486a14c051b6d4aea4e14cf84b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6ef1427a5b35a2c3ead8ed9f6b0dd85a38ce37486a14c051b6d4aea4e14cf84b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6ef1427a5b35a2c3ead8ed9f6b0dd85a38ce37486a14c051b6d4aea4e14cf84b", kill_on_drop: false }` [INFO] [stdout] 6ef1427a5b35a2c3ead8ed9f6b0dd85a38ce37486a14c051b6d4aea4e14cf84b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/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:0cd99ca24d8e8c98e67c542213511d985b8778b5bdcbb160e038429496686047" "/opt/rustwide/cargo-home/bin/cargo" "+a7f375789bab1a4e4a291c963081a8ca7d2b6bd7" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2ac7250048951d5f565a7d90223c0644d7ae85470b6b078fd9ba14c39a870147 [INFO] running `Command { std: "docker" "start" "-a" "2ac7250048951d5f565a7d90223c0644d7ae85470b6b078fd9ba14c39a870147", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Compiling libc v0.2.69 [INFO] [stderr] Compiling autocfg v1.0.0 [INFO] [stderr] Compiling cfg-if v0.1.10 [INFO] [stderr] Compiling unicode-xid v0.2.0 [INFO] [stderr] Compiling syn v1.0.38 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling slab v0.4.2 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling futures v0.1.29 [INFO] [stderr] Compiling cc v1.0.52 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling proc-macro-hack v0.5.15 [INFO] [stderr] Compiling either v1.5.3 [INFO] [stderr] Compiling maybe-uninit v2.0.0 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling serde_derive v1.0.115 [INFO] [stderr] Compiling proc-macro-nested v0.1.4 [INFO] [stderr] Compiling serde v1.0.115 [INFO] [stderr] Compiling arc-swap v0.4.6 [INFO] [stderr] Compiling typenum v1.12.0 [INFO] [stderr] Compiling futures-task v0.3.4 [INFO] [stderr] Compiling httparse v1.3.4 [INFO] [stderr] Compiling futures-io v0.3.4 [INFO] [stderr] Compiling pkg-config v0.3.17 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling ryu v1.0.4 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling serde_json v1.0.57 [INFO] [stderr] Compiling standback v0.2.8 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling openssl v0.10.29 [INFO] [stderr] Compiling tower-service v0.3.0 [INFO] [stderr] Compiling foreign-types-shared v0.1.1 [INFO] [stderr] Compiling byte-tools v0.3.1 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling failure_derive v0.1.7 [INFO] [stderr] Compiling subtle v1.0.0 [INFO] [stderr] Compiling regex-syntax v0.6.17 [INFO] [stderr] Compiling openssl-probe v0.1.2 [INFO] [stderr] Compiling rustc-demangle v0.1.16 [INFO] [stderr] Compiling opaque-debug v0.2.3 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling zeroize v1.1.0 [INFO] [stderr] Compiling fake-simd v0.1.2 [INFO] [stderr] Compiling hex v0.4.2 [INFO] [stderr] Compiling md5 v0.7.0 [INFO] [stderr] Compiling base64 v0.12.0 [INFO] [stderr] Compiling percent-encoding v2.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 futures-channel v0.3.4 [INFO] [stderr] Compiling proc-macro-error-attr v0.4.12 [INFO] [stderr] Compiling time v0.2.14 [INFO] [stderr] Compiling proc-macro-error v0.4.12 [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 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 block-padding v0.1.5 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling proc-macro2 v1.0.19 [INFO] [stderr] Compiling want v0.3.0 [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 smallvec v0.6.13 [INFO] [stderr] Compiling tracing-subscriber v0.2.5 [INFO] [stderr] Compiling quote v1.0.3 [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 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 openssl-sys v0.9.55 [INFO] [stderr] Compiling backtrace-sys v0.1.36 [INFO] [stderr] Compiling colored v1.9.3 [INFO] [stderr] Compiling bytes v0.4.12 [INFO] [stderr] Compiling tokio-sync v0.1.8 [INFO] [stderr] Compiling want v0.2.0 [INFO] [stderr] Compiling futures-cpupool v0.1.8 [INFO] [stderr] Compiling mio v0.6.21 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling dirs v2.0.2 [INFO] [stderr] Compiling aho-corasick v0.7.10 [INFO] [stderr] Compiling generic-array v0.12.3 [INFO] [stderr] Compiling tokio-io v0.1.13 [INFO] [stderr] Compiling http v0.1.21 [INFO] [stderr] Compiling string v0.2.1 [INFO] [stderr] Compiling tokio-buf v0.1.1 [INFO] [stderr] Compiling digest v0.8.1 [INFO] [stderr] Compiling crypto-mac v0.7.0 [INFO] [stderr] Compiling block-buffer v0.7.3 [INFO] [stderr] Compiling tokio-executor v0.1.10 [INFO] [stderr] Compiling crossbeam-queue v0.2.1 [INFO] [stderr] Compiling hmac v0.7.1 [INFO] [stderr] Compiling sha2 v0.8.1 [INFO] [stderr] Compiling mio-uds v0.6.7 [INFO] [stderr] Compiling tokio-codec v0.1.2 [INFO] [stderr] Compiling native-tls v0.2.4 [INFO] [stderr] Compiling tokio-reactor v0.1.12 [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 backtrace v0.3.46 [INFO] [stderr] Compiling tokio-threadpool v0.1.18 [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 regex v1.3.7 [INFO] [stderr] Compiling tokio-fs v0.1.7 [INFO] [stderr] Compiling tokio v0.1.22 [INFO] [stderr] Compiling http-body v0.1.0 [INFO] [stderr] Compiling h2 v0.1.26 [INFO] [stderr] Compiling synstructure v0.10.2 [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 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 time-macros v0.1.0 [INFO] [stderr] Compiling failure v0.1.7 [INFO] [stderr] Compiling tokio v0.2.22 [INFO] [stderr] Compiling genawaiter-proc-macro v0.99.1 [INFO] [stderr] Compiling futures-util v0.3.4 [INFO] [stderr] Compiling tracing v0.1.13 [INFO] [stderr] Compiling tracing-error v0.1.2 [INFO] [stderr] Compiling pin-project v0.4.9 [INFO] [stderr] Compiling tracing-futures v0.2.4 [INFO] [stderr] Compiling genawaiter v0.99.1 [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 hyper v0.13.5 [INFO] [stderr] Compiling chrono v0.4.11 [INFO] [stderr] Compiling simple_logger v1.11.0 [INFO] [stderr] Compiling hyper-tls v0.4.1 [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:33 [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 42.94s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: time-macros-impl v0.1.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "2ac7250048951d5f565a7d90223c0644d7ae85470b6b078fd9ba14c39a870147", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2ac7250048951d5f565a7d90223c0644d7ae85470b6b078fd9ba14c39a870147", kill_on_drop: false }` [INFO] [stdout] 2ac7250048951d5f565a7d90223c0644d7ae85470b6b078fd9ba14c39a870147 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-17/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:0cd99ca24d8e8c98e67c542213511d985b8778b5bdcbb160e038429496686047" "/opt/rustwide/cargo-home/bin/cargo" "+a7f375789bab1a4e4a291c963081a8ca7d2b6bd7" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8ed9798606eecc99f12dd4784bb42d3b6196b97e41e2a8482b4d5bce2447f227 [INFO] running `Command { std: "docker" "start" "-a" "8ed9798606eecc99f12dd4784bb42d3b6196b97e41e2a8482b4d5bce2447f227", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [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:33 [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.17s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: time-macros-impl v0.1.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4` [INFO] running `Command { std: "docker" "inspect" "8ed9798606eecc99f12dd4784bb42d3b6196b97e41e2a8482b4d5bce2447f227", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ed9798606eecc99f12dd4784bb42d3b6196b97e41e2a8482b4d5bce2447f227", kill_on_drop: false }` [INFO] [stdout] 8ed9798606eecc99f12dd4784bb42d3b6196b97e41e2a8482b4d5bce2447f227