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 #434

Merged
merged 4 commits into from Jan 13, 2022

Conversation

eggfoobar
Copy link
Contributor

@eggfoobar eggfoobar commented Dec 15, 2021

Bumping the library-go dependency to latest, this should take advantage of performance improvements in this PR.

Changes:

  • bump: updated library-go to latest
  • updated to pass context down to calling library-go functions
  • updated static resource apply to use cache improvements
  • updated method call for setloglevel

xref: https://issues.redhat.com/browse/CNF-2808

@eggfoobar eggfoobar force-pushed the library_go_bump branch 3 times, most recently from e6da711 to 59c3527 Compare December 21, 2021 18:49
@jerpeter1
Copy link
Member

/retest-required

@eggfoobar
Copy link
Contributor Author

Unit tests are failing at this point, there were some changes with the fake package but from what I could gather nothing that would cause this behavior. After debugging and stepping through the test it seems like the reconcile is behaving correctly, at this point I don't have the context to say if the unit test is broken or if there's a logic issue.

@joelddiaz is there any context you can provide on the expected behavior?

--- FAIL: TestCredentialsRequestReconcile (0.37s)
    --- FAIL: TestCredentialsRequestReconcile/existing_passthrough_credential (0.01s)
        credentialsrequest_controller_test.go:650: 
            	Error Trace:	credentialsrequest_controller_test.go:650
            	            				credentialsrequest_controller_test.go:1360
            	Error:      	Not equal: 
            	            	expected: "FAKEAWSACCESSKEYID"
            	            	actual  : "rootaccesskey"
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1 +1 @@
            	            	-FAKEAWSACCESSKEYID
            	            	+rootaccesskey
            	Test:       	TestCredentialsRequestReconcile/existing_passthrough_credential
        credentialsrequest_controller_test.go:652: 
            	Error Trace:	credentialsrequest_controller_test.go:652
            	            				credentialsrequest_controller_test.go:1360
            	Error:      	Not equal: 
            	            	expected: "KEEPITSECRET"
            	            	actual  : "rootsecretkey"
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1 +1 @@
            	            	-KEEPITSECRET
            	            	+rootsecretkey
            	Test:       	TestCredentialsRequestReconcile/existing_passthrough_credential
    --- FAIL: TestCredentialsRequestReconcile/existing_passthrough_credential_bypassing_simulations (0.01s)
        credentialsrequest_controller_test.go:687: 
            	Error Trace:	credentialsrequest_controller_test.go:687
            	            				credentialsrequest_controller_test.go:1360
            	Error:      	Not equal: 
            	            	expected: "FAKEAWSACCESSKEYID"
            	            	actual  : "rootaccesskey"
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1 +1 @@
            	            	-FAKEAWSACCESSKEYID
            	            	+rootaccesskey
            	Test:       	TestCredentialsRequestReconcile/existing_passthrough_credential_bypassing_simulations
        credentialsrequest_controller_test.go:689: 
            	Error Trace:	credentialsrequest_controller_test.go:689
            	            				credentialsrequest_controller_test.go:1360
            	Error:      	Not equal: 
            	            	expected: "KEEPITSECRET"
            	            	actual  : "rootsecretkey"
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1 +1 @@
            	            	-KEEPITSECRET
            	            	+rootsecretkey
            	Test:       	TestCredentialsRequestReconcile/existing_passthrough_credential_bypassing_simulations

@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #434 (8086425) into master (895e9c1) will decrease coverage by 0.93%.
The diff coverage is 12.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #434      +/-   ##
==========================================
- Coverage   46.35%   45.41%   -0.94%     
==========================================
  Files          92       92              
  Lines        9206     9229      +23     
