Skip to content
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

Open
wants to merge 182 commits into
base: v2-develop
Choose a base branch
from
Open

cloud deployment patch #54

wants to merge 182 commits into from

Conversation

jmikedupont2
Copy link
Member

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

@jmikedupont2 jmikedupont2 force-pushed the feature/v2/docker branch 2 times, most recently from 3877f2e to 24df7b0 Compare March 16, 2025 19:21
tcm390 and others added 14 commits March 20, 2025 23:31

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: profile overflow issue

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: better memory viewer

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: cli agent command
mistakes were made
--profile solfunmeme_dev \
--region us-east-2 \
--document-name "UpdateEliza" \
--document-version "\$LATEST" \
Copy link

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 \
Copy link

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,)
Copy link

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 "$@"
Copy link

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.

Comment on lines +9 to +10
apt update
apt install -y strace
Copy link

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
Copy link

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
Copy link

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/
Copy link

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/"
Copy link

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
Copy link

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.

Copy link

trag-bot bot commented Mar 21, 2025

@trag-bot didn't find any issues in the code! ✅✨

Copy link

trag-bot bot commented Mar 21, 2025

Pull request summary

  • Added logging configuration options to the .env.example file for better control over log levels.
  • Introduced new API keys for GROQ and embedding models in the .env.example file to support additional functionalities.
  • Updated the GitHub Actions workflow for building and pushing Docker images to use a more recent version of the docker/build-push-action.
  • Modified the PR title check workflow to allow manual triggering via workflow_dispatch.
  • Changed the environment variable for TURBO_TEAM in multiple workflows to use secrets instead of variables for enhanced security.
  • Added a new workflow for building, pushing, and deploying to Phala Cloud, including environment variable configurations.
  • Created a new test workflow for building and pushing Docker images, ensuring consistent testing practices.
  • Updated the .gitignore file to include additional patterns for ignoring temporary and build files.
  • Added submodule configurations for various plugins in the .gitmodules file to manage dependencies more effectively.
  • Updated the README.md to include new environment settings and instructions for using the updated features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet