Bug 1124756 - XML-RPC fault: <type 'exceptions.AttributeError'>:'RecipeTask' object has no attribute 'record_activity'
Summary: XML-RPC fault: <type 'exceptions.AttributeError'>:'RecipeTask' object has no ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: scheduler
Version: 0.17
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: 0.17.3
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 08:55 UTC by Marian Ganisin
Modified: 2018-02-06 00:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-14 04:50:29 UTC


Attachments (Terms of Use)

Description Marian Ganisin 2014-07-30 08:55:27 UTC
Description of problem:

Attempt to cancel _task_ produces traceback:

$ bkr job-cancel T:23169487
XML-RPC fault: <type 'exceptions.AttributeError'>:'RecipeTask' object has no attribute 'record_activity'

This seems to be regression in comparison to older version where same command worked fine.

Comment 2 Nick Coghlan 2014-07-30 11:22:30 UTC
This is likely related to bug 995012, which added an audit trail for job activity. In particular: http://gerrit.beaker-project.org/#/c/3059/12/Server/bkr/server/task_actions.py

There's a pylint check that should have caught this prior to release, but we currently have it disabled due to a limitation of the way we're currently declaring our SQL Alchemy models. We were already looking into how to fix that, but I've now captured it explicitly as bug 1124804.

Comment 3 Dan Callaghan 2014-08-04 00:03:34 UTC
Hmm I didn't even think it was possible to cancel individual tasks. Obviously our test suite doesn't cover it. And a few years ago we removed the ability to cancel recipes because it has some problematic implications (what happens to other recipes in the recipe set? they presumably will not run properly).

Marian, what is the purpose of cancelling an individual task? What's the expected behaviour of the harness in that case? I'm guessing right now the task might be skipped if it's cancelled before the recipe starts, otherwise I imagine beah will just run it normally (but probably fail to report the results for it).

Comment 4 Marian Ganisin 2014-08-05 12:52:18 UTC
(In reply to Dan Callaghan from comment #3)
> Marian, what is the purpose of cancelling an individual task? What's the
> expected behaviour of the harness in that case? I'm guessing right now the
> task might be skipped if it's cancelled before the recipe starts, otherwise
> I imagine beah will just run it normally (but probably fail to report the
> results for it).

1) From time to time it is useful to cancel running test for several reasons (while this is quite clear surprisingly it is more frequent then I would expect)

2) It seems to be pretty good practice to group tests into one job/recipe to save resources and this really happens.

This is it!

Need of canceling tests and need of saving resources causes a requirement to cancel beaker tasks.

For the harness at this moment it is sufficient to skip canceled task and it does not matter what happens when running task is canceled (it could be handy to stop its execution, however it is another story and another bug; this report is for the regression stated in initial description).

Comment 5 Marian Ganisin 2014-08-05 12:55:35 UTC
(In reply to Marian Ganisin from comment #4)

> 1) From time to time it is useful to cancel running test

I should state *scheduled* test. Scheduled/running/(whatever state before it is completed) is just "running" from my point of view.

It should be clear also from my description of behavior of harness (I do care about skipping scheduled tasks, and I do not care to much about canceling already running tasks)

> for several reasons
> (while this is quite clear surprisingly it is more frequent then I would
> expect)

Comment 6 matt jia 2014-08-06 06:45:30 UTC
Other than fixing the regression, we also need to record the task cancellations activities. https://bugzilla.redhat.com/show_bug.cgi?id=1127088

Comment 7 matt jia 2014-08-07 06:15:33 UTC
On Gerrit:

http://gerrit.beaker-project.org/#/c/3233/

Cheers, Matt Jia

Comment 10 Amit Saha 2014-08-14 04:50:29 UTC
Beaker 0.17.3 has been released (https://beaker-project.org/docs/whats-new/release-0.17.html#beaker-0-17-3)


Note You need to log in before you can comment on or make changes to this bug.