config download tarball getting added to git repo

Bug #1795949 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
James Slagle

Bug Description

The tarball of the config-download output that we put into the overcloud-config container is getting added to the git repo we create for the config-download contents.

We have code to add *.tar.gz to .gitignore, however when we use GitPython and run repo.index.add, this defaults to using force=True which the equivalent of git add -f, which adds even ignored files to the index.

The docs at
https://gitpython.readthedocs.io/en/stable/reference.html#git.index.base.IndexFile.add

actually say that the force keyword argument doesn't currently work.

So as a workaround we'll need to use the GitCmd interface to run a git command directly.

Changed in tripleo:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → James Slagle (james-slagle)
milestone: none → stein-1
tags: added: rocky-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/607701
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=356334b131a19b3273daf8a114682adad6693435
Submitter: Zuul
Branch: master

commit 356334b131a19b3273daf8a114682adad6693435
Author: James Slagle <email address hidden>
Date: Wed Oct 3 16:12:00 2018 -0400

    Don't add tarball to config-download dir

    GitPyton's repo.index.add defaults to force adding all ignored file
    patterns from .gitignore. This was causing the generated
    overcloud-config.tar.gz to also be included in the git repo. This caused
    the config-download directory to recursivley grow larger in size as each
    commit contained a tarball of the whole repo.

    Using repo.git.add instead allows the .gitignore to be honored so that
    the tarball isn't included in any commits.

    Change-Id: I5c7b4fc448d957e30c0ea386795c9b698e9febed
    Closes-Bug: #1795949

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/612163

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/rocky)

Reviewed: https://review.openstack.org/612163
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=e8d9d162e5685af23e3aea924fc65f0da8026ca0
Submitter: Zuul
Branch: stable/rocky

commit e8d9d162e5685af23e3aea924fc65f0da8026ca0
Author: James Slagle <email address hidden>
Date: Wed Oct 3 16:12:00 2018 -0400

    Don't add tarball to config-download dir

    GitPyton's repo.index.add defaults to force adding all ignored file
    patterns from .gitignore. This was causing the generated
    overcloud-config.tar.gz to also be included in the git repo. This caused
    the config-download directory to recursivley grow larger in size as each
    commit contained a tarball of the whole repo.

    Using repo.git.add instead allows the .gitignore to be honored so that
    the tarball isn't included in any commits.

    Change-Id: I5c7b4fc448d957e30c0ea386795c9b698e9febed
    Closes-Bug: #1795949
    (cherry picked from commit 356334b131a19b3273daf8a114682adad6693435)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 10.1.0

This issue was fixed in the openstack/tripleo-common 10.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 9.5.0

This issue was fixed in the openstack/tripleo-common 9.5.0 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.