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

Specify Maintenance Window for the Database #1478

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

halprin
Copy link
Member

@halprin halprin commented Oct 23, 2024

Description

Our database has maintenance windows. Azure recommends setting a specific one, and specifying one reduces the randomness of when the maintenance window will occur. I set the maintenance to our SLA's maintenance window. Not that our SLA is actually set, but our draft is better than nothing.

Issue

None.

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Configuration Validation
Ensure that the specified maintenance window configuration aligns with the actual SLA and operational requirements.

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Best practice
Add a validation check for the day_of_week field in the maintenance_window configuration

Ensure that the maintenance_window configuration includes a validation check for the
day_of_week value to prevent invalid configurations. Terraform supports values from
0 (Sunday) to 6 (Saturday), and an incorrect value could lead to deployment
failures.

operations/template/db.tf [25-29]

 maintenance_window { # Sunday at 12:00 UTC which is 7:00 AM EST or 8:00 AM EDT (around the time of our SLA's maintenance window)
-  day_of_week  = 0
+  day_of_week  = 0 # Ensure this is between 0 and 6
   start_hour   = 12
   start_minute = 0
 }
Suggestion importance[1-10]: 5

Why: The suggestion to add a validation check for the day_of_week field is relevant and can prevent potential deployment failures due to incorrect configurations. However, the suggestion does not provide a specific implementation of the validation logic, only a comment hint, which limits its impact.

5

Copy link

@halprin halprin merged commit 1ec2d91 into main Oct 24, 2024
17 of 19 checks passed
@halprin halprin deleted the custom-db-maintenance branch October 24, 2024 20:32
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.

2 participants