-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud deployment patch #54
base: v2-develop
Are you sure you want to change the base?
Conversation
3877f2e
to
24df7b0
Compare
423a4ed
to
38a9229
Compare
fix: profile overflow issue
feat: better memory viewer
fix: cli agent command
173bd5a
to
02ab50a
Compare
mistakes were made
ee8eaa0
to
4aaa5b7
Compare
--profile solfunmeme_dev \ | ||
--region us-east-2 \ | ||
--document-name "UpdateEliza" \ | ||
--document-version "\$LATEST" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using $LATEST version in production is risky as it may lead to unexpected behavior. Should specify explicit version number for better control and predictability.
@@ -0,0 +1,8 @@ | |||
|
|||
aws codebuild start-build --region us-east-2 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script doesn't verify AWS CLI installation or proper authentication before execution. Could fail silently or with unclear error messages.
#pnpm start --characters=$(ls -1p characters/*.json | paste -sd,) | ||
#fi | ||
#exec "$@" | ||
bun start # --characters=$(ls -1p characters/*.json | paste -sd,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script assumes 'bun' is installed and available in the system path without checking its existence or providing a fallback mechanism, which could lead to runtime failures.
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
set -x | ||
#if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
strace -f -o /opt/agent/strace.log -s99999 node "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script unconditionally runs strace without checking directory permissions or existence of /opt/agent. This could fail in environments where the directory doesn't exist or lacks write permissions.
apt update | ||
apt install -y strace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running apt commands without checking for root privileges can fail. Should include 'sudo' or verify script is running as root using 'if [ "$(id -u)" -ne 0 ]; then echo 'Must be root' >&2; exit 1; fi'
|
||
|
||
#strace -f -o /opt/agent/strace.log -s99999 node CMD ["pnpm", "start", "--characters=characters/eliza.character.json"] | ||
strace -f -o /opt/agent/strace.log -s99999 bun start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No verification that 'bun' is installed before attempting to use it. Should check if bun exists with 'command -v bun >/dev/null 2>&1 || { echo "bun not found"; exit 1; }'
@@ -0,0 +1,20 @@ | |||
|
|||
nvm use 23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node.js version 23 doesn't exist yet. The latest LTS version is 20.x, and the latest current version is 21.x. Using a non-existent version will cause the script to fail.
pnpm build | ||
popd | ||
|
||
pushd node_modules/.pnpm/better-sqlite3@11.8.1/node_modules/better-sqlite3/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding package version in path makes script brittle. If better-sqlite3 version changes, script will fail. Should use dynamic path resolution or version variables.
|
||
# This script expects AGENT_NAME to be set to something like "tine_agent" | ||
|
||
mkdir -p "/var/run/agent/secrets/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory creation lacks permission check and error handling. Script might fail silently if it lacks permissions to create directory in /var/run, which is typically restricted.
echo "" > "/var/run/agent/secrets/env" # blank the file | ||
|
||
# Fetch all variables with the prefix and name them the same as the variable minus agent name underscore | ||
for key in $(aws ssm describe-parameters --query 'Parameters[?starts_with(Name, `'"${AGENT_NAME}"'_`)].Name' --output text); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWS CLI command execution lacks error handling. If AWS credentials are invalid or network issues occur, the script will continue with empty parameters.
@trag-bot didn't find any issues in the code! ✅✨ |
Pull request summary
|
parent 777ee94
author mike dupont mike.dupont@introspector.local 1741968993 -0400 committer mike dupont mike.dupont@introspector.local 1742076983 -0400
revert
Create test.yaml
Update test.yaml
Update tauri-ci.yml
Update test.yaml
Update integrationTests.yaml
Update pr.yaml
bun start
bun
update scripts
update
Update image.yaml
adding docker
one phase commit
Relates to
Risks
Background
What does this PR do?
What kind of change is this?
Documentation changes needed?
Testing
Where should a reviewer start?
Detailed testing steps