From d3d8d4194c6b34e53632079bdefb178e285b5d7e Mon Sep 17 00:00:00 2001 From: Andrew Truong Date: Sat, 24 Aug 2024 16:06:46 -0400 Subject: [PATCH] format: scripts --- scripts/build_test_container.sh | 6 +++++- scripts/dd_weave_server.sh | 19 +++++++++++-------- scripts/dd_weave_server_replay.sh | 11 ++++++++--- scripts/weave_server.sh | 12 ++++++++---- scripts/weave_server_replay.sh | 6 +++++- scripts/weave_server_test.sh | 9 ++++++++- 6 files changed, 45 insertions(+), 18 deletions(-) diff --git a/scripts/build_test_container.sh b/scripts/build_test_container.sh index d7a705eac39a..7c02c00baecb 100755 --- a/scripts/build_test_container.sh +++ b/scripts/build_test_container.sh @@ -1 +1,5 @@ -docker buildx build --platform linux/amd64 -t us-east4-docker.pkg.dev/weave-support-367421/weave-images/weave-test:latest . -f Dockerfile.test +docker buildx build \ + --platform linux/amd64 \ + -t us-east4-docker.pkg.dev/weave-support-367421/weave-images/weave-test:latest \ + -f Dockerfile.test \ + . diff --git a/scripts/dd_weave_server.sh b/scripts/dd_weave_server.sh index c1c12ea833a4..7556d1bdb5e8 100755 --- a/scripts/dd_weave_server.sh +++ b/scripts/dd_weave_server.sh @@ -1,13 +1,16 @@ #!/bin/sh -DD_SERVICE="weave-python" DD_ENV="dev-$(whoami)" DD_LOGS_INJECTION=true \ - DD_TRACE_PROPAGATION_STYLE_EXTRACT=b3,datadog \ - DD_TRACE_PROPAGATION_STYLE_INJECT=b3,datadog \ - WEAVE_DISABLE_ANALYTICS=true \ - WEAVE_SERVER_ENABLE_LOGGING=true \ - FLASK_ENV=development \ - FLASK_APP=weave.weave_server \ - ddtrace-run flask run --port 9994 +DD_SERVICE="weave-python" +DD_ENV="dev-$(whoami)" +DD_LOGS_INJECTION=true +DD_TRACE_PROPAGATION_STYLE_EXTRACT=b3,datadog +DD_TRACE_PROPAGATION_STYLE_INJECT=b3,datadog +WEAVE_DISABLE_ANALYTICS=true +WEAVE_SERVER_ENABLE_LOGGING=true +FLASK_ENV=development +FLASK_APP=weave.weave_server + +ddtrace-run flask run --port 9994 # This runs with the datadog profiler on, but it is expensive! # I noticed a 2x increase in query time for some queries diff --git a/scripts/dd_weave_server_replay.sh b/scripts/dd_weave_server_replay.sh index 34039457b217..590a0b38bd8f 100755 --- a/scripts/dd_weave_server_replay.sh +++ b/scripts/dd_weave_server_replay.sh @@ -1,5 +1,10 @@ #!/bin/sh -WEAVE_SERVER_DEBUG=true \ -DD_SERVICE="weave-python" DD_ENV="dev-$(whoami)" DD_LOGS_INJECTION=true \ - WEAVE_SERVER_ENABLE_LOGGING=true FLASK_APP=weave.weave_server ddtrace-run flask run --port 9994 +WEAVE_SERVER_DEBUG=true +DD_SERVICE="weave-python" +DD_ENV="dev-$(whoami)" +DD_LOGS_INJECTION=true +WEAVE_SERVER_ENABLE_LOGGING=true +FLASK_APP=weave.weave_server + +ddtrace-run flask run --port 9994 diff --git a/scripts/weave_server.sh b/scripts/weave_server.sh index a2cebdd4134b..91bc19fccd61 100755 --- a/scripts/weave_server.sh +++ b/scripts/weave_server.sh @@ -2,7 +2,11 @@ # We could set WEAVE_BACKEND_HOST=http://localhost:9994/__weave but the frontend dev server # automatically forwards so it shouldn't be necessary. -( - source ./config/auth_modes.sh - WEAVE_DISABLE_ANALYTICS=true WEAVE_SERVER_ENABLE_LOGGING=true FLASK_DEBUG=1 FLASK_APP=weave.weave_server flask run --port 9994 -) +source ./config/auth_modes.sh + +WEAVE_DISABLE_ANALYTICS=true +WEAVE_SERVER_ENABLE_LOGGING=true +FLASK_DEBUG=1 +FLASK_APP=weave.weave_server + +flask run --port 9994 diff --git a/scripts/weave_server_replay.sh b/scripts/weave_server_replay.sh index d8242a8841e1..41814fb476d6 100755 --- a/scripts/weave_server_replay.sh +++ b/scripts/weave_server_replay.sh @@ -1,3 +1,7 @@ #!/bin/sh -WEAVE_SERVER_DEBUG=true WEAVE_SERVER_ENABLE_LOGGING=true FLASK_APP=weave.weave_server flask run --port 9994 +export WEAVE_SERVER_DEBUG=true +export WEAVE_SERVER_ENABLE_LOGGING=true +export FLASK_APP=weave.weave_server + +flask run --port 9994 diff --git a/scripts/weave_server_test.sh b/scripts/weave_server_test.sh index 3f084bfcb632..366ad390ac9e 100755 --- a/scripts/weave_server_test.sh +++ b/scripts/weave_server_test.sh @@ -1,3 +1,10 @@ #!/bin/sh -WEAVE_CI=true WEAVE_DISABLE_ANALYTICS=true WEAVE_SERVER_DEBUG=true WEAVE_SERVER_ENABLE_LOGGING=true WEAVE_WANDB_GQL_NUM_TIMEOUT_RETRIES=1 FLASK_APP=weave.weave_server flask run --port 9994 $@ +export WEAVE_CI=true +export WEAVE_DISABLE_ANALYTICS=true +export WEAVE_SERVER_DEBUG=true +export WEAVE_SERVER_ENABLE_LOGGING=true +export WEAVE_WANDB_GQL_NUM_TIMEOUT_RETRIES=1 +export FLASK_APP=weave.weave_server + +flask run --port 9994 "$@"