Skip to content

BCH-1290: Extend CertificateContext with renewal_eligibility, issued_…#4

Merged
saltpy-cs merged 1 commit into
mainfrom
feat/BCH-1290
Jun 2, 2026
Merged

BCH-1290: Extend CertificateContext with renewal_eligibility, issued_…#4
saltpy-cs merged 1 commit into
mainfrom
feat/BCH-1290

Conversation

@saltpy-cs
Copy link
Copy Markdown
Collaborator

@saltpy-cs saltpy-cs commented Jun 2, 2026

…at, type

Adds three fields from DescribeCertificate that are required by the ACM TLS Endpoints control coverage: renewal_eligibility (ELIGIBLE/INELIGIBLE), issued_at (*time.Time, omitempty), and type (AMAZON_ISSUED/IMPORTED/PRIVATE). All three are already returned by the existing DescribeCertificate call with no additional IAM permissions required.

Summary by CodeRabbit

  • New Features
    • Certificate details now include additional metadata: issue date, certificate type, and renewal eligibility status, providing more comprehensive certificate information.

…at, type

Adds three fields from DescribeCertificate that are required by the ACM TLS
Endpoints control coverage: renewal_eligibility (ELIGIBLE/INELIGIBLE),
issued_at (*time.Time, omitempty), and type (AMAZON_ISSUED/IMPORTED/PRIVATE).
All three are already returned by the existing DescribeCertificate call with no
additional IAM permissions required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2cf77ba5-af15-4da8-86bf-3f04cfdeb3a1

📥 Commits

Reviewing files that changed from the base of the PR and between a4fac69 and 8090f69.

📒 Files selected for processing (2)
  • internal/data.go
  • internal/data_test.go

📝 Walkthrough

Walkthrough

The PR extends AWS ACM certificate metadata handling by adding three new fields to the CertificateContext struct—IssuedAt, Type, and RenewalEligibility—and updates the certificate fetching logic to populate them. Three new tests validate behavior across different certificate types and renewal eligibility states.

Changes

ACM Certificate Metadata Extension

Layer / File(s) Summary
CertificateContext schema extension
internal/data.go
CertificateContext struct adds three fields: IssuedAt (pointer to time.Time), Type (string), and RenewalEligibility (string), all JSON-tagged with omitempty.
Certificate fetching and test coverage
internal/data.go, internal/data_test.go
fetchCertificate populates the three new fields when constructing CertificateContext. Three tests validate that Amazon-issued eligible certificates receive populated IssuedAt and ELIGIBLE/AMAZON_ISSUED values; Amazon-issued ineligible certificates get INELIGIBLE with nil IssuedAt; and imported certificates receive IMPORTED type with empty RenewalEligibility and nil IssuedAt.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 Three fields hop into the Context,
IssuedAt, Type, and Renewal—now connected!
Tests certify each scenario with care,
Amazon or imported—metadata pairs everywhere! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references BCH-1290 and mentions extending CertificateContext with renewal_eligibility and issued_at, which aligns with the main changes adding these fields to the struct.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@saltpy-cs saltpy-cs merged commit d10dc77 into main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant