Repository navigation
feat(providers/aws): rich self-describing RI display names (closes #687) - #806
Conversation
EC2 and Redshift reserved-instance purchases now stamp a Name tag with
the rich {svc}-{region}-{sku}-{count}x-{term}-{paymt}-{ts}-{rand}
format already used by the other AWS services for their customer-
supplied reservation IDs (RDS/ElastiCache/MemoryDB/OpenSearch).
EC2 PurchaseReservedInstancesOfferingInput has no customer-supplied ID
field and Redshift PurchaseReservedNodeOfferingInput has none either,
so the Name tag is the only way to identify these commitments in the
AWS console without cross-referencing CUDly. Count/Term/PaymentOption
descriptor tags are also added to EC2 to match the Redshift tag set.
Also fixes three pre-existing test compile errors (findOfferingID
called with 2 args instead of the required 3 in rds and redshift
test files).
|
Warning Review limit reached
More reviews will be available in 6 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Summary
tagReservedInstancenow stamps a self-describingNametag usingBuildReservationName(formatec2-{region}-{sku}-{count}x-{term}-{paymt}-{ts}-{rand}). EC2PurchaseReservedInstancesOfferingInputhas no customer-supplied name field, so theNametag is the only way to identify the RI in the AWS console without querying CUDly's purchase history.Count,Term, andPaymentOptiondescriptor tags are also added to match the Redshift tag set.tagReservedNodegains the sameNametag viaBuildReservationName(formatredshift-{region}-{sku}-...). Same rationale: no customer-supplied ID onPurchaseReservedNodeOfferingInput.BuildReservationNameas the customer-supplied reservation ID in prior work on this branch; no changes needed.findOfferingIDcalled with 2 args instead of 3 inrdsandredshifttest files).Format
{svc}-{region}-{sku}-{count}x-{term}-{paymt}-{ts}-{rand}(60-char cap viaBuildReservationNameinpkg/common), e.g.:Services wired (7 total)
Nametag intagReservedInstance(post-purchaseCreateTags)Nametag intagReservedNode(post-purchaseCreateTags)ReservedDBInstanceId(already done in branch)ReservedCacheNodeId(already done in branch)ReservationId(already done in branch)ReservationName(already done in branch)Test plan
go build ./...passes (verified locally)TestClient_tagReservedInstance_NameTagPresent- assertsNametag present and self-describing on EC2CreateTagscallTestClient_PurchaseCommitment_NameTagInCreateTagsRequest- end-to-end EC2 purchase assertsNametag inCreateTagsTestClient_tagReservedNode_NameTagPresent- assertsNametag present on RedshiftCreateTagscallTestClient_PurchaseCommitment_TagsCarryRichDescriptors(extended) - assertsNametag starts with"redshift"in addition to Count/Term/PaymentOptionec2,redshift,rds,elasticache,memorydb,opensearch,pkg/common)