Bug 1991860: Don't try to record an empty Record if gatherClusterConfigV1 fails#484
Bug 1991860: Don't try to record an empty Record if gatherClusterConfigV1 fails#484mtrmac wants to merge 1 commit intoopenshift:masterfrom
Conversation
Currently, gatherClusterConfigV1 returns (Record{}, error) on failure,
and its caller appends the empty Record into its results; that
later crashes in Record.Filename() because Record.Item is nil.
Instead, be more similar to the sibling function and return a []Record{},
which allows gatherClusterConfigV1 to return no records.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
7d0c1ca to
f47bb91
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mtrmac The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@mtrmac: This pull request references Bugzilla bug 1991860, which is invalid:
Comment 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 kubernetes/test-infra repository. |
|
@mtrmac: The following test failed, say
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/test-infra repository. I understand the commands that are listed here. |
|
/bugzilla refresh |
|
@mtrmac: This pull request references Bugzilla bug 1991860, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (dmisharo@redhat.com), skipping review request. 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 kubernetes/test-infra repository. |
|
@mtrmac Thank you, however it would be nice if you assign the BZ to yourself when you're working on that (or plan to work on that). I have already prepared tremes@e348871 |
I’m afraid I’m not going to to take the lead on this; this is a three-levels-deep dependency on some other work I’m actually doing, and I know basically nothing about the insights operator. Feel free to treat this as a third-party drive-by PR; if you want to disconnect it from the bug, reprioritize the bug to some other time, or fix it in some other way, any of that is perfectly fine with me. |
|
@mtrmac No problem. The change is fine. I was only little bit surprised :) OK so let me take your commit and add mine there and I will open a new PR if you're OK with that. |
|
/close |
|
@tremes: Closed this PR. 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 kubernetes/test-infra repository. |
|
@mtrmac: This pull request references Bugzilla bug 1991860. The bug has been updated to no longer refer to the pull request using the external bug tracker. 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 kubernetes/test-infra repository. |
Currently,
gatherClusterConfigV1returns(Record{}, error)on failure, and its caller appends the emptyRecordinto its results; that later crashes inRecord.Filename()becauseRecord.Itemisnil.Instead, be more similar to the sibling function and return a
[]Record{}, which allowsgatherClusterConfigV1to return no records.Categories
Sample Archive
See https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_machine-config-operator/2695/pull-ci-openshift-machine-config-operator-master-e2e-aws-disruptive/1421081909886193664
Documentation
Unit Tests
N/A, the existing code doesn’t have unit tests of this nature.
Privacy
N/A, no newly collected information.
Changelog
?
Breaking Changes
No
References
None