Skip to content

OCPBUGS-83514: fix inconsistent error return in endpoint service adoption - #8306

Closed
sdminonne wants to merge 1 commit into
openshift:mainfrom
sdminonne:OCPBUGS-83514
Closed

OCPBUGS-83514: fix inconsistent error return in endpoint service adoption#8306
sdminonne wants to merge 1 commit into
openshift:mainfrom
sdminonne:OCPBUGS-83514

Conversation

@sdminonne

@sdminonne sdminonne commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When endpoint service adoption fails in reconcileAWSEndpointServiceStatus, the code was returning the outer CreateVpcEndpointServiceConfiguration error code ("InvalidParameter") instead of the actual error from findExistingVpcEndpointService. This made debugging harder since the logged error and returned error were inconsistent.
  • Return the adoption error wrapped with context so callers see the actual failure reason.

Additional context

This PR addresses item 2 from OCPBUGS-83514. Item 1 (the //go:generate directive in support/awsapi/iam.go) was investigated and confirmed to be intentionally placed by the delegatingclientgenerator template — no code change needed.

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-83514

Ref: PR #7871 review comment

Test plan

  • Verify make build passes
  • Verify make verify passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of VPC endpoint service creation errors: reconciler now preserves underlying failure details while annotating issues with the originating AWS error code, yielding clearer, actionable error messages when adoption fails.
  • Tests

    • Added unit tests covering VPC endpoint adoption paths and various cloud API error scenarios to validate reconciliation outcomes and error reporting.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@sdminonne: This pull request references Jira Issue OCPBUGS-83514, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • When endpoint service adoption fails in reconcileAWSEndpointServiceStatus, the code was returning the outer CreateVpcEndpointServiceConfiguration error code ("InvalidParameter") instead of the actual error from findExistingVpcEndpointService. This made debugging harder since the logged error and returned error were inconsistent.
  • Return the adoption error wrapped with context so callers see the actual failure reason.

Additional context

This PR addresses item 2 from OCPBUGS-83514. Item 1 (the //go:generate directive in support/awsapi/iam.go) was investigated and confirmed to be intentionally placed by the delegatingclientgenerator template — no code change needed.

Ref: PR #7871 review comment

Test plan

  • Verify make build passes
  • Verify make verify passes

🤖 Generated with Claude Code

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.

@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f2c48d3-881c-4abc-8e77-0a772b9335d2

📥 Commits

Reviewing files that changed from the base of the PR and between 6e7fbfe and 0ead9ef.

📒 Files selected for processing (2)
  • hypershift-operator/controllers/platform/aws/controller.go
  • hypershift-operator/controllers/platform/aws/controller_test.go

📝 Walkthrough

Walkthrough

When CreateVpcEndpointServiceConfiguration returns an InvalidParameter error, the reconciler now preserves the underlying adoption failure by returning a wrapped error (fmt.Errorf("endpoint service adoption failed: %w", err)) from findExistingVpcEndpointService instead of returning only the AWS error code. Other error paths and the downstream adoption/permission reconciliation flow are unchanged. A new unit test, TestReconcileAWSEndpointServiceStatusCreationErrors, was added to exercise creation/adoption failure scenarios and verify error contents for both InvalidParameter and non-InvalidParameter AWS errors.

🚥 Pre-merge checks | ✅ 10 | ❌ 2

❌ Failed checks (2 warnings)

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.
Test Structure And Quality ⚠️ Warning The new test lacks meaningful failure messages on Gomega assertions, creating inconsistency with existing tests that use descriptive t.Errorf() messages. Add meaningful failure messages to all Gomega assertions including test case names and context for better diagnostic information.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: fixing an error return inconsistency in endpoint service adoption by wrapping the adoption error instead of discarding it.
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.
Stable And Deterministic Test Names ✅ Passed The test uses stable, deterministic names with no dynamic content. Test cases have descriptive static strings that clearly describe what each test validates, following Go table-driven test best practices.
Microshift Test Compatibility ✅ Passed New tests are standard Go unit tests using the testing package, not Ginkgo e2e tests, so the custom check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds standard Go unit tests with mocked AWS APIs, not Ginkgo e2e tests, so Single Node OpenShift compatibility check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only error handling in reconcileAWSEndpointServiceStatus function and adds unit tests. No scheduling constraints, deployment manifests, pod affinity rules, topology spread constraints, or other topology-related configuration are introduced.
Ote Binary Stdout Contract ✅ Passed PR changes involve error handling in reconcileAWSEndpointServiceStatus and unit test additions. No process-level code entry points or stdout operations detected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new test added in this PR is a standard Go unit test using the testing package and mocked AWS services, not a Ginkgo e2e test.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@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
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Summary

  • When endpoint service adoption fails in reconcileAWSEndpointServiceStatus, the code was returning the outer CreateVpcEndpointServiceConfiguration error code ("InvalidParameter") instead of the actual error from findExistingVpcEndpointService. This made debugging harder since the logged error and returned error were inconsistent.
  • Return the adoption error wrapped with context so callers see the actual failure reason.

Additional context

This PR addresses item 2 from OCPBUGS-83514. Item 1 (the //go:generate directive in support/awsapi/iam.go) was investigated and confirmed to be intentionally placed by the delegatingclientgenerator template — no code change needed.

Ref: PR #7871 review comment

Test plan

  • Verify make build passes
  • Verify make verify passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
  • Improved error handling when VPC endpoint service adoption encounters failures, providing clearer error information.

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.

@openshift-ci
openshift-ci Bot requested review from Nirshal and csrwng April 22, 2026 13:14
@openshift-ci openshift-ci Bot added area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/platform/aws PR/issue for AWS (AWSPlatform) platform and removed do-not-merge/needs-area labels Apr 22, 2026
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.71%. Comparing base (5eaee74) to head (5b2dca1).
⚠️ Report is 685 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8306      +/-   ##
==========================================
+ Coverage   36.42%   36.71%   +0.29%     
==========================================
  Files         765      765              
  Lines       93302    93301       -1     
==========================================
+ Hits        33981    34257     +276     
+ Misses      56606    56361     -245     
+ Partials     2715     2683      -32     
Files with missing lines Coverage Δ
...ft-operator/controllers/platform/aws/controller.go 43.16% <100.00%> (+4.65%) ⬆️

... and 4 files with indirect coverage changes

Flag Coverage Δ
cmd-support 30.37% <ø> (+<0.01%) ⬆️
cpo-hostedcontrolplane 37.19% <ø> (+0.10%) ⬆️
cpo-other 37.58% <ø> (+1.89%) ⬆️
hypershift-operator 48.01% <100.00%> (+0.12%) ⬆️
other 27.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci-robot

Copy link
Copy Markdown

@sdminonne: This pull request references Jira Issue OCPBUGS-83514, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Summary

  • When endpoint service adoption fails in reconcileAWSEndpointServiceStatus, the code was returning the outer CreateVpcEndpointServiceConfiguration error code ("InvalidParameter") instead of the actual error from findExistingVpcEndpointService. This made debugging harder since the logged error and returned error were inconsistent.
  • Return the adoption error wrapped with context so callers see the actual failure reason.

Additional context

This PR addresses item 2 from OCPBUGS-83514. Item 1 (the //go:generate directive in support/awsapi/iam.go) was investigated and confirmed to be intentionally placed by the delegatingclientgenerator template — no code change needed.

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-83514

Ref: PR #7871 review comment

Test plan

  • Verify make build passes
  • Verify make verify passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
  • Improved error handling when VPC endpoint service adoption encounters failures, providing clearer error information.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
hypershift-operator/controllers/platform/aws/controller_test.go (1)

261-264: Assert wrapped root-cause text, not only the wrapper prefix.

On Line 263, the assertion checks only "endpoint service adoption failed". Adding expectations for the inner cause (for example, "no endpoint services found" or "describe configurations unavailable") will better guarantee the bug fix intent (propagating the actual adoption failure reason).

🔧 Suggested test hardening
 	tests := []struct {
 		name                string
 		createErr           error
 		adoptionDescribeOut *ec2.DescribeVpcEndpointServiceConfigurationsOutput
 		adoptionDescribeErr error
 		wantErrContains     string
+		wantErrCause        string
 		wantServiceName     string
 	}{
@@
 		{
 			name:      "When CreateVpcEndpointServiceConfiguration fails with InvalidParameter and no matching service exists, it should return the adoption error",
 			createErr: &smithy.GenericAPIError{Code: "InvalidParameter", Message: "LBs are already associated with another VPC Endpoint Service"},
 			adoptionDescribeOut: &ec2.DescribeVpcEndpointServiceConfigurationsOutput{
 				ServiceConfigurations: []ec2types.ServiceConfiguration{},
 			},
 			wantErrContains: "endpoint service adoption failed",
+			wantErrCause:    "no endpoint services found",
 		},
 		{
 			name:                "When CreateVpcEndpointServiceConfiguration fails with InvalidParameter and DescribeVpcEndpointServiceConfigurations also fails, it should return the adoption error wrapping the describe error",
 			createErr:           &smithy.GenericAPIError{Code: "InvalidParameter", Message: "LBs are already associated with another VPC Endpoint Service"},
 			adoptionDescribeErr: fmt.Errorf("describe configurations unavailable"),
 			wantErrContains:     "endpoint service adoption failed",
+			wantErrCause:        "describe configurations unavailable",
 		},
@@
 			if tt.wantErrContains != "" {
 				g.Expect(err).To(HaveOccurred())
 				g.Expect(err.Error()).To(ContainSubstring(tt.wantErrContains))
+				if tt.wantErrCause != "" {
+					g.Expect(err.Error()).To(ContainSubstring(tt.wantErrCause))
+				}
 			} else {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@hypershift-operator/controllers/platform/aws/controller_test.go` around lines
261 - 264, The test currently only asserts the wrapper message ("endpoint
service adoption failed"); update the assertion to also check the wrapped
root-cause text from err (e.g., "no endpoint services found" or "describe
configurations unavailable") so the test verifies propagation of the inner
error; modify the block that checks tt.wantErrContains to either include the
expected inner substring in tt.wantErrContains for each case or add an
additional assertion like
g.Expect(err.Error()).To(ContainSubstring(<expectedInnerCause>)) referencing the
local err and the table-driven test case values to locate and validate the inner
cause alongside the wrapper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@hypershift-operator/controllers/platform/aws/controller_test.go`:
- Around line 261-264: The test currently only asserts the wrapper message
("endpoint service adoption failed"); update the assertion to also check the
wrapped root-cause text from err (e.g., "no endpoint services found" or
"describe configurations unavailable") so the test verifies propagation of the
inner error; modify the block that checks tt.wantErrContains to either include
the expected inner substring in tt.wantErrContains for each case or add an
additional assertion like
g.Expect(err.Error()).To(ContainSubstring(<expectedInnerCause>)) referencing the
local err and the table-driven test case values to locate and validate the inner
cause alongside the wrapper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f58726d-42dc-41f8-bba4-916dae1378fe

📥 Commits

Reviewing files that changed from the base of the PR and between c50ff2d and f46c3a6.

📒 Files selected for processing (1)
  • hypershift-operator/controllers/platform/aws/controller_test.go

@mehabhalodiya mehabhalodiya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall:

✅ The core error fix is correct and well-targeted. The test suite is solid. One thing to follow up on before approving:

  • Confirm the AccessDenied test case doesn't accidentally expect a describe mock call that won't be set up.

Comment thread hypershift-operator/controllers/platform/aws/controller.go Outdated
Comment thread hypershift-operator/controllers/platform/aws/controller_test.go

@jparrill jparrill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

Dropped a comment, otherwise lgtm

}
}

func TestReconcileAWSEndpointServiceStatusCreationErrors(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to merge with TestReconcileAWSEndpointServiceStatus test function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, good question. Looking

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it can't mocking setup is pretty different

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2026
@sdminonne

Copy link
Copy Markdown
Contributor Author

@mehabhalodiya thanks! PTAL

@mehabhalodiya mehabhalodiya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Thank you!

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@openshift-ci

openshift-ci Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill, mehabhalodiya, sdminonne

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-azure-self-managed | Build: 2047406386874159104 | Cost: $2.2870542499999997 | Failed step: hypershift-azure-run-e2e-self-managed

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aks | Build: 2047406374299635712 | Cost: $2.1010635 | Failed step: hypershift-azure-run-e2e

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aws | Build: 2047406378481356800 | Cost: $3.6709734999999992 | Failed step: hypershift-aws-run-e2e-nested

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-azure-self-managed | Build: 2049544727224651776 | Cost: $2.3605437500000006 | Failed step: hypershift-azure-run-e2e-self-managed

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2026
@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@sdminonne

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-4-22

@sdminonne

Copy link
Copy Markdown
Contributor Author

/test e2e-azure-self-managed

@enxebre

enxebre commented Apr 30, 2026

Copy link
Copy Markdown
Member

lgtm, will defer to others to tag in case they have more feedback

if err != nil {
log.Info("existing endpoint service not found, adoption failed", "err", err)
return errors.New(apiErr.ErrorCode())
return fmt.Errorf("endpoint service adoption failed (trigger: %s): failed to find existing endpoint service", apiErr.ErrorCode())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't err be included here instead of apiErr.ErrorCode()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point double checking

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @muraee ! I looked into it and AFAIK the err comes from serviceName, serviceID, err = findExistingVpcEndpointService(ctx, ec2Client, aws.ToString(lbARN)) and that err may contain the err ID from AWs and this is may trigger re-conciliation since the err is bubble-up in condition.
It's true that a static message doesn't add a lot of info but resync should be avoided.
I don't have a strong opinion but I would keep as is
Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findExistingVpcEndpointService returns parsses the aws error and returns only the ErrorCode. It doesn't include any err ID

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, taking back and amending the code. TY!

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>
@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@sdminonne: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-workflows 5b2dca1 link true /test verify-workflows

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@sdminonne

Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 1, 2026

@Nirshal Nirshal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine to me, I just have a couple of doubts that are probably coming from my lack of experience, if you would be so nice to explain them to me, I would gladly approve the PR.

if errors.As(err, &apiErr) {
return "", "", errors.New(apiErr.ErrorCode())
}
return "", "", err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a doubt here:

  • this row returns the error in its raw form, without "sanitization". Failing the describe could still happens for non-api related issues like network error, right? Do those kind of errors can have a variable part that can again induce flapping?
  • if we apply the AGENTS file suggestion here, we log and then we return a %T of the error, but then at row 583 we log again the "sanitized" version, and that is misleading (at first glance they may seem 2 different problems).
  • If that's not the case, and we want to keep the code as it is now, we should care to have a way to indicate to the agents that in this particular case we do not want to follow the rule indicated by AGENTS.md, otherwise they are going to flag this as an inconsistency and try to correct this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that only AWS errs need to be sanitized. AWS errs contains a variable ID. Same err but different ID. If we propagate it to the condition we may have an unwanted re-sync.
@muraee please confirm or educate me in case I'm wrong.

if err != nil {
log.Info("existing endpoint service not found, adoption failed", "err", err)
return errors.New(apiErr.ErrorCode())
return fmt.Errorf("endpoint service adoption failed: %v", err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the conversation, it makes sense to me to say that because we "sanitize" all errors before this point we are safe to use %v (although I found an exception to this at row 658), but the AGENTS.md indicates to always log the full error (and that is covered by row 583) and return the summarized version. This may trigger the AI to further change this row next time it is required to work on this file. If we think we want to keep it like this, should we find a way to flag the intention to keep an exception to the rule?

sdminonne

This comment was marked as off-topic.

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Stale PRs are closed after 21d of inactivity.

If this PR is still relevant, comment to refresh it or remove the stale label.
Mark the PR as fresh by commenting /remove-lifecycle stale.

If this PR is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci Bot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 11, 2026
@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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 kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Stale PRs rot after 14d of inactivity.

Mark the PR as fresh by commenting /remove-lifecycle rotten.
Rotten PRs close after an additional 7d of inactivity.

If this PR is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci Bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 26, 2026
@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

The background task completed — it was the pending Prow jobs query that I had already incorporated into the analysis above. The report is complete with all findings included.

To summarize: this is not a test failure — it's a merge conflict. The tide error simply means the PR branch is 2 months stale and conflicts with at least 5 upstream commits that modified the same controller.go file. All e2e jobs are stuck in PENDING because the pipeline won't trigger for an unmergeable PR. The fix is to rebase the branch onto current main.


@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Rotten PRs close after 7d of inactivity.

Reopen the PR by commenting /reopen.
Mark the PR as fresh by commenting /remove-lifecycle rotten.

/close

@openshift-ci openshift-ci Bot closed this Jul 3, 2026
@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@openshift-ci[bot]: Closed this PR.

Details

In response to this:

Rotten PRs close after 7d of inactivity.

Reopen the PR by commenting /reopen.
Mark the PR as fresh by commenting /remove-lifecycle rotten.

/close

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 kubernetes-sigs/prow repository.

@openshift-ci-robot

Copy link
Copy Markdown

@sdminonne: This pull request references Jira Issue OCPBUGS-83514. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

Details

In response to this:

Summary

  • When endpoint service adoption fails in reconcileAWSEndpointServiceStatus, the code was returning the outer CreateVpcEndpointServiceConfiguration error code ("InvalidParameter") instead of the actual error from findExistingVpcEndpointService. This made debugging harder since the logged error and returned error were inconsistent.
  • Return the adoption error wrapped with context so callers see the actual failure reason.

Additional context

This PR addresses item 2 from OCPBUGS-83514. Item 1 (the //go:generate directive in support/awsapi/iam.go) was investigated and confirmed to be intentionally placed by the delegatingclientgenerator template — no code change needed.

Fixes: https://redhat.atlassian.net/browse/OCPBUGS-83514

Ref: PR #7871 review comment

Test plan

  • Verify make build passes
  • Verify make verify passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

  • Improved handling of VPC endpoint service creation errors: reconciler now preserves underlying failure details while annotating issues with the originating AWS error code, yielding clearer, actionable error messages when adoption fails.

  • Tests

  • Added unit tests covering VPC endpoint adoption paths and various cloud API error scenarios to validate reconciliation outcomes and error reporting.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/platform/aws PR/issue for AWS (AWSPlatform) platform jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants