You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced workload policy configuration to support larger startup period timeout values and improved mapping of policy parameters for better configuration management.
The WorkloadPolicyResourceModel struct undergoes a type migration for StartupPeriodSeconds from 32-bit to 64-bit integers, with corresponding Terraform schema and protobuf conversion updates. Additional public fields are added to proto mapping paths for policy configuration fields.
Changes
Cohort / File(s)
Change Summary
Type Migration and Proto Field Mapping Expansion internal/provider/workload_policy.go
Migrated StartupPeriodSeconds from types.Int32 to types.Int64 with Terraform schema updated from Int32Attribute to Int64Attribute; removed Computed/Default constraints. Updated toProto/fromProto methods to serialize StartupPeriodSeconds as int64 pointer. Expanded proto conversion mappings to include MinChangePercent, MinDataPoints, StabilityCvMax, HysteresisVsTarget, DriftDeltaPercent, MinVpaWindowDataPoints, and CooldownMinutes. Updated LoopbackPeriodSeconds mapping to int32 pointer handling.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Verify backward compatibility implications of the int32 → int64 type migration for StartupPeriodSeconds
Cross-check all newly added field mappings (7 fields) for correctness in toProto/fromProto paths
Confirm proto serialization/deserialization alignment with updated type constraints
Validate removal of Computed/Default constraints doesn't affect schema behavior
Poem
🐰 From thirty-two bits, we leap to sixty-four,
More fields now mapped than ever before,
Proto paths widen with care and precision,
Each mapping refined with careful vision,
The workload finds room to expand its way!
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The PR title 'Add missing fields to workload policies' accurately reflects the main change: adding previously missing field mappings to the WorkloadPolicyResourceModel, including field type migration and proto conversion updates.
Docstring Coverage
✅ Passed
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Create PR with unit tests
Post copyable unit tests in a comment
Commit unit tests in branch tzvonimir/add-missing-fields
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between a60116c and 2095604.
📒 Files selected for processing (1)
internal/provider/workload_policy.go (6 hunks)
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.
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
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.
Summary by CodeRabbit