Fix deployment infrastructure and improve health checks#54
Conversation
…eploying Neo4j writers, streamlining the configuration.
…n template - Introduced AWS_STACK_NAME export in the setup script for Kuzu writers to enhance environment variable management. - Updated both writer configurations to ensure consistency in environment variable exports.
…raph API integration - Changed the default secret name from "kuzu" to "graph-api" to align with the new naming convention for the graph API. - Added a TODO comment to consider moving the secret management to a dedicated secrets manager module in the future.
…ect new naming convention for graph API
…'latest' for consistent environment configuration
- Updated the GitHub Actions workflow to use a universal startup script for container management. - Modified the Kuzu writer userdata script to persist ECR-related environment variables for health check restarts. - Enhanced the script to source persisted variables and retrieve EC2 metadata dynamically for improved configuration management.
- Moved demo scripts to a new section for better organization. - Updated the command structure for demo scripts to ensure consistency and clarity. - Renamed parameters in duckdb-query commands for improved readability.
…nd environment management - Updated the handle-deployment-failure action to retrieve failed steps directly from job details, streamlining error reporting. - Modified the refresh-ecs action to include an additional output key for cluster name retrieval, enhancing flexibility. - Expanded the kuzu-writer userdata script to persist more environment variables, ensuring comprehensive configuration for container restarts.
…s and input validation - Added health check port determination based on backend type in refresh-graph actions. - Implemented input validation for backend, node type, and environment in refresh-graph-containers action. - Updated container naming logic to be backend-agnostic, simplifying deployment configurations. - Persisted additional environment variables in the Neo4j writer userdata script for better container management.
|
@claude please review this PR |
|
Claude finished @jfrench9's task —— View job PR Review CompleteI've completed a thorough review of PR #54. Here's my comprehensive feedback: Overall AssessmentThis PR makes significant improvements to deployment infrastructure, health checks, and environment management. The changes are well-structured and address real operational concerns. However, I've identified several issues that should be addressed before merging. Critical Issues1. Missing Environment Variable in Container Refresh (
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| \"#!/bin/bash\", | ||
| \"set -e\", | ||
| \"echo \\\"🔄 Starting container refresh for $CONTAINER_NAME\\\"\", | ||
| \"echo \\\"Loading environment variables...\\\"\", | ||
| \"if [ -f /etc/environment ]; then set -a; source /etc/environment; set +a; fi\", | ||
| \"echo \\\"Pulling latest image...\\\"\", | ||
| \"aws ecr get-login-password --region ${{ inputs.aws-region }} | docker login --username AWS --password-stdin ${ECR_URI%/*}\", | ||
| \"docker pull ${ECR_URI}:latest\", | ||
| \"docker pull ${ECR_URI}:${{ inputs.environment }}\", | ||
| \"export ECR_IMAGE=\\\"${ECR_URI}:${{ inputs.environment }}\\\"\", | ||
| \"echo \\\"Stopping existing container...\\\"\", | ||
| \"docker stop $CONTAINER_NAME || true\", | ||
| \"docker rm $CONTAINER_NAME || true\", |
There was a problem hiding this comment.
Stop legacy graph containers before renaming to graph-api
The refresh action and common runner now hard-code the container name to graph-api/graph-api-shared and only call docker stop/docker rm on those names. Existing instances launched before this change still have running containers named kuzu-writer or neo4j-writer, so the first refresh after deploying this commit will not stop the old container. When run-graph-container.sh tries to start a new container on the same ports, Docker will fail with a "port already allocated" error and the update never succeeds. The refresh command should also remove the previous backend-specific names (or perform a rename) so that the rollout does not fail on active hosts.
Useful? React with 👍 / 👎.
…I integration - Updated CloudWatch namespace in kuzu-writer and neo4j-writer scripts to a unified format for all graph backends. - Enhanced error handling in Volume Manager Lambda invocation for better debugging and logging. - Centralized API key retrieval in the auth middleware to use a unified secrets manager for Kuzu and Neo4j. - Improved health check logic in run-graph-container script for clearer output and configuration management.
Summary
This PR addresses critical deployment issues and enhances the reliability of our infrastructure through improved health checks, input validation, and environment management across GitHub Actions workflows and deployment scripts.
Key Accomplishments
Infrastructure Improvements
Configuration Updates
Code Organization
Breaking Changes
Testing Notes
Infrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
bugfix/deployment-fixesmainCo-Authored-By: Claude noreply@anthropic.com