Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2034484: Library go bump #716

Merged
merged 5 commits into from
Jan 7, 2022

Conversation

eggfoobar
Copy link
Contributor

Bumping the library-go dependency to latest, this should take advantage of leader election changes for SNO clusters proposed in this library-go PR and performance improvements in this PR.

Changes:

  • updated library-go to latest
  • added logic to make use of leader election configs from library-go

Generated with:

  $ go get github.com/openshift/library-go
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.17.3 linux/amd64
@jottofar
Copy link
Contributor

This appears to be a dup (at least partially) of #710.
/hold
/cc @wking

@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 Dec 16, 2021
@ggiguash
Copy link

/retest-required

2 similar comments
@ggiguash
Copy link

/retest-required

@ggiguash
Copy link

/retest-required

@qJkee
Copy link
Contributor

qJkee commented Dec 28, 2021

@jottofar
This PR brings the latest changes of library-go with OCPVE team features, while #710 is the old one

@vrutkovs vrutkovs mentioned this pull request Jan 3, 2022
@vrutkovs
Copy link
Member

vrutkovs commented Jan 3, 2022

/approve
/lgtm
/retest

Trevor, please pull the hold if this looks good to you as well

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 3, 2022
@wking
Copy link
Member

wking commented Jan 4, 2022

f81233d touches go.mod and go.sum, but doesn't seem to change any vendored code. Can we drop that commit or squash it into 577e121 or something?

@wking
Copy link
Member

wking commented Jan 4, 2022

edc3628 looks like it could get squashed into b92dee3 as well.

@wking
Copy link
Member

wking commented Jan 4, 2022

Ok, I think I've wrapped my head around this, and the changes break down like:

  1. Bump library-go, as in vendor: Bump library-go #710.
  2. Fix Handler -> ProbeHandler, as in vendor: Bump library-go #710.
  3. Move from ObjectReflectDiff to github.com/google/go-cmp/cmp.Diff, which was the bit I was missing in vendor: Bump library-go #710. I've just updated vendor: Bump library-go #710 with b859c46 to bring over this part.
  4. The pkg/start changes, which is the point of the single-node effort.

I think those should be separate commits, and my just-updated #710 covers the first three points as a no-functional-change vendor bump. That would leave this pull request for the final pkg/start changes. Or feel free to generate your own commits for all of those steps in this PR, if you'd rather not use the ones from #710. But I'd rather not have vendor/ changes mixed into the same commit that lands the pkg/start changes, because then it's harder to find the "a human carefully crafted $CHANGES because $REASONS" portion inside the "and then the robots bumped all of these vendor/` files too" noise ;).

eggfoobar and others added 2 commits January 4, 2022 09:06
Because ObjectReflectDiff is deprecated and doesn't handle the
internal 'id' property.  We're using the recommended replacement [1].

[1]: https://github.com/kubernetes/apimachinery/blob/de7147de41c9331e4697399f48564f1d970cc01e/pkg/util/diff/diff.go#L70
Now that we're using these in the pkg/payload unit tests.  Generated
with:

  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.17.3 linux/amd64
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 4, 2022
leader election configs are now delegated to library-go and are topology aware
integration test was updated to set the new leader election configs

ran:

go mod tidy && go mod vendor && go mod verify

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar
Copy link
Contributor Author

Thanks for the break down @wking , I'm all for making things easier to reason about. So if we want to merge in #710 I can rebase off of that and we can have this be a much simpler PR. I did pull in your changes into this PR, just incase, if we want to take that route then this PR is ready to go.


if infra, err := clusterstatus.GetClusterInfraStatus(ctx, restcfg); err == nil && infra != nil {
if infra.ControlPlaneTopology == configv1.SingleReplicaTopologyMode {
return libgoleaderelection.LeaderElectionSNOConfig(defaultLeaderElection)
Copy link
Member

Choose a reason for hiding this comment

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

We're not all that particular about our lease settings, and we do have reasonably solid graceful shutdown logic where we release the leases when termination gives us enough time to do that. So I'm personally fine simplifying all of this and just using libgoleaderelection.LeaderElectionSNOConfig all the time, regardless of the Infrastructure configuration. Thoughts?

@vrutkovs
Copy link
Member

vrutkovs commented Jan 7, 2022

/retest

@eggfoobar eggfoobar changed the title Library go bump Bug 2034484: Library go bump Jan 7, 2022
@openshift-ci openshift-ci bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jan 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@eggfoobar: This pull request references Bugzilla bug 2034484, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

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

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (jhou@redhat.com), skipping review request.

In response to this:

Bug 2034484: Library go bump

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 bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jan 7, 2022
Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/hold cancel
/lgtm

etcd leader election and PDB issues are unrelated:

/override ci/prow/e2e-agnostic-upgrade

KubePersistentVolumeErrors are unrelated:

/override ci/prow/e2e-agnostic

@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 Jan 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@wking: Overrode contexts on behalf of wking: ci/prow/e2e-agnostic, ci/prow/e2e-agnostic-upgrade

In response to this:

/hold cancel
/lgtm

etcd leader election and PDB issues are unrelated:

/override ci/prow/e2e-agnostic-upgrade

KubePersistentVolumeErrors are unrelated:

/override ci/prow/e2e-agnostic

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 Jan 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eggfoobar, vrutkovs, wking

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

The pull request process is described here

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@eggfoobar: all tests passed!

Full PR test history. Your PR dashboard.

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 addb685 into openshift:master Jan 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@eggfoobar: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 2034484 has not been moved to the MODIFIED state.

In response to this:

Bug 2034484: Library go bump

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants