Repository navigation
Conversation
isInExtendedSupport compared now against a zero LifecycleSupportStartDate, which never blocks, so an extended-support entry with both dates missing was silently read as "currently in extended support" and the instance was cut from the RDS recommendation count. Such an entry is now skipped with a warning naming the engine and major version. If no other entry proves extended support is active, the lookup reports known=false, so the caller keeps the instance in the count and emits its existing deduplicated "No lifecycle data" warning. Closes LeanerCloud#1315 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50. Or wait 57 minutes for your next included review. View limit details
Comment |
Merge-gate review verdict: CLEAN code at ca81b5f; rebase neededIndependent adversarial review by a non-author agent (Sonnet high, cold brief, full diff @IAmJSD, please rebase onto current Checked:
Non-blocking note: any extended entry missing a start date makes the result unknown, even if another entry for the same version has already ended. This is consistent with the issue. Local verification on macOS at ca81b5f (fixture/mock-based, no AWS):
Merge blockers:
🤖 Generated with Claude Code |
Resolve test-file conflict with LeanerCloud#2207: keep this PR's TestIsInExtendedSupport_ZeroStartDateWarns and main's TestQueryRunningInstanceEngineVersions_ProfileSelection; drop TestQueryMajorEngineVersions_ErrorHandling as main deleted it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @cristim. The branch is now up to date with I merged Conflict resolution in
Checked on macOS at 0fc9166, with AWS config and credentials set to /dev/null: The fork CI run for the new head needs approval. 🤖 Generated with Claude Code |
Verdict carry-over: CLEAN at 0fc9166 (merge of main into ca81b5f)The new head, 0fc9166, merges main into ca81b5f. The PR's own changes are identical to what was reviewed: I re-ran the checks on macOS at 0fc9166. The CLEAN verdict from the earlier comment therefore stands for 0fc9166. Remaining merge blockers:
🤖 Generated with Claude Code |
Root cause
isInExtendedSupport(cmd/multi_service_engine_versions.go) gates anopen-source-rds-extended-supportlifecycle entry withnow.Before(lifecycle.LifecycleSupportStartDate). When the start date is zero, that check is always false, so the start gate is skipped. With a zero end date, which is treated as open-ended since #1182, an entry with both dates missing came back as(extended=true, known=true). The instance was then dropped from the RDS recommendation count without any log line.Fix
LifecycleSupportStartDate.IsZero()is skipped (continue) instead of being accepted. A warning that names the engine and major version is logged:⚠️ Extended-support lifecycle for mysql 5.7 has no start date: ignoring the entry, extended-support window unknown.known=false. This uses the existing isInExtendedSupport silently returns false on lifecycle lookup miss (money path) #1313 contract:shouldExcludeForExtendedSupportkeeps the instance in the count (the conservative choice) and logs its existingNo lifecycle data for ...warning, deduplicated per engine and version.(true, true).gocyclo for
isInExtendedSupportis 9 (the cap is 10).Closes #1315
Verification
All of this is unit-level evidence that uses in-memory
MajorEngineVersionInfofixtures. Nothing calls AWS. A realDescribeDBMajorEngineVersionsresponse with a missing start date has not been seen in practice, so there is no real-cloud coverage for this path.New tests in
cmd/multi_service_engine_versions_test.go:TestIsInExtendedSupportcases:(false, false)(false, false)(true, true)(false, true)TestIsInExtendedSupport_ZeroStartDateWarns: goes throughadjustRecommendationForExcludedVersions. It asserts that the count stays at 2, that the log containsmysql 5.7 has no start date, and that the caller'sNo lifecycle data for mysql 5.7.44warning appears.Fail-before (fix stashed, tests kept):
Pass-after:
Full checks, all passing:
Tests were run with
AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/nullbecause the default AWS profile on the dev machine is invalid. This is not related to this change.Out of scope
isInExtendedSupportcall, which means once per matching instance. It is not deduplicated. The caller'sNo lifecycle datawarning is still deduplicated per engine:version.cmd/multi_service_engine_versions.gowas already longer than the 500-line guideline before this PR (571 lines). This PR adds 13 lines.Maintainer: please mirror the issue's triage labels onto this PR:
triaged,priority/p3,severity/low,urgency/eventually,impact/few,effort/xs,type/bug.🤖 Generated with Claude Code