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

safe_call should catch Fog::Errors::NotFound #156

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

mansam
Copy link
Contributor

@mansam mansam commented Nov 14, 2017

Some fog calls raise subclasses of Fog::Errors::NotFound instead of Excon::Errors::NotFound. This change allows safe_call (and by extension safe_list) to handle those cases.

This should fix issues with deleted flavors crashing refresh despite the catch, since list_tenants_with_flavor_access throws Fog::Compute::OpenStack::NotFound.

@miq-bot
Copy link
Member

miq-bot commented Nov 14, 2017

Checked commit mansam@a406f66 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@aufi
Copy link
Member

aufi commented Nov 15, 2017

Nice catch Sam 💯 Looks good to me, merging!

@aufi aufi merged commit 84121cb into ManageIQ:master Nov 15, 2017
@aufi aufi added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 15, 2017
simaishi pushed a commit that referenced this pull request Nov 15, 2017
safe_call should catch Fog::Errors::NotFound
(cherry picked from commit 84121cb)
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit c84263978a31f77b58a50441951ff4248d7231f8
Author: Marek Aufart <aufi.cz@gmail.com>
Date:   Wed Nov 15 09:14:36 2017 +0100

    Merge pull request #156 from mansam/safe_call_catch_fog_not_found_errors
    
    safe_call should catch Fog::Errors::NotFound
    (cherry picked from commit 84121cb85efa6d20d1121308529036914222484a)

@simaishi
Copy link
Contributor

simaishi commented Dec 1, 2017

@mansam Please add BZ link.

@mansam
Copy link
Contributor Author

mansam commented Dec 8, 2017

@simaishi
Copy link
Contributor

simaishi commented Mar 5, 2018

@mansam 2 BZs you referenced are already CLOSED/ERRATA for Fine branch. I'd need a non-closed BZ so it's clear what this particular PR will be fixing for a particular build...

@mansam
Copy link
Contributor Author

mansam commented Mar 6, 2018

@simaishi That makes sense, this PR was a response to comments made on the BZ after it was already closed and I suppose I should have opened a new BZ for the fix. Coincidentally, a new fine BZ was just opened that I think should be fixed by this as well: https://bugzilla.redhat.com/show_bug.cgi?id=1552135

@simaishi
Copy link
Contributor

simaishi commented Apr 9, 2018

Fine backport (to manageiq repo) details:

$ git log -1
commit 1c3fe51d3473674096a5da8c37a7852dbfc41327
Author: Marek Aufart <aufi.cz@gmail.com>
Date:   Wed Nov 15 09:14:36 2017 +0100

    Merge pull request #156 from mansam/safe_call_catch_fog_not_found_errors
    
    safe_call should catch Fog::Errors::NotFound
    (cherry picked from commit 84121cb85efa6d20d1121308529036914222484a)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1552135

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.

4 participants