ovb jobs don't build images for t-p-e if the number of patchesets is >9 in ZUUL_CHANGES

Bug #1766350 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Alex Schultz

Bug Description

playbooks/to-build-or-not-to-build.yml is not properly determining to build for changes in the always build list. This can be observed using:

ZUUL_CHANGES=openstack/tripleo-heat-templates:master:refs/changes/12/559812/1^openstack/tripleo-puppet-elements:master:refs/changes/72/521172/5 ansible-playbook playbooks/to-build-or-not-to-build.yml

ZUUL_CHANGES=openstack/tripleo-puppet-elements:master:refs/changes/72/521172/11 ansible-playbook playbooks/to-build-or-not-to-build.yml

The latter results in the use of cached images while the former correctly determins to always build.

Correct:
➜ ZUUL_CHANGES=openstack/tripleo-heat-templates:master:refs/changes/12/559812/1^openstack/tripleo-puppet-elements:master:refs/changes/72/521172/5 ansible-playbook playbooks/to-build-or-not-to-build.yml
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Decide whether we need to build images] ***********************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Cleanup front of ZUUL_CHANGES] ********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Cleanup end of ZUUL_CHANGES] **********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Split zuul_changes to a list] *********************************************************************************************************************************************************************************
ok: [localhost]

TASK [compare zuul_changes list to our always_build_list] ***********************************************************************************************************************************************************
ok: [localhost]

TASK [Default to using cached images] *******************************************************************************************************************************************************************************
ok: [localhost]

TASK [Build images when we have a change in the always build list] **************************************************************************************************************************************************
ok: [localhost]

TASK [Always build images in the periodic jobs] *********************************************************************************************************************************************************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ lookup('env', 'PERIODIC')|default('0')|int == 1 }}

skipping: [localhost]

PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost : ok=7 changed=0 unreachable=0 failed=0

Incorrect:

➜ ZUUL_CHANGES=openstack/tripleo-puppet-elements:master:refs/changes/72/521172/11 ansible-playbook playbooks/to-build-or-not-to-build.yml
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Decide whether we need to build images] ***********************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Cleanup front of ZUUL_CHANGES] ********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Cleanup end of ZUUL_CHANGES] **********************************************************************************************************************************************************************************
ok: [localhost]

TASK [Split zuul_changes to a list] *********************************************************************************************************************************************************************************
ok: [localhost]

TASK [compare zuul_changes list to our always_build_list] ***********************************************************************************************************************************************************
ok: [localhost]

TASK [Default to using cached images] *******************************************************************************************************************************************************************************
ok: [localhost]

TASK [Build images when we have a change in the always build list] **************************************************************************************************************************************************
skipping: [localhost]

TASK [Always build images in the periodic jobs] *********************************************************************************************************************************************************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ lookup('env', 'PERIODIC')|default('0')|int == 1 }}

skipping: [localhost]

PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost : ok=6 changed=0 unreachable=0 failed=0

Tags: ci quickstart
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart-extras (master)

Fix proposed to branch: master
Review: https://review.openstack.org/563760

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
status: Triaged → In Progress
summary: - ovb jobs don't build images if only one change is in ZUUL_CHANGES
+ ovb jobs don't build images for t-p-e if the number of patchesets is >9
+ in ZUUL_CHANGES
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart-extras (master)

Reviewed: https://review.openstack.org/563760
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=dff0863f0a08258ba40ad56c2069f82643ca90b6
Submitter: Zuul
Branch: master

commit dff0863f0a08258ba40ad56c2069f82643ca90b6
Author: Alex Schultz <email address hidden>
Date: Mon Apr 23 14:55:06 2018 -0600

    Fix changes regex

    Previously if the number of patchsets was greater than 9 (meaning two
    digits) the regex to try and capture the repo name was not properly
    trimming all the numbers. Rather than requiring specific counts of
    numbers, we should just trim any numbers from the ZUUL_CHANGES.

    This could be seen by trying
    ZUUL_CHANGES=openstack/tripleo-puppet-elements:master:refs/changes/72/521172/11
    which would result in tripleo-puppet-elements1 which then would not be
    matched by the tripleo-puppet-elements repo.

    Change-Id: I4ad8b377c4b12a97d2d04859f5d05f8a8137be9d
    Closes-Bug: #1766350

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-quickstart-extras 2.1.1

This issue was fixed in the openstack/tripleo-quickstart-extras 2.1.1 release.

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.