docs: correct maintenance_window recurrence weekday mapping (0 = Sunday)#156
Merged
Merged
Conversation
There was a problem hiding this comment.
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.recurrencedescription in thestreamnative_pulsar_clusterresource schema. - Updated
maintenance_window.recurrencedescription in thestreamnative_pulsar_clusterdata 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>
af84af9 to
a99cc0d
Compare
|
@freeznet who can review it? |
jiangpengcheng
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix the
maintenance_window.recurrenceweekday-mapping description on both thestreamnative_pulsar_clusterresource and data source, and regenerate the docs.Recurrence pattern for maintenance (0-6 for Monday to Sunday)→ implies 0 = MondayRecurrence 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 explainclaimed0 = Monday, while the cloud console renders and schedules0 = 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'stime.Weekday). So the provider/CRD docs were stale, not the console.Scope
recurrence— it round-trips as an opaqueschema.TypeStringthroughexpand/flattenMaintenanceWindow. No logic change.docs/resources/pulsar_cluster.mdregenerated viatfplugindocs(only the one line changed).tfplugindocsdoes not render descriptions for read-only nested attributes, sodocs/data-sources/pulsar_cluster.mdis unchanged.Out of scope (cloud team follow-up)
The CRD field comment (
cloud-api-serverpulsarcluster_types.go) andkubectl explaincarry the same stale0~6, Monday to Sundaytext and should be corrected separately.Verification
gofmt -lclean;go build ./...succeeds.git diff docs/shows only the single expected line change, no other drift.🤖 Generated with Claude Code