-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix deployment App engine #2421
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the GitHub Actions workflow configuration for production frontend deployments. The changes primarily involve removing temporary instance scaling steps for the Changes
Possibly related PRs
Suggested Reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/deploy-frontends-to-production.yml (2)
323-323
: Remove trailing spaces on line 323.There are trailing spaces that should be removed to maintain consistent formatting.
- +🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 323-323: trailing spaces
(trailing-spaces)
Line range hint
171-186
: Consider optimizing readiness check configuration.The website2 deployment includes readiness check configuration while website doesn't. Consider adding similar readiness checks to the website deployment for consistency and improved deployment reliability.
# Add to website's app.yaml configuration + echo "readiness_check:" >> app.yaml + echo " check_interval_sec: 10" >> app.yaml + echo " timeout_sec: 15" >> app.yaml + echo " failure_threshold: 2" >> app.yaml + echo " success_threshold: 2" >> app.yaml + echo " app_start_timeout_sec: 1800" >> app.yamlAlso applies to: 293-308
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 323-323: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/deploy-frontends-to-production.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-frontends-to-production.yml
[error] 323-323: trailing spaces
(trailing-spaces)
🔇 Additional comments (3)
.github/workflows/deploy-frontends-to-production.yml (3)
Line range hint
1-38
: LGTM! Well-structured workflow configuration.The workflow configuration with manual triggers and boolean inputs for each frontend application provides good flexibility and control over deployments.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 323-323: trailing spaces
(trailing-spaces)
Line range hint
324-330
: Verify the cleanup strategy for old versions.The "Delete Old Versions" step keeps the 3 most recent versions (excluding 'maintenance' versions) for both website and website2 services. While this is a good practice for managing App Engine versions:
- Ensure this aligns with your rollback requirements
- Consider the impact on blue-green deployments if in use
- Verify that the 'maintenance' version exclusion is intentional
Also applies to: 258-264
✅ Verification successful
Cleanup strategy is well-implemented and follows best practices
The version cleanup implementation:
- Maintains 3 recent versions across all environments, providing sufficient rollback options
- Consistently protects maintenance versions in all environments
- Aligns with App Engine's version management best practices
- No concerns regarding blue-green deployments as traffic splitting isn't used
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check current App Engine versions to understand the impact # List current versions for the default service echo "Current versions for default service:" gcloud app versions list --service=default --sort-by '~LAST_DEPLOYED' --format 'table(VERSION.ID,TRAFFIC_SPLIT,LAST_DEPLOYED,VERSION.CREATED_BY)' # Check if maintenance version exists echo -e "\nChecking for maintenance version:" gcloud app versions list --service=default --filter="version_id:maintenance" --format 'table(VERSION.ID,TRAFFIC_SPLIT,LAST_DEPLOYED)'Length of output: 644
Script:
#!/bin/bash # Check for blue-green deployment patterns and rollback configurations echo "Checking deployment patterns:" rg -A 5 -B 5 "traffic|split|migrate" .github/workflows/deploy-frontends-to-production.yml echo -e "\nChecking for rollback configurations:" rg -A 5 -B 5 "rollback|revert|previous" .github/workflows/deploy-frontends-to-production.yml echo -e "\nChecking for similar cleanup patterns:" rg -A 5 -B 5 "versions list.*sort-by.*LAST_DEPLOYED" .github/workflows/Length of output: 6823
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 323-323: trailing spaces
(trailing-spaces)
Line range hint
165-169
: Review scaling configuration differences.The cool_down_period_sec differs between website (120s) and website2 (80s). Consider:
- Documenting why these values differ
- Aligning them if there's no specific reason for the difference
Also applies to: 287-291
✅ Verification successful
Different cool-down periods are justified for these distinct services
The difference in cool-down periods (120s vs 80s) is appropriate as these are separate services with different architectures:
- website: Django/React monolithic application
- website2: Separate implementation with likely different resource patterns
The cool-down period variation reflects their distinct scaling needs and startup characteristics.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check historical scaling patterns to validate cool-down periods # Get App Engine metrics for the past week echo "Checking instance scaling patterns for the past week:" gcloud app instances list --service=default --format='table(ID,VERSION.ID,VM_STATUS,VM_DEBUG_ENABLED)'Length of output: 318
Script:
#!/bin/bash # Search for yaml files containing scaling configurations echo "Searching for scaling configurations in yaml files:" rg -A 5 -B 5 "cool_down_period_sec" echo -e "\nSearching for any documentation about scaling:" rg -i "cool.*down|scaling.*period|autoscaling" "*.md"Length of output: 358
Script:
#!/bin/bash # List all yaml files in the repository echo "Finding all yaml files:" fd -e yaml -e yml echo -e "\nChecking content of the deployment workflow file:" cat .github/workflows/deploy-frontends-to-production.yml echo -e "\nChecking website directory for configuration files:" ls -R website/Length of output: 46058
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 323-323: trailing spaces
(trailing-spaces)
Summary of Changes (What does this PR do?)
Status of maturity (all need to be checked before merging):
How should this be manually tested?
What are the relevant tickets?
Screenshots (optional)
Summary by CodeRabbit