Translation template build jobs should use the new BuildFarmJob

Bug #685624 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
William Grant

Bug Description

From yesterday's buildd manager logs:

2010-12-04 23:40:45+0000 [-] Miserable failure when trying to examine failure counts:
2010-12-04 23:40:45+0000 [-] Traceback (most recent call last):
2010-12-04 23:40:45+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-12004/lib/lp/buildmaster/manager.py", line 168, in _scanFailed
2010-12-04 23:40:45+0000 [-] build_farm_job = builder.getCurrentBuildFarmJob()
2010-12-04 23:40:45+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-12004/lib/lp/buildmaster/model/builder.py", line 820, in getCurrentBuildFarmJob
2010-12-04 23:40:45+0000 [-] return self.currentjob.specific_job.build
2010-12-04 23:40:45+0000 [-] ForbiddenAttribute: ('build', <TRANSLATION_TEMPLATES_BUILD branch job (2196254) for ~synapse-core/synapse-project/trunk>)

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

Thinks like this would ideally generate an OOPS.

Changed in soyuz:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Julian Edwards (julian-edwards) wrote :

This is a known issue. It's happening because the Translations jobs are not yet converted to the "new" BuildFarmJob style (and thus have no history in the builders).

Deliberately, it's not an oops.

Changed in soyuz:
importance: High → Low
summary: - forbidden attribute examining failure counts
+ Translation template build jobs should use the new BuildFarmJob
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Hopefully Danilo/Jeroen are going to fix this soon :)

Revision history for this message
Данило Шеган (danilo) wrote :

|Julian, I thought we did everything that's "on our side" to unblock Soyuz guys to fix everything that's remaining: i.e. we do construct "new" objects. If I understood correctly, ".build" reference is from the old model and we never used (or provided) it in Translations.

Changed in rosetta:
status: New → Incomplete
Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 685624] Re: Translation template build jobs should use the new BuildFarmJob

 status new

On Monday 13 December 2010 14:21:51 you wrote:
> |Julian, I thought we did everything that's "on our side" to unblock
>
> Soyuz guys to fix everything that's remaining: i.e. we do construct
> "new" objects. If I understood correctly, ".build" reference is from the
> old model and we never used (or provided) it in Translations.

Hi

The work that needs doing is all Translations-side, the build farm was
prepared and ready for this change a while ago, and Aaron changed the Code
jobs to use the new schema.

The .build reference is available on the new-style schema only, which is why
it fails for Translations.

Changed in rosetta:
status: Incomplete → New
Changed in launchpad:
status: New → Triaged
Revision history for this message
Данило Шеган (danilo) wrote :

Ok, so this is my take on what the problem might be:

 - Translations currently implements TranslationTemplatesBuild which is the "new model" class (BuildFarmJobDerived-class)
 - Translations currently uses only the old-style class based on BuildFarmJobOldDerived in TranslationTemplatesBuildJob
 - There is no link between the two
 - Builder.getCurrentBuildFarmJob() tries to get the "new" class by following the "build" from the old-style TranslationTemplatesBuildJob class; i.e. in traceback above, self.currentjob.specific_job is an instance of TranslationTemplatesBuildJob (old-style)

To fix the above, we can either get TranslationTemplatesBuild directly when job_type == translations, or we can hack that into old-style TranslationTemplatesBuildJob.

Ideally, if everything else already supports the new model, we would just switch the implementation of getCurrentBuildFarmJob() to get new-style classes for everything directly, thus allowing us to get rid of the old code.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Hi Danilo,

As far as I'm aware, the specific_job attribute was added as an attribute on IBuildQueue, as a way for a build queue item to return the specific *old-style* build farm job (ie. a model which just linked a Build with a Job). I say as far as I'm aware as it's not code that I wrote (I think Muharem added this), but I did have to move it around. So here's what I know - hope it helps (sorry if I'm just re-stating stuff you already know):

You'll see that the implementation calls IBuildFarmJobOld.getByJob(), and the other implementations of this are used by the classes SourcePackageRecipeBuildJob (Code) and BuildPackageJob (soyuz), both of which just link Job<->Build. These are the objects currently returned by specific_job. But for translations, the equivalent model is TranslationTemplatesBuildJob which *doesn't* link a build at all (in fact, it seems to link job<->branch (BranchJobDerived). That is an error with the current code - AIUI specific_job should be returning something that links job<->build.

But as you note, it may now be possible to switch all the builds over and get rid of the BFJOld stuff (and specific_job) for ever (yay). I'm not in a position to comment there (I haven't been following the code changes for a while), but William is probably a good bet to know if this is now possible.

Hope that helps!

Revision history for this message
Данило Шеган (danilo) wrote :

Ok, after discussing with William, we agreed that it should be enough to provide TTBJ.build which points to TTB. Not sure we can do this without the DB schema change, but I am trying to figure this out now.

Revision history for this message
Данило Шеган (danilo) wrote :

While trying to read the code around this, I was a bit annoyed (that's an understatement) that TTBJ is both a branch and a build farm job. I've filed that as a separate bug 691530 about cleaning that up.

Changed in launchpad:
assignee: nobody → Данило Шеган (danilo)
status: Triaged → In Progress
tags: added: bugjam2010
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
William Grant (wgrant) wrote :

The fix doesn't break anything, but it also doesn't quite fix the issue: TTBJ.build isn't on any interface, so buildd-manager still gets a ForbiddenAttribute. After adding that it works OK, so this can roll out for now, and I'll land a fix for the interface shortly.

tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Данило Шеган (danilo) wrote :

William, I am assuming you have fixed the interface error. If not, please re-open the bug.

Changed in launchpad:
status: Fix Committed → Fix Released
William Grant (wgrant)
Changed in launchpad:
status: Fix Released → In Progress
assignee: Данило Шеган (danilo) → William Grant (wgrant)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad:
milestone: none → 11.01
Curtis Hovey (sinzui)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.