From ede4b87f935bf61a758f42e9dfe056049e6ab890 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: May 09 2018 14:14:05 +0000 Subject: Rename greenwave.yaml to gating.yaml. We're going to be asking packagers to put these files in their dist-git repos. Rather than name the file after the system that expects it, name it after the usecase with respect to the packagers' workflow. The files defines criteria for their package to pass various gating points, so call it `gating.yaml`. :bike: :house_with_garden: --- diff --git a/functional-tests/conftest.py b/functional-tests/conftest.py index ea261c1..427a378 100644 --- a/functional-tests/conftest.py +++ b/functional-tests/conftest.py @@ -130,7 +130,7 @@ def waiverdb_server(tmpdir_factory): def distgit_server(tmpdir_factory): """ Creating a fake dist-git process. It is just a serving some files in a tmp dir """ tmp_dir = tmpdir_factory.mktemp('distgit') - f = open(tmp_dir.strpath + "/greenwave.yaml", "w+") + f = open(tmp_dir.strpath + "/gating.yaml", "w+") f.close() p = subprocess.Popen([sys.executable, '-m', 'SimpleHTTPServer', '5678'], cwd=tmp_dir.strpath) log.debug('Started dist-git server as pid %s', p.pid) diff --git a/greenwave/config.py b/greenwave/config.py index 663c21e..e28dcce 100644 --- a/greenwave/config.py +++ b/greenwave/config.py @@ -19,7 +19,7 @@ class Config(object): # Options for outbound HTTP requests made by python-requests DIST_GIT_BASE_URL = 'https://src.fedoraproject.org' - DIST_GIT_URL_TEMPLATE = '{DIST_GIT_BASE_URL}/{pkg_name}/{rev}/greenwave.yaml' + DIST_GIT_URL_TEMPLATE = '{DIST_GIT_BASE_URL}/{pkg_name}/{rev}/gating.yaml' KOJI_BASE_URL = 'https://koji.fedoraproject.org/kojihub' REQUESTS_TIMEOUT = (6.1, 15) REQUESTS_VERIFY = True diff --git a/greenwave/resources.py b/greenwave/resources.py index d632476..0717d99 100644 --- a/greenwave/resources.py +++ b/greenwave/resources.py @@ -44,7 +44,7 @@ def retrieve_rev_from_koji(nvr): @cached def retrieve_yaml_remote_original_spec_nvr_rule(rev, pkg_name): - """ Retrieve cached greenwave.yaml content for a given rev. """ + """ Retrieve cached gating.yaml content for a given rev. """ data = { "DIST_GIT_BASE_URL": current_app.config['DIST_GIT_BASE_URL'], "pkg_name": pkg_name, @@ -57,9 +57,9 @@ def retrieve_yaml_remote_original_spec_nvr_rule(rev, pkg_name): if response.status_code == 404: return greenwave.policies.RuleSatisfied() elif response.status_code != 200: - raise BadGateway('Error occurred looking for greenwave.yaml file in the dist-git repo.') + raise BadGateway('Error occurred looking for gating.yaml file in the dist-git repo.') - # greenwave.yaml found... + # gating.yaml found... response = requests_session.request('GET', url, headers={'Content-Type': 'application/json'}, timeout=60) diff --git a/greenwave/tests/test_policies.py b/greenwave/tests/test_policies.py index 73697ce..8fc56ab 100644 --- a/greenwave/tests/test_policies.py +++ b/greenwave/tests/test_policies.py @@ -409,7 +409,7 @@ rules: - !PassingTestCaseRule {test_case_name: dist.upgradepath} """ - p = tmpdir.join('greenwave.yaml') + p = tmpdir.join('gating.yaml') p.write(serverside_fragment) app = create_app('greenwave.config.TestingConfig') with app.app_context():