diff --git a/openstack_releases/cmds/validate.py b/openstack_releases/cmds/validate.py index 2cb0246e1d..7dd5322d79 100644 --- a/openstack_releases/cmds/validate.py +++ b/openstack_releases/cmds/validate.py @@ -64,6 +64,9 @@ _VALID_BRANCH_PREFIXES = set([ 'feature', 'driverfixes', ]) +_NO_STABLE_BRANCH_CHECK = set([ + 'gnocchi', +]) _PLEASE = ('It is too expensive to determine this value during ' 'the site build, please set it explicitly.') @@ -425,6 +428,9 @@ def validate_branch_prefixes(deliverable_info, mk_waring, mk_error): def validate_stable_branches(deliverable_info, mk_warning, mk_error): "Apply the rules for stable branches." + if ('launchpad' in deliverable_info and + deliverable_info['launchpad'] in _NO_STABLE_BRANCH_CHECK): + return branches = deliverable_info.get('branches', []) known_releases = list( r['version'] diff --git a/openstack_releases/tests/test_validate.py b/openstack_releases/tests/test_validate.py index ffeaa74edb..9c7ff30351 100644 --- a/openstack_releases/tests/test_validate.py +++ b/openstack_releases/tests/test_validate.py @@ -1051,6 +1051,29 @@ class TestValidateStableBranches(base.BaseTestCase): self.assertEqual(0, len(warnings)) self.assertEqual(1, len(errors)) + def test_can_have_independent_branches(self): + deliverable_data = textwrap.dedent(''' + launchpad: gnocchi + releases: + - version: 1.5.0 + projects: + - repo: openstack/automaton + hash: be2885f544637e6ee6139df7dc7bf937925804dd + branches: + - name: stable/abc + location: 1.5.0 + ''') + warnings = [] + errors = [] + deliverable_info = yaml.safe_load(deliverable_data) + validate.validate_stable_branches( + deliverable_info, + warnings.append, + errors.append, + ) + self.assertEqual(0, len(warnings)) + self.assertEqual(0, len(errors)) + class TestValidateFeatureBranches(base.BaseTestCase):