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

Update controller-runtime to (unreleased) master #1451

Merged

Conversation

2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Jul 9, 2021

We were using a controller-runtime fork so we could disable a metric that was causing a cardinality explosion and memory problems.

Upstream controller-runtime has now disabled that metric by default; so this commit switches back to using upstream.

NOTE: We're using an unreleased upstream version.

part of HIVE-1560

@openshift-ci openshift-ci bot requested review from joelddiaz and twiest July 9, 2021 19:20
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2021
We were using a
[controller-runtime fork](github.com/openshift-hive/controller-runtime)
so we could
[disable a metric](openshift-hive/controller-runtime@e847e4b)
that was causing a cardinality explosion and memory problems.

Upstream controller-runtime has now
[disabled that metric by default](kubernetes-sigs/controller-runtime#1587);
so this commit switches back to using upstream.

NOTE: We're using an unreleased upstream version.
@dgoodwin
Copy link
Contributor

Looks like some legit failures due to new code, but this will be great once passing.

@2uasimojo
Copy link
Member Author

@dgoodwin you okay with using unreleased?

@dgoodwin
Copy link
Contributor

I can go either way, do we know how long until release expected?

@2uasimojo
Copy link
Member Author

According to Alvaro, it will "take some time".

@dgoodwin
Copy link
Contributor

Probably best to keep what we have now and is stable until it's released, and then make the move to 0.9.x which we also have a card for.

@2uasimojo
Copy link
Member Author

Okay. (It'll be 0.10.x when it happens, since this is a breaking change.)

@2uasimojo
Copy link
Member Author

Well.
I just looked at what's changed since 0.9.2, other than my two commits that we were planning to cherry-pick anyway.
It's just kubernetes-sigs/controller-runtime#1573. Can we agree the risk of pulling this in is negligible and move forward with this change?

@2uasimojo 2uasimojo changed the title Update controller-runtime to (unreleased) master [WIP] Update controller-runtime to (unreleased) master Jul 12, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2021
@2uasimojo
Copy link
Member Author

I'm working on updating the tests. The major change in controller-runtime that our reconcile tests now have to accommodate is that the fake client now does Delete more closely to reality, in terms of handling finalizers properly. Many (many) tests were written against the old (incorrect) behavior: deleting the object regardless of finalizers.

@dgoodwin
Copy link
Contributor

Well.
I just looked at what's changed since 0.9.2, other than my two commits that we were planning to cherry-pick anyway.
It's just kubernetes-sigs/controller-runtime#1573. Can we agree the risk of pulling this in is negligible and move forward with this change?

Yeah that's fine.

Update tests for controller-runtime changes from 0.8.2 to 0.9.2(+).

Most of these changes react to
kubernetes-sigs/controller-runtime#1399, which
made the fake client's Delete behave more like the real thing:
- If the object has finalizers, set `DeletionTimestamp` but don't
actually delete.
- If there are no finalizers, actually delete.
- Updates that remove the last finalizer from an object with a
`DeletionTimestamp` actually delete the object.

Then there's
kubernetes-sigs/controller-runtime#1390 which
deduplicates objects in the reconcile queue for Update actions.
@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #1451 (5246a66) into master (023f095) will increase coverage by 0.60%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   40.50%   41.10%   +0.60%     
==========================================
  Files         334      334              
  Lines       26774    30059    +3285     
==========================================
+ Hits        10844    12355    +1511     
- Misses      14893    16658    +1765     
- Partials     1037     1046       +9     
Impacted Files Coverage Δ
pkg/test/manager/mock/manager_generated.go 9.33% <0.00%> (-0.11%) ⬇️
pkg/test/statefulset/statefulset.go 84.21% <0.00%> (-3.79%) ⬇️
pkg/test/job/job.go 87.50% <0.00%> (-2.98%) ⬇️
pkg/test/selectorsyncset/selectorsyncset.go 72.72% <0.00%> (-2.28%) ⬇️
pkg/test/namespace/namespace.go 92.59% <0.00%> (-1.86%) ⬇️
pkg/test/configmap/configmap.go 94.59% <0.00%> (-1.41%) ⬇️
pkg/util/logrus/logr.go 90.90% <0.00%> (-1.40%) ⬇️
pkg/test/clusterrelocate/clusterrelocate.go 94.44% <0.00%> (-1.21%) ⬇️
pkg/test/clusterclaim/clusterclaim.go 95.74% <0.00%> (-1.14%) ⬇️
pkg/controller/utils/dnszone.go 50.00% <0.00%> (-1.07%) ⬇️
... and 295 more

@dgoodwin
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 13, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, dgoodwin

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

@2uasimojo 2uasimojo changed the title [WIP] Update controller-runtime to (unreleased) master Update controller-runtime to (unreleased) master Jul 13, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 13, 2021
@2uasimojo
Copy link
Member Author

/test e2e

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 3cdbf30 into openshift:master Jul 14, 2021
@2uasimojo 2uasimojo deleted the controller-runtime-latest branch July 14, 2021 13:21
2uasimojo added a commit to 2uasimojo/release that referenced this pull request Sep 24, 2021
We removed this test via f0292ed / openshift#19059 while awaiting a
controller-runtime bump. Said bump was done via
openshift/hive#1451, so we're ready to restore
it.

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

4 participants