cu2d-update-ci crash when deploying mbs projects with an empty project section
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cupstream2distro Configuration |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Deploying the head/oif.cfg stack caused the following crash:
Traceback (most recent call last):
File "ci/cu2d-
sys.
File "ci/../
args.project):
File "ci/../
self.
File "ci/../
self.
File "ci/../
ci_template, build_template, job_data)
File "ci/../
builder_
File "ci/../
job_
File "ci/../
get_
File "ci/../
if 'target_branch' not in config:
TypeError: argument of type 'NoneType' is not iterable
The relevant stack file contents is:
projects:
frame:
rebuild: grail
geis:
rebuild: libgrip
grail:
rebuild: geis
libgrip:
The code is attempting to generate the name of the rebuild job for libgrip. The issue is that the yaml block below libgrip is empty and therefore results in projects['libgrip'] == None. get_ci_
The get_rebuild_job() code is only using the projects data from the original stack file before it is processed (so the defaults have not yet been merged in). To avoid having to fully process the stack, get_build_job() can just check for this condition.
Related branches
- Martin Mrazik (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 64 lines (+38/-5)2 files modifiedc2dconfigutils/cu2dUpdateCi.py (+8/-5)
tests/test_cu2dUpdateCi.py (+30/-0)
Changed in cupstream2distro-config: | |
status: | Fix Committed → Fix Released |
Fix committed into lp:cupstream2distro-config at revision 369, scheduled for release in cupstream2distr o-config, milestone Unknown