Skip to content

Commit

Permalink
Update justfile commands and clean Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
rsachdeva committed Sep 12, 2024
1 parent 2401b6f commit 2d5a4d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[env]
# https://doc.rust-lang.org/cargo/reference/config.html#env
# by_level_lambda_writer=debug for bindary being by_level_lambda_writer for lambda
RUST_LOG = { value = "drive_deposits_rest_types=debug,drive_deposits_proto_grpc_types=debug,drive_deposits_event_source=debug,drive_deposits_lambda_db_types=debug,drive_deposits_logs_lambda_target=debug,by_level_lambda_writer=debug,drive_deposits_lambda_dynamodb_reader=debug,by_level_lambda_reader=debug,drive_deposits_cal_types=debug,drive_deposits_check_cmd=debug,drive_deposits_grpc_server=debug,drive_deposits_rest_gateway_server=debug", force = true }


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ There is also a watch command that can be used to watch for changes in the code
`just localstack-watch-run-drive-deposits-check-cmd-valid-send-events`

For queries lambda, replace table name in localstack in
cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack-for-dynamodb
cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack recipe

Then can use cargo-lambda with dynamodb in localstack already populated with data:
`just cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack-for-dynamodb`
`just cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack`

And for actual cargo lambda apigw events
`just cargo-lambda-invoke-drive-deposits-lambda-dynamodb-reader-apigw-event-query-for-portfolios`
Expand Down
11 changes: 0 additions & 11 deletions drive-deposits-lambda-dynamodb-reader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@ name = "drive-deposits-lambda-dynamodb-reader"
version = "0.20.0"
edition = "2021"

# Starting in Rust 1.62 you can use `cargo add` to add dependencies
# to your project.
#
# If you're using an older Rust version,
# download cargo-edit(https://github.com/killercup/cargo-edit#installation)
# to install the `add` subcommand.
#
# Running `cargo add DEPENDENCY_NAME` will
# add the latest version of a dependency to the list,
# and it will keep the alphabetic ordering for you.

[dependencies]
aws-config = { version = "1.5.4", features = ["behavior-version-latest"] }
aws-sdk-dynamodb = "1.39.1"
Expand Down
18 changes: 9 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ udeps:
cargo +nightly udeps --workspace

build-drive-deposits-cal-types:
cd drive-deposits-cal-types
cd drive-deposits-cal-types && \
cargo build --package drive-deposits-cal-types

build-drive-deposits-proto-grpc-types:
cd drive-deposits-proto-grpc-types
cd drive-deposits-proto-grpc-types && \
cargo build --package drive-deposits-proto-grpc-types

build-drive-deposits-rest-types:
cd drive-deposits-rest-types
cd drive-deposits-rest-types && \
cargo build --package drive-deposits-rest-types

# See README.md for more details.
build-drive-deposits-check-cmd:
cd drive-deposits-check-cmd
cd drive-deposits-check-cmd && \
cargo build --package drive-deposits-check-cmd

build-drive-deposits-grpc-server:
cd drive-deposits-grpc-server
cd drive-deposits-grpc-server && \
cargo build --package drive-deposits-grpc-server

build-drive-deposits-rest-gateway-server:
cd drive-deposits-rest-gateway-server
cd drive-deposits-rest-gateway-server && \
cargo build --package drive-deposits-rest-gateway-server

# watching builds
Expand Down Expand Up @@ -191,7 +191,7 @@ cargo-lambda-build-drive-deposits-event-rules-lambda:
cargo lambda build

cargo-lambda-build-watching-drive-deposits-event-rules-lambda:
echo "building lambda function" && \
echo "build watching lambda function" && \
cd drive-deposits-logs-lambda-target && \
cargo watch -x "lambda build"

Expand Down Expand Up @@ -434,7 +434,7 @@ cargo-lambda-build-drive-deposits-lambda-dynamodb-reader:
cargo lambda build

cargo-lambda-build-watching-drive-deposits-lambda-dynamodb-reader:
USE_LOCALSTACK="true" echo "building lambda reader function" && \
USE_LOCALSTACK="true" echo "build watching lambda reader function" && \
cd drive-deposits-lambda-dynamodb-reader && \
cargo watch -x "lambda build"

Expand All @@ -445,7 +445,7 @@ cargo-lambda-build-watching-drive-deposits-lambda-dynamodb-reader:
# export USE_LOCALSTACK="true"
# echo $DRIVE_DEPOSITS_TABLE_NAME
# echo $USE_LOCALSTACK
cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack-for-dynamodb:
cargo-lambda-watch-drive-deposits-lambda-dynamodb-reader-localstack:
echo "watching lambda reader function" && \
cd drive-deposits-lambda-dynamodb-reader && \
export DRIVE_DEPOSITS_TABLE_NAME={{localstack_drive_deposit_table_name}} && \
Expand Down

0 comments on commit 2d5a4d1

Please sign in to comment.