Skip to content

mce-2.4: Revert builder.Unreachable() and add reachable check to builder.Build()#2120

Merged
openshift-merge-robot merged 2 commits intoopenshift:mce-2.4from
lleshchi:mce-2.4
Sep 28, 2023
Merged

mce-2.4: Revert builder.Unreachable() and add reachable check to builder.Build()#2120
openshift-merge-robot merged 2 commits intoopenshift:mce-2.4from
lleshchi:mce-2.4

Conversation

@lleshchi
Copy link
Copy Markdown
Contributor

Backport #2109

HIVE-2300

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>
@lleshchi
Copy link
Copy Markdown
Contributor Author

/assign @2uasimojo

@openshift-ci openshift-ci Bot requested review from abutcher and dlom September 26, 2023 17:35
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2023
@2uasimojo
Copy link
Copy Markdown
Member

Clean backport

/lgtm

@2uasimojo
Copy link
Copy Markdown
Member

/test all

hello prow?

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 26, 2023

@2uasimojo: No presubmit jobs available for openshift/hive@mce-2.4

Details

In response to this:

/test all

hello prow?

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.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 26, 2023

[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

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

@2uasimojo
Copy link
Copy Markdown
Member

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

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 28, 2023

Codecov Report

Merging #2120 (1a9b170) into mce-2.4 (4418e43) will increase coverage by 0.00%.
Report is 3 commits behind head on mce-2.4.
The diff coverage is 21.42%.

Additional details and impacted files

Impacted file tree graph

@@           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     
Files Coverage Δ
pkg/remoteclient/fake.go 0.00% <ø> (ø)
pkg/remoteclient/mock/remoteclient_generated.go 68.96% <ø> (-3.77%) ⬇️
...g/controller/unreachable/unreachable_controller.go 59.09% <50.00%> (ø)
pkg/remoteclient/remoteclient.go 74.12% <33.33%> (+2.01%) ⬆️
pkg/remoteclient/kubeconfig.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@2uasimojo
Copy link
Copy Markdown
Member

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...

@2uasimojo 2uasimojo closed this Sep 28, 2023
@2uasimojo 2uasimojo reopened this Sep 28, 2023
@2uasimojo
Copy link
Copy Markdown
Member

okay, I have no idea what's going on with prow here.

/retest

@2uasimojo
Copy link
Copy Markdown
Member

/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 Sep 28, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 28, 2023

@lleshchi: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f31cb8e into openshift:mce-2.4 Sep 28, 2023
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants