Skip to content

Commit

Permalink
scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Aug 24, 2024
1 parent de2101b commit 12b410a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 18 deletions.
6 changes: 5 additions & 1 deletion scripts/build_test_container.sh
Original file line number Diff line number Diff line change
@@ -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 \
.
19 changes: 11 additions & 8 deletions scripts/dd_weave_server.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions scripts/dd_weave_server_replay.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 8 additions & 4 deletions scripts/weave_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion scripts/weave_server_replay.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion scripts/weave_server_test.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 12b410a

Please sign in to comment.