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

Add maintenance day validation for database and kubernetes clusters #1293

Merged

Conversation

moreinhardt
Copy link
Contributor

The docs did not really tell me how to use this field.

@andrewsomething andrewsomething self-assigned this Dec 20, 2024
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for another helpful contribution!

I left a comment in line re: DOKS maintenance policies also supporting any.

digitalocean/kubernetes/resource_kubernetes_cluster.go Outdated Show resolved Hide resolved
@moreinhardt moreinhardt force-pushed the add-maintenance-day-validation branch from c831635 to c5dd54e Compare December 21, 2024 11:19
@moreinhardt moreinhardt force-pushed the add-maintenance-day-validation branch from c5dd54e to 7fe8510 Compare December 21, 2024 11:30
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"any", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"}, true),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much experience with Go. I see that Go has no line length limit. So go fmt didn't complain or change this.

Should I wrap this to have every value on a separate line for readability?

Copy link
Member

@andrewsomething andrewsomething Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not something that is required in Go, but it is still often nice for readability. I've pushed a commit doing so since we've already made you wait too long on this.

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM!

Thanks again for the contribution! Sorry it took so long to land with the holidays. 🙏

@andrewsomething andrewsomething merged commit a5d21d2 into digitalocean:main Jan 9, 2025
3 checks passed
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