==========================================
- Hits         4267     4191      -76     
- Misses       4418     4532     +114     
+ Partials      521      506      -15     
Impacted Files Coverage Δ
pkg/assets/bootstrap/bindata.go 23.85% <ø> (ø)
pkg/operator/awspodidentity/controller.go 0.00% <0.00%> (ø)
pkg/operator/loglevel/controller.go 49.15% <100.00%> (ø)
.../cmd/provisioning/alibabacloud/delete-ram-users.go 7.61% <0.00%> (-29.50%) ⬇️
pkg/alibabacloud/mock/client_generated.go 54.00% <0.00%> (-22.60%) ⬇️
pkg/gcp/actuator/actuator.go 53.39% <0.00%> (-3.07%) ⬇️
pkg/azure/actuator.go 53.95% <0.00%> (-2.88%) ⬇️
pkg/alibabacloud/client.go 0.00% <0.00%> (ø)
.../cmd/provisioning/alibabacloud/create-ram-users.go 39.01% <0.00%> (+0.33%) ⬆️

@ggiguash
Copy link

/retest-required

1 similar comment
@ggiguash
Copy link

ggiguash commented Jan 4, 2022

/retest-required

@joelddiaz
Copy link
Contributor

@eggfoobar #438 has merged so you should re-base on top of that/master now

updated library go to latest

Signed-off-by: ehila <ehila@redhat.com>

upkeep: ran make update

Signed-off-by: ehila <ehila@redhat.com>
Signed-off-by: ehila <ehila@redhat.com>

fix: unit test for cleanup stale state

Fake client now respects finalizers, if any are present
delete functionality will simulate real cluster resource delete
More info: kubernetes-sigs/controller-runtime#1399

Signed-off-by: ehila <ehila@redhat.com>

fix: updated unit tests mock object with max call

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

/retest-required

2 similar comments
@eggfoobar
Copy link
Contributor Author

/retest-required

@eggfoobar
Copy link
Contributor Author

/retest-required

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

/retest-required

@ggiguash
Copy link

/retest-required

@eggfoobar
Copy link
Contributor Author

/assign @joelddiaz

} else {
fakeClient = fake.NewFakeClient()
fakeClient = fake.NewClientBuilder().WithRuntimeObjects().Build()
Copy link
Member

Choose a reason for hiding this comment

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

Is

Suggested change
fakeClient = fake.NewClientBuilder().WithRuntimeObjects().Build()
fakeClient = fake.NewClientBuilder().Build()

a legitimate way to spell this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, updated to remove redundant builder function call

@joelddiaz
Copy link
Contributor

/test e2e-gcp
/test e2e-azure

@@ -287,7 +287,7 @@ func testPassthroughCredentialsRequest(t *testing.T) *minterv1.CredentialsReques
ObjectMeta: metav1.ObjectMeta{
Name: testStaleCRName,
Namespace: testNamespace,
Finalizers: []string{minterv1.FinalizerDeprovision},
Finalizers: []string{},
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than this, can we leave the Finalizer, but change the codepath that verifies deltion from assert.Nil() to assert.NotNil(t, cr.DeletionTimestamp, ...) specifically:

-                               assert.Nil(t, cr, "expected credentials request to be deleted")
+                               assert.NotNil(t, cr.DeletionTimestamp, "expected credentials request to be marked for deletion")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely, updated

updated unit test to retain FinalizerDeprovision for cleanup_controller_test.go
modified client builder to remove unneeded builder function call

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

@joelddiaz joelddiaz left a comment

Choose a reason for hiding this comment

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

/lgtm

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

openshift-ci bot commented Jan 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eggfoobar, joelddiaz

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 13, 2022
@openshift-bot
Copy link
Contributor

/retest-required

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 13, 2022

@eggfoobar: The following tests 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/e2e-azure-upgrade 59c3527 link false /test e2e-azure-upgrade
ci/prow/e2e-gcp 0212d37 link false /test e2e-gcp

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

openshift-ci bot commented Jan 13, 2022

@eggfoobar: Bugzilla bug 2034484 is in an unrecognized state (ON_QA) and will not be 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.

None yet

7 participants