-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(infra): upgrade postgresql SKU in test #1257
Conversation
📝 WalkthroughWalkthroughThe pull request introduces changes to two Bicep files related to PostgreSQL resource configuration. In the Changes
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
Documentation and Community
|
Quality Gate passedIssues Measures |
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
🧹 Outside diff range and nitpick comments (1)
.azure/modules/postgreSql/create.bicep (1)
27-27
: LGTM! Consider adding a comment for SKU descriptions.The expansion of the
Sku
type to include more options is a good improvement. It aligns well with the PR objective to upgrade the PostgreSQL SKU and provides more flexibility for different deployment scenarios.Consider adding a comment above the
Sku
type declaration to briefly describe each SKU option or link to Azure documentation for SKU details. This would help future users understand the differences between these options without leaving the code. For example:// SKU options for PostgreSQL Flexible Server // Standard_B1ms: 1 vCore, 2 GB RAM // Standard_B2s: 2 vCores, 4 GB RAM // ... // For full details, see: https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-compute-storage
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- .azure/infrastructure/test.bicepparam (1 hunks)
- .azure/modules/postgreSql/create.bicep (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
.azure/infrastructure/test.bicepparam (1)
33-35
: Approved: PostgreSQL SKU upgrade aligns with PR objectives.The change from 'Standard_B1ms' to 'Standard_B2s' for the PostgreSQL SKU is appropriate and aligns with the PR objective to address CPU limitations. This upgrade doubles the vCPU count from 1 to 2 and increases RAM from 2 GiB to 4 GiB, which should help alleviate the reported performance issues.
Consider the following recommendations:
- Monitor the performance improvement after deployment to ensure it meets the expected outcomes.
- Keep an eye on the cost implications of this upgrade and adjust if necessary.
- Set up alerts for CPU and memory usage to proactively identify any future scaling needs.
- Document this change in your infrastructure documentation, including the rationale for the upgrade.
To ensure this change is reflected correctly in other parts of the infrastructure, run the following script:
✅ Verification successful
Verified: PostgreSQL SKU change is consistent across the infrastructure.
- The old SKU
'Standard_B1ms'
is no longer referenced.- The new SKU
'Standard_B2s'
is correctly applied in.azure/infrastructure/test.bicepparam
.- No documentation updates are required regarding the SKU changes.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the PostgreSQL SKU change is consistent across the infrastructure # Test 1: Check for any hardcoded references to the old SKU echo "Checking for any remaining references to 'Standard_B1ms':" rg --type bicep --type bicepparam 'Standard_B1ms' # Test 2: Verify the new SKU is used consistently echo "Verifying 'Standard_B2s' usage:" rg --type bicep --type bicepparam 'Standard_B2s' # Test 3: Check for any comments or documentation that might need updating echo "Checking for potential documentation updates:" rg --type md --type txt 'PostgreSQL.+SKU|Standard_B1ms|Standard_B2s'Length of output: 540
Script:
#!/bin/bash # Description: Verify the PostgreSQL SKU change is consistent across the infrastructure # Test 1: Check for any hardcoded references to the old SKU echo "Checking for any remaining references to 'Standard_B1ms':" rg --glob "*.bicep" --glob "*.bicepparam" 'Standard_B1ms' # Test 2: Verify the new SKU is used consistently echo "Verifying 'Standard_B2s' usage:" rg --glob "*.bicep" --glob "*.bicepparam" 'Standard_B2s' # Test 3: Check for any comments or documentation that might need updating echo "Checking for potential documentation updates:" rg --glob "*.md" --glob "*.txt" 'PostgreSQL.+SKU|Standard_B1ms|Standard_B2s'Length of output: 802
Script:
#!/bin/bash # Description: Verify the PostgreSQL SKU change is consistent across the infrastructure # Step 1: List all .bicep and .bicepparam files echo "Listing all .bicep and .bicepparam files:" fd --extension bicep --extension bicepparam # Step 2: Check for any hardcoded references to the old SKU echo "Checking for any remaining references to 'Standard_B1ms':" fd --extension bicep --extension bicepparam | xargs rg 'Standard_B1ms' # Step 3: Verify the new SKU is used consistently echo "Verifying 'Standard_B2s' usage:" fd --extension bicep --extension bicepparam | xargs rg 'Standard_B2s' # Step 4: Check for any comments or documentation that might need updating echo "Checking for potential documentation updates:" fd --extension md --extension txt | xargs rg 'PostgreSQL.+SKU|Standard_B1ms|Standard_B2s'Length of output: 682
Script:
#!/bin/bash # Description: Specifically verify the PostgreSQL SKU change in .azure/infrastructure/test.bicepparam # Define the target file TARGET_FILE=".azure/infrastructure/test.bicepparam" # Check if the target file exists if [ -f "$TARGET_FILE" ]; then echo "Found target file: $TARGET_FILE" # Test 1: Check for any remaining references to the old SKU echo "Checking for any remaining references to 'Standard_B1ms' in $TARGET_FILE:" rg 'Standard_B1ms' "$TARGET_FILE" # Test 2: Verify the new SKU is used consistently echo "Verifying 'Standard_B2s' usage in $TARGET_FILE:" rg 'Standard_B2s' "$TARGET_FILE" else echo "Target file $TARGET_FILE does not exist." fi # Test 3: Check for any comments or documentation that might need updating echo "Checking for potential documentation updates related to SKUs:" rg 'PostgreSQL.+SKU|Standard_B1ms|Standard_B2s' --glob "*.md" --glob "*.txt"Length of output: 947
.azure/modules/postgreSql/create.bicep (1)
Line range hint
39-52
: Consider reviewing logical replication configuration for new SKUs.With the expanded SKU options, it might be worth revisiting the commented-out logical replication configuration. Different SKUs might have varying capabilities or requirements for logical replication.
Please review if the logical replication settings need to be adjusted or enabled for any of the new SKU options. You may want to run the following command to check if there are any SKU-specific configurations in the Azure documentation:
🤖 I have created a release *beep* *boop* --- ## [1.23.0](v1.22.0...v1.23.0) (2024-10-10) ### Features * **infra:** upgrade postgresql SKU in test ([#1257](#1257)) ([5a751af](5a751af)) * **webAPI:** Add legacy HTML support for MainContentReference ([#1256](#1256)) ([482b38a](482b38a)) ### Bug Fixes * Add missing return types for Transmissions and Activities in OpenAPI spec ([#1244](#1244)) ([972870d](972870d)) * **graphQL:** Missing MediaType on dialog attachment url ([#1264](#1264)) ([3919343](3919343)) * Refactor probes and add more health checks ([#1159](#1159)) ([6889a96](6889a96)) * **webapi:** ensure correct health checks are used in probes ([#1249](#1249)) ([f951152](f951152)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
Seems like it's CPU that we are struggling with the most. Upgrading to the next profile in the Burstable tier which has 2 cores. (B2s)
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)Summary by CodeRabbit