1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
# pylint: disable-msg=E0211,E0213
"""Common build interfaces."""
__metaclass__ = type
__all__ = [
'BuildStatus',
'BuildFarmJobType',
]
from lazr.enum import (
DBEnumeratedType,
DBItem,
)
class BuildStatus(DBEnumeratedType):
"""Build status type
Builds exist in the database in a number of states such as 'complete',
'needs build' and 'dependency wait'. We need to track these states in
order to correctly manage the autobuilder queues in the BuildQueue table.
"""
NEEDSBUILD = DBItem(0, """
Needs building
Build record is fresh and needs building. Nothing is yet known to
block this build and it is a candidate for building on any free
builder of the relevant architecture
""")
FULLYBUILT = DBItem(1, """
Successfully built
Build record is an historic account of the build. The build is complete
and needs no further work to complete it. The build log etc are all
in place if available.
""")
FAILEDTOBUILD = DBItem(2, """
Failed to build
Build record is an historic account of the build. The build failed and
cannot be automatically retried. Either a new upload will be needed
or the build will have to be manually reset into 'NEEDSBUILD' when
the issue is corrected
""")
MANUALDEPWAIT = DBItem(3, """
Dependency wait
Build record represents a package whose build dependencies cannot
currently be satisfied within the relevant DistroArchSeries. This
build will have to be manually given back (put into 'NEEDSBUILD') when
the dependency issue is resolved.
""")
CHROOTWAIT = DBItem(4, """
Chroot problem
Build record represents a build which needs a chroot currently known
to be damaged or bad in some way. The buildd maintainer will have to
reset all relevant CHROOTWAIT builds to NEEDSBUILD after the chroot
has been fixed.
""")
SUPERSEDED = DBItem(5, """
Build for superseded Source
Build record represents a build which never got to happen because the
source package release for the build was superseded before the job
was scheduled to be run on a builder. Builds which reach this state
will rarely if ever be reset to any other state.
""")
BUILDING = DBItem(6, """
Currently building
Build record represents a build which is being build by one of the
available builders.
""")
FAILEDTOUPLOAD = DBItem(7, """
Failed to upload
Build record is an historic account of a build that could not be
uploaded correctly. It's mainly genereated by failures in
process-upload which quietly rejects the binary upload resulted
by the build procedure.
In those cases all the build historic information will be stored (
buildlog, datebuilt, duration, builder, etc) and the buildd admins
will be notified via process-upload about the reason of the rejection.
""")
UPLOADING = DBItem(8, """
Uploading build
The build has completed and is waiting to be processed by the
upload processor.
""")
class BuildFarmJobType(DBEnumeratedType):
"""Soyuz build farm job type.
An enumeration with the types of jobs that may be run on the Soyuz build
farm.
"""
PACKAGEBUILD = DBItem(1, """
Binary package build
Build a source package.
""")
BRANCHBUILD = DBItem(2, """
Branch build
Build a package from a bazaar branch.
""")
RECIPEBRANCHBUILD = DBItem(3, """
Recipe branch build
Build a package from a bazaar branch and a recipe.
""")
TRANSLATIONTEMPLATESBUILD = DBItem(4, """
Translation template build
Generate translation templates from a bazaar branch.
""")
|