OADP-3562: Fix controller panic on secret key-value parsing#1529
Conversation
|
@stillalearner: This pull request references OADP-3562 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.18.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
mateusoliveira43
left a comment
There was a problem hiding this comment.
Thanks @stillalearner !
But lets ensure we never make this mistake again. Please add loggercheck to .golangci.yaml, as described
Lines 96 to 97 in 94bc5ae
# - ineffassign
+ - loggercheck
# - misspellRunning linters on master with this change, the error is caught
$ make lint
PATH/bin/golangci-lint run
controllers/registry.go:475:47: odd number of arguments passed as key-value pairs for logging (loggercheck)
r.Log.Info("Could not parse secret for %s", key)
^
make: *** [Makefile:553: lint] Error 114b7834 to
8d9f5f5
Compare
mateusoliveira43
left a comment
There was a problem hiding this comment.
For next PRs, do not forget to use the project's PR template for the PR's description
Some examples of using it
|
/hold for CI fix |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, mateusoliveira43, shubham-pampattiwar, stillalearner 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 |
|
/unhold |
|
@stillalearner: 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-sigs/prow repository. I understand the commands that are listed here. |
Fixes -> https://issues.redhat.com/browse/OADP-3562
Tested successfully with empty value for key.
status:
conditions:
message: secret parsing error in key AZURE_STORAGE_ACCOUNT_ACCESS_KEY
reason: Error
status: "False"
type: Reconciled