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

Fixed bug: timeout was not triggered for Image Scanning Job after removing Job#agent_class #14791

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Apr 18, 2017

Bug: Container Image Scanning Jobs do not get timeout when scanning pod fails.

Issue: #14788

Fix: put back original logic (prior to #14356) but use MiqServer instead of agent_class

@miq-bot add-label bug, smart state

@yrudman yrudman force-pushed the fixed-bug-execute-timeout-for-container-image-scanning branch 2 times, most recently from 11faad8 to c805ebf Compare April 18, 2017 18:14
@yrudman
Copy link
Contributor Author

yrudman commented Apr 18, 2017

@miq-bot add-label fine/yes

@yrudman
Copy link
Contributor Author

yrudman commented Apr 18, 2017

@miq-bot assign @gtanzillo

@yrudman yrudman changed the title Fixed bug: timeout was not triggered for Image Scanning Job after removing Job@agent_class Fixed bug: timeout was not triggered for Image Scanning Job after removing Job#agent_class Apr 18, 2017
@yrudman yrudman force-pushed the fixed-bug-execute-timeout-for-container-image-scanning branch from c805ebf to 5f1feb2 Compare April 19, 2017 14:25
@yrudman
Copy link
Contributor Author

yrudman commented Apr 19, 2017

@jrafanie could you review

relation = double("ActiveRecord::Relations")
allow(Job).to receive(:in_my_region).and_return(relation)
allow(relation).to receive(:where).and_return(relation)
allow(relation).to receive(:each).and_yield(@job)
Copy link
Member

Choose a reason for hiding this comment

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

Can you create one or more jobs in the database that you check afterwards for timeout? The mocking and expectations are making it hard to tell what's going on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, stubbing removed

@yrudman yrudman force-pushed the fixed-bug-execute-timeout-for-container-image-scanning branch from 4fe0d92 to 0f98bf8 Compare April 20, 2017 15:14
@yrudman yrudman force-pushed the fixed-bug-execute-timeout-for-container-image-scanning branch from 0f98bf8 to abaf456 Compare April 20, 2017 15:19
@miq-bot
Copy link
Member

miq-bot commented Apr 20, 2017

Checked commits yrudman/manageiq@01fb29e~...abaf456 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 👍

@jrafanie jrafanie merged commit 532b886 into ManageIQ:master Apr 20, 2017
@jrafanie jrafanie deleted the fixed-bug-execute-timeout-for-container-image-scanning branch April 20, 2017 20:00
@jrafanie jrafanie added this to the Sprint 59 Ending Apr 24, 2017 milestone Apr 20, 2017
simaishi pushed a commit that referenced this pull request Apr 20, 2017
…container-image-scanning

Fixed bug: timeout was not triggered for Image Scanning Job after removing Job#agent_class
(cherry picked from commit 532b886)
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit f8dd1d5754d0b6b46206ebd11b46f9db31e142db
Author: Joe Rafaniello <[email protected]>
Date:   Thu Apr 20 16:00:45 2017 -0400

    Merge pull request #14791 from yrudman/fixed-bug-execute-timeout-for-container-image-scanning
    
    Fixed bug: timeout was not triggered for Image Scanning Job after removing Job#agent_class
    (cherry picked from commit 532b886f3a429dac7cee604f2b85b299cc01500f)

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