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

feat(alerting): add timezone for maintenance #653

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lefes
Copy link

@lefes lefes commented Jan 12, 2024

Summary

Add a "Timezone" field to the configuration in the maintenance zone to specify the timezone for the maintenance window. Also, include tests for various timezones and cases.

Fixes #327

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@TwiN TwiN added feature New feature or request area/alerting Related to alerting labels Jan 14, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9119023) 78.49% compared to head (272f1a0) 78.53%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   78.49%   78.53%   +0.04%     
==========================================
  Files          58       58              
  Lines        4705     4714       +9     
==========================================
+ Hits         3693     3702       +9     
  Misses        827      827              
  Partials      185      185              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -12,6 +12,7 @@ var (
errInvalidMaintenanceStartFormat = errors.New("invalid maintenance start format: must be hh:mm, between 00:00 and 23:59 inclusively (e.g. 23:00)")
errInvalidMaintenanceDuration = errors.New("invalid maintenance duration: must be bigger than 0 (e.g. 30m)")
errInvalidDayName = fmt.Errorf("invalid value specified for 'on'. supported values are %s", longDayNames)
errInvalidTimezone = errors.New("invalid timezone specified or format not supported. Use IANA timezone format (e.g. America/Sao_Paulo)")
Copy link
Owner

@TwiN TwiN Jan 14, 2024

Choose a reason for hiding this comment

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

Can you update the README to include this information about the timezone format to use?

Copy link
Author

Choose a reason for hiding this comment

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

Can you update the README to include this information about the timezone format to use?

Certainly, I've done it, but it seems a little awkward when I look at the line in the table with the parameter maintenance.timezone. I am referring to the length of the line. Is it okay, or should I change it?"

@lefes
Copy link
Author

lefes commented Feb 8, 2024

@TwiN Can you review this PR? I've made some changes that you are asked for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set maintenance timezone
3 participants