Repository navigation
refactor(azure,gcp): use common.HoursPerYear instead of 8760 literals - #568
Merged
Merged
Conversation
Part of #109 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the bare 8760 term-hours literals in the azure cache, compute, cosmosdb, database, managedredis, search and synapse clients and the gcp computeengine pricing helper (which carried its own copy) with the shared constant, and pin pkg to the commit that adds it. No behavior change. Part of #109 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 11 billable files and costs up to $2.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 3 minutes for your next included review. View limit details
Comment |
Member
Author
Merge gate verdict (claude-cc-libs)Every gate holds at head e9f38c8:
CodeRabbit is waived as a merge gate under the 2026-10-19 decision. Squash-merging. |
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.
Summary
Part of #109 (go part only). Adds
common.HoursPerYear(8760) inpkg/commonand replaces the bare8760literals with it in azure cache, compute, cosmosdb, database, managedredis, search and synapse, and in gcp computeenginepricing.go(dropping its private copy). Behavior-preserving: no existing test changed.HoursPerMonth; AWS's privatehoursPerYearatproviders/aws/recommendations/parser_sp.go:~100; gcp cloudstorageaverageHoursPerMonth = 8760.0 / 12(client.go:22, skipped because fix(gcp): fail closed on region-less storage SKUs and ambiguous SKU matches #471 is open); themonthlyCostFromConvertibleRIduplication and its bare730live in cloud-commitments-platform, and the GCP billing service ID constants are left for a separate pass.pkg/common.Pin note
Commit 1 adds the pkg constant; commit 2 pins azure and gcp
go.modto commit 1 (the go#535 pattern) soGOWORK=offbuilds. Achore: pin pkg to mainfollow-up is needed after merge (as #537 did for #535).Test plan
build, vet,
go test -count=1 ./..., golangci-lint forpkg,providers/azure,providers/gcp, each with and withoutGOWORK=off: all pass. Secrets allowlist 44 PASS.🤖 Generated with Claude Code