Skip to content

fix(cmd): respect LifecycleSupportEndDate in extended-support check - #1234

Merged
cristim merged 3 commits into
mainfrom
fix/cor-08-fix
Jul 17, 2026
Merged

cristim merged 3 commits into
mainfrom
fix/cor-08-fix

Conversation

@cristim

@cristim cristim commented Jun 11, 2026

Copy link
Copy Markdown
Member

Problem

isInExtendedSupport (cmd/multi_service_engine_versions.go) parsed both LifecycleSupportStartDate and LifecycleSupportEndDate from the RDS DescribeDBMajorEngineVersions response, but only ever compared the start date. Any engine version whose extended-support window had already ended was still classified as in-extended-support, so adjustRecommendationForExcludedVersions kept decrementing rec.Count for those instances, systematically under-sizing RI purchases for the affected instance types. (COR-08 from docs/reviews/codebase-review-2026-06-10.md)

Fix

A version is now in extended support only when now is on or after the lifecycle start date AND before the end date; a zero end date is treated as open-ended (field absent in the API response). The bare "open-source-rds-extended-support" string literal is also replaced with the SDK enum constant rdstypes.LifecycleSupportNameOpenSourceRdsExtendedSupport per the project's typed-enum convention.

Test evidence

Added two table cases to TestIsInExtendedSupport:

  • "Extended support already ended" (start 3y ago, end 6mo ago, expect false): confirmed FAILING pre-fix (expected: false, actual: true) and passing post-fix.
  • "Zero end date treated as open-ended" (expect true): guards the open-ended semantics.

Verification: go build ./... clean; go test ./cmd/... 752 passed in 7 packages.

Closes #1182

@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/few Limited audience effort/xs Trivial / one-liner type/bug Defect labels Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd6d022f-e7cf-423f-b869-86803c4224b0

📥 Commits

Reviewing files that changed from the base of the PR and between 27fdb06 and 2d1cd07.

📒 Files selected for processing (5)
  • cmd/multi_service_coverage_test.go
  • cmd/multi_service_engine_versions.go
  • cmd/multi_service_engine_versions_paginate_test.go
  • cmd/multi_service_engine_versions_test.go
  • cmd/multi_service_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cor-08-fix

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

@cristim

cristim commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@cristim have exceeded the limit for the number of chat messages per hour. Please wait 0 minutes and 23 seconds before sending another message.

@cristim

cristim commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

cristim added 3 commits July 17, 2026 10:39
isInExtendedSupport parsed both lifecycle dates but only compared the
start date, so engine versions past the official end of extended
support stayed classified as in-extended-support and remained excluded
from RI count sizing, causing systematic under-purchase for those
instance types.

Now a version counts as in extended support only when the current time
is on or after the start date and before the end date; a zero end date
is treated as open-ended. Also replaces the bare lifecycle-name string
literal with the SDK enum constant.

Adds regression test cases for a past end date (failing before this
fix) and for the open-ended zero end date.

Closes #1182
Replace bare string literals with typed
rdstypes.LifecycleSupportNameOpenSourceRdsExtendedSupport and
rdstypes.LifecycleSupportNameOpenSourceRdsStandardSupport constants so
test data cannot drift from the SDK enum values.
The previous commit migrated multi_service_engine_versions_test.go to use
rdstypes.LifecycleSupportNameOpenSourceRdsExtendedSupport instead of the
bare "open-source-rds-extended-support" string literal. Three sibling
test files in cmd/ still hard-coded the same strings, so a future SDK
enum rename would have left them out of sync.

Migrate all remaining occurrences in:

- cmd/multi_service_coverage_test.go     (3 sites)
- cmd/multi_service_test.go              (3 sites)
- cmd/multi_service_engine_versions_paginate_test.go (1 site, typed
  directly because the SDK struct exposes the enum type, not string)

No production behaviour changes; tests still pass (`go test ./cmd/...`).
@cristim

cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
cristim merged commit 676482a into main Jul 17, 2026
18 of 19 checks passed
@cristim
cristim deleted the fix/cor-08-fix branch July 17, 2026 10:36
@cristim

cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Merged on the substantive CI signal (all Lint/Unit/Integration/Security/Build/E2E/Validate-Terraform green; only the non-blocking tflint pre-commit flake red) closes #1182.

cristim added a commit that referenced this pull request Sep 27, 2026
fix(cmd): respect LifecycleSupportEndDate in extended-support check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/few Limited audience priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/bug Defect urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COR-08: isInExtendedSupport never checks LifecycleSupportEndDate; past-end versions stay excluded from RI sizing

1 participant