mce-2.4: Revert builder.Unreachable() and add reachable check to builder.Build()#2120
Conversation
This reverts commit 576401b.
With the controller-runtime upgrade from 8cfdcca, our remote client `Builder` interface's `Build()` method got lazier. Before, if the remote client was unreachable, `Build()` itself would fail. Now it won't fail until the resulting client is actually used. This resulted in our "unreachable" controller incorrectly marking the ClusterDeployment's APIURLOverride as reachable when it wasn't, which had the ripple effect of making the clustersync controller fail early by trying to use that URL rather than falling back to the default. This was exposed in situations where the DNS for the APIURLOverride was being configured via a syncset: the clustersync controller tried to use a URL that wouldn't resolve, so it couldn't sync the resource that would make that DNS work. To fix, this commit adds a check in the `Build()` method of the `Builder` interface. This internally builds the client and then uses it to query the `/apis` of the remote client. HIVE-2300 Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
/assign @2uasimojo |
|
Clean backport /lgtm |
|
/test all hello prow? |
|
@2uasimojo: No presubmit jobs available for openshift/hive@mce-2.4 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 kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, lleshchi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Whoah. We don't have prow configs for mce-2.4. (I thought we did because #2119 "passed" -- but it looks like it ran against master. Why? Because I initially opened the PR against master and then switched it. But still... you would think it would have cut over.) /hold |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## mce-2.4 #2120 +/- ##
========================================
Coverage 57.49% 57.49%
========================================
Files 187 187
Lines 25749 25734 -15
========================================
- Hits 14804 14797 -7
+ Misses 9709 9700 -9
- Partials 1236 1237 +1
|
|
CI jobs are ready. I could /test all, but I think that would be overkill (we don't really need e2e-gcp/azure). Gonna try close and reopen... |
|
okay, I have no idea what's going on with prow here. /retest |
|
/hold cancel |
|
@lleshchi: 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/test-infra repository. I understand the commands that are listed here. |
Backport #2109
HIVE-2300