Skip to content

docs: note that weekday ranges cannot wrap around the week - #5552

Closed
xenon898 wants to merge 1 commit into
prometheus:mainfrom
xenon898:docs-weekday-range-no-wrap
Closed

docs: note that weekday ranges cannot wrap around the week#5552
xenon898 wants to merge 1 commit into
prometheus:mainfrom
xenon898:docs-weekday-range-no-wrap

Conversation

@xenon898

Copy link
Copy Markdown

What

A weekday_range such as saturday:sunday is rejected by the parser with start day cannot be before end day (timeinterval.go), because the start day index must be less than or equal to the end day index (Sunday = 0 … Saturday = 6). The docs don't mention this, so users try to express a weekend as saturday:sunday and hit a config error (see #3213).

This adds a sentence to the weekday_range description in docs/configuration.md explaining that ranges cannot wrap around the end of the week, and that individual days should be listed instead.

Docs-only.

Closes #3213

🤖 Generated with Claude Code

A weekday_range like 'saturday:sunday' is rejected by the parser
("start day cannot be before end day") because the start day must come
before the end day. Document this so users know to list the days
individually instead. Docs-only.

Closes prometheus#3213

Signed-off-by: xenon898 <88700568+xenon898@users.noreply.github.com>
@xenon898
xenon898 requested a review from a team as a code owner September 10, 2026 11:01
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 21cc90eb-88e7-40a1-bbb7-9d7f2422d804

📥 Commits

Reviewing files that changed from the base of the PR and between 5200ea3 and 8803756.

📒 Files selected for processing (1)
  • docs/configuration.md

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The weekday_range documentation now states that ranges cannot wrap around the end of the week. It shows ['saturday', 'sunday'] as the weekend form instead of saturday:sunday.

Changes

Weekday range documentation

Layer / File(s) Summary
Document non-wrapping weekday ranges
docs/configuration.md
The example documents the non-wrapping range rule and the required weekend syntax.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 88037

The documentation clarifies that weekday ranges cannot wrap and shows the correct weekend syntax. No user-facing runtime risk remains, so this change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the behavior, user impact, affected documentation, and linked issue. It does not include the repository checklist or release-notes section required by the template. Add the required Pull Request Checklist, mark all applicable items, include the release-notes block, and confirm documentation and sign-off status.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation change that weekday ranges cannot wrap around the week.
Linked Issues check ✅ Passed The documentation change satisfies issue #3213 by explaining the Sunday-first weekday ordering and that unsupported wraparound ranges such as saturday:sunday must be replaced with individual days.
Out of Scope Changes check ✅ Passed The pull request changes only the relevant weekday_range documentation. No unrelated or out-of-scope changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xenon898 xenon898 closed this Sep 10, 2026
@xenon898

Copy link
Copy Markdown
Author

Duplicate of #5172, which is already approved and awaiting merge. Apologies for the noise — closing in its favour.

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.

Document first day of week for time intervals

1 participant