OCPBUGS-83514: fix(aws): use stable error message for endpoint service adoption failure#8925
OCPBUGS-83514: fix(aws): use stable error message for endpoint service adoption failure#8925sdminonne wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@sdminonne: This pull request references Jira Issue OCPBUGS-83514, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds AWS Endpoint Service controller guidance for stable, deterministic condition messages instead of returning raw or wrapped AWS SDK errors. It also adds a smithy-go-based unit test covering 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sdminonne The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sdminonne: This pull request references Jira Issue OCPBUGS-83514, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@hypershift-operator/controllers/platform/aws/controller_test.go`:
- Around line 234-247: The adoption-failure test cases in
reconcileAWSEndpointServiceStatus are expecting the wrong error text: the
current flow still returns the original InvalidParameter from
CreateVpcEndpointServiceConfiguration unless the implementation wraps it. Update
these controller_test.go cases to assert the actual returned code/message from
the create failure, or change the reconcileAWSEndpointServiceStatus
adoption-failure path to wrap the error with the adoption context before
returning it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 301c558d-954e-46d4-b3a8-cfd7c5ecc3f8
📒 Files selected for processing (2)
hypershift-operator/controllers/platform/aws/AGENTS.mdhypershift-operator/controllers/platform/aws/controller_test.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8925 +/- ##
==========================================
+ Coverage 43.28% 43.37% +0.09%
==========================================
Files 771 771
Lines 95503 95534 +31
==========================================
+ Hits 41335 41441 +106
+ Misses 51284 51209 -75
Partials 2884 2884 see 9 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The error returned from reconcileAWSEndpointServiceStatus when endpoint service adoption fails now includes the underlying cause from findExistingVpcEndpointService. The error is stable across reconcile loops because the adoption lookup only fails with deterministic messages (API error codes, static strings, or fixed LB ARNs) and never includes variable content like AWS request IDs. Add tests covering the endpoint service creation error paths: InvalidParameter with successful adoption, failed adoption, describe failure, and non-InvalidParameter API errors. OCPBUGS-83514 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@sdminonne: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
reconcileAWSEndpointServiceStatus, covering adoption success/failure and non-InvalidParameter API errorsAGENTS.mddocumenting the condition message stability rules for the AWS endpoint service controllerThe controller.go fix (using
errors.New(apiErr.ErrorCode())instead offmt.Errorfwith variable error content) was merged in a prior PR. This PR adds the missing test coverage and documentation.Test plan
go test ./hypershift-operator/controllers/platform/aws/...🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Bug Fixes
Tests