relax ancestry rules for independent projects

For cycle-based projects we want to require new releases to be on the
same branch as previous releases in the same series. We do that by
enforcing an ancestry between the commit being tagged and the previous
commits in the series.

For independent projects, we only have one deliverable file for each and
so we need to be able to add new releases from master to the same file
that we're releasing older stable branches. Treat situations where
independent projects have follow-up releases from different branches as
warnings instead of errors.

Fix the existing historical record for hacking by removing the comments.

Change-Id: Ia80c876c8de94259a1a56b9c3d07dbefc3e6d1e5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-04-21 15:33:26 -04:00
parent 29651876b5
commit f904e596b7
2 changed files with 15 additions and 13 deletions

View File

@ -91,15 +91,10 @@ releases:
projects:
- repo: openstack-dev/hacking
hash: e25679be7f3b9b2f2bbea6ce5af4fcd69ba2d574
# NOTE(sigmavirus24): Despite several tags not existing on master, this one
# prevents us from creating a 0.11.0 release. Fixing this edgecase in the
# release management software has been scheduled for Newton (see:
# https://etherpad.openstack.org/p/newton-relmgt-plan) For the moment,
# commenting out this release is the easiest way to side-step the issue.
# - version: 0.10.2
# - projects:
# - - repo: openstack-dev/hacking
# - hash: bc4b1118e155784bc306c01733375ffec56b89b3
- version: 0.10.2
projects:
- repo: openstack-dev/hacking
hash: bc4b1118e155784bc306c01733375ffec56b89b3
- version: 0.11.0
projects:
- repo: openstack-dev/hacking

View File

@ -261,10 +261,17 @@ def main():
print('SHA found in descendants')
else:
print('SHA NOT FOUND in descendants')
errors.append(
'%s %s is not a descendant of %s' % (
project['repo'], project['hash'],
prev_version)
if series_name == '_independent':
save = warnings.append
else:
save = errors.append
save(
'%s %s receiving %s is not a descendant of %s' % (
project['repo'],
project['hash'],
release['version'],
prev_version,
)
)
prev_version = release['version']
prev_projects = set(p['repo'] for p in release['projects'])