Skip to content

docs: correct maintenance_window recurrence weekday mapping (0 = Sunday)#156

Merged
freeznet merged 1 commit into
mainfrom
fix/maintenance-window-recurrence-doc
Jun 23, 2026
Merged

docs: correct maintenance_window recurrence weekday mapping (0 = Sunday)#156
freeznet merged 1 commit into
mainfrom
fix/maintenance-window-recurrence-doc

Conversation

@freeznet

@freeznet freeznet commented Jun 18, 2026

Copy link
Copy Markdown
Member

What

Fix the maintenance_window.recurrence weekday-mapping description on both the streamnative_pulsar_cluster resource and data source, and regenerate the docs.

  • Old: Recurrence pattern for maintenance (0-6 for Monday to Sunday) → implies 0 = Monday
  • New: Recurrence pattern for maintenance: comma-separated weekday integers where 0 = Sunday and 6 = Saturday (e.g. "0,6" means Sunday and Saturday)

Why

The integer→weekday mapping was inconsistent across surfaces: the Terraform schema/docs and kubectl explain claimed 0 = Monday, while the cloud console renders and schedules 0 = Sunday.

The authoritative behavior was verified against the cloud console scheduler source: it compares the recurrence integer directly against dayjs .day(), which is 0 = Sunday … 6 = Saturday (same convention as Go's time.Weekday). So the provider/CRD docs were stale, not the console.

Scope

  • Doc-only. The provider never parses recurrence — it round-trips as an opaque schema.TypeString through expand/flattenMaintenanceWindow. No logic change.
  • docs/resources/pulsar_cluster.md regenerated via tfplugindocs (only the one line changed).
  • The data-source description is updated for source consistency; tfplugindocs does not render descriptions for read-only nested attributes, so docs/data-sources/pulsar_cluster.md is unchanged.

Out of scope (cloud team follow-up)

The CRD field comment (cloud-api-server pulsarcluster_types.go) and kubectl explain carry the same stale 0~6, Monday to Sunday text and should be corrected separately.

Verification

  • gofmt -l clean; go build ./... succeeds.
  • git diff docs/ shows only the single expected line change, no other drift.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 18, 2026 10:26
@freeznet freeznet requested a review from a team as a code owner June 18, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Terraform provider documentation and schema attribute descriptions to correctly describe the maintenance_window.recurrence weekday integer mapping for Pulsar clusters (0 = Sunday … 6 = Saturday), aligning provider docs with the control plane’s behavior.

Changes:

  • Updated maintenance_window.recurrence description in the streamnative_pulsar_cluster resource schema.
  • Updated maintenance_window.recurrence description in the streamnative_pulsar_cluster data source schema.
  • Regenerated the resource documentation to reflect the corrected description.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/resources/pulsar_cluster.md Updates generated docs text for maintenance_window.recurrence to reflect 0=Sunday…6=Saturday mapping.
cloud/resource_pulsar_cluster.go Corrects the Terraform schema description for the resource’s maintenance_window.recurrence attribute.
cloud/data_source_pulsar_cluster.go Corrects the Terraform schema description for the data source’s maintenance_window.recurrence attribute.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The recurrence schema description claimed "0-6 for Monday to Sunday"
(0 = Monday), but the cloud console scheduler maps the integer directly
via dayjs `.day()` (0 = Sunday ... 6 = Saturday), matching Go's
time.Weekday convention. The provider only round-trips recurrence as an
opaque string, so this is a doc-only correction.

Updates both the resource and data-source descriptions and regenerates
docs/resources/pulsar_cluster.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@freeznet freeznet force-pushed the fix/maintenance-window-recurrence-doc branch from af84af9 to a99cc0d Compare June 18, 2026 11:59
@AlvaroStream

Copy link
Copy Markdown

@freeznet who can review it?

@freeznet freeznet merged commit a2a5e41 into main Jun 23, 2026
1 check passed
@freeznet freeznet deleted the fix/maintenance-window-recurrence-doc branch June 23, 2026 11:27
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.

4 participants