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

Fix supports_capture assuming MetricsCapture class #18233

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

agrare
Copy link
Member

@agrare agrare commented Nov 26, 2018

The supports :capture block assumes that the MetricsCapture class always
exists even if metrics capture is unsupported which is not the case.

Modify the block to check for the existence of the metrics capture class
before checking its instance methods.

Also fix the unsupported_reason_add setting the reason to the wrong
feature key (:metrics when should have been :capture).

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638045

@agrare agrare force-pushed the bz_1638045_fix_supports_capture branch from cb25ab0 to 1a82027 Compare November 26, 2018 17:54
@agrare agrare force-pushed the bz_1638045_fix_supports_capture branch from 1a82027 to 8f33539 Compare November 26, 2018 18:07
The supports :capture block assumes that the MetricsCapture class always
exists even if metrics capture is unsupported which is not the case.

Modify the block to check for the existence of the metrics capture class
before checking its instance methods.

Also fix the unsupported_reason_add setting the reason to the wrong
feature key (:metrics when should have been :capture).

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638045
@agrare agrare force-pushed the bz_1638045_fix_supports_capture branch from 8f33539 to 6e33bbe Compare November 26, 2018 18:29
@miq-bot
Copy link
Member

miq-bot commented Nov 26, 2018

Checked commit agrare@6e33bbe with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@kbrock kbrock merged commit 603d59a into ManageIQ:master Nov 26, 2018
@kbrock kbrock added this to the Sprint 100 Ending Dec 3, 2018 milestone Nov 26, 2018
@kbrock kbrock self-assigned this Nov 26, 2018
@agrare agrare deleted the bz_1638045_fix_supports_capture branch November 26, 2018 18:59
@simaishi
Copy link
Contributor

@agrare hammer/yes ?

simaishi pushed a commit that referenced this pull request Nov 27, 2018
Fix supports_capture assuming MetricsCapture class

(cherry picked from commit 603d59a)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638045
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 43ed8cb994eb57ae7f71eb0f3da0483660bc2c65
Author: Keenan Brock <[email protected]>
Date:   Mon Nov 26 13:54:42 2018 -0500

    Merge pull request #18233 from agrare/bz_1638045_fix_supports_capture
    
    Fix supports_capture assuming MetricsCapture class
    
    (cherry picked from commit 603d59a07d00289e03c0936f371145b2abe725d4)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants