Revise Greenwave config again
This revises the Greenwave config again, aiming to be as clear and efficient as possible. The major practical change here is we use fedora-* for the product_versions in the 'null' policy (wildcards like this have been allowed since Greenwave commit be9a5427 in 2018), and we use lists of decision_contexts instead of a single decision_context per policy (this has been allowed since 1.6.0), allowing us to combine two pairs of policies into single policies. I also revised the comments, policy names and file organization, taking advantage of these simplifications. We could make this even more efficient if policies could apply to multiple subject_types as well, but apparently they can't. I've filed https://pagure.io/greenwave/issue/609 for that. Using a wildcard for product_versions in the null policy will have the practical consequence that whenever a new Fedora release or dist shows up, if no policy has been prepared for it in advance, queries for it that match the other elements of the null policy will succeed rather than failing because no policy is found. i.e., practically speaking, Bodhi push queries will succeed rather than failing. I think this is what we want (since whenever that happens we just go ahead and add the identifier to the null policy), but it's worth noting. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
297a736e80
commit
6545e3cf24
1 changed files with 77 additions and 123 deletions
|
@ -1,5 +1,81 @@
|
|||
# kojibuild_ policies are for koji_build subjects; Fedora CI runs tests at
|
||||
# at the Koji build level and report results which will be found by queries
|
||||
# against these policies.
|
||||
|
||||
# bodhiupdate_ policies are for bodhi_update subjects; Fedora openQA runs
|
||||
# tests at the Bodhi update level and reports results which will be found by
|
||||
# queries against these policies.
|
||||
|
||||
# As of 2020-11, we know that Bodhi runs queries for both of these subject
|
||||
# types when deciding whether to push updates to various stages (these are the
|
||||
# decision contexts), and expects a successful result to its queries.
|
||||
|
||||
# compose_ policies are for compose subjects; Fedora openQA runs tests at
|
||||
# the compose level (for composes containing deliverables it can test) and
|
||||
# reports results which will be found by queries against these policies.
|
||||
# As of 2020-11, we know the check-compose tool that generates "compose
|
||||
# check reports" queries this subject type for the
|
||||
# rawhide_compose_sync_to_mirrors decision context and reports the result
|
||||
# for each Rawhide compose, saying whether it "would have" passing gating
|
||||
# or not (actual gating of compose syncs has not yet been implemented).
|
||||
|
||||
# note that policies are *additive*. If a query matches multiple of these
|
||||
# policies, all the relevant test results are retrieved, and rules in all
|
||||
# the matched policies are applied.
|
||||
|
||||
# This is a "null" policy: it enforces no rules, its purpose is just to
|
||||
# exist, so that we always have at least one policy that matches
|
||||
# queries for the 'koji_build' subject type and the covered versions and
|
||||
# contexts. This is a fallback for Bodhi queries that we know will run
|
||||
# and expect a successful result, but which Greenwave will error on if
|
||||
# no policy matches. Note no "null" policy is needed for subject_type
|
||||
# bodhi_update because Greenwave by default ignores missing policies for
|
||||
# that subject type.
|
||||
--- !Policy
|
||||
id: "openqa_important_stuff_for_rawhide"
|
||||
id: "kojibuild_bodhipush_no_requirements"
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules: []
|
||||
|
||||
# The "remoterule" policies apply policies configured in individual
|
||||
# package repositories. See Greenwave docs/policies.rst and
|
||||
# https://docs.fedoraproject.org/en-US/ci/gating/ for details.
|
||||
--- !Policy
|
||||
id: "kojibuild_bodhipush_remoterule"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !RemoteRule {}
|
||||
|
||||
--- !Policy
|
||||
id: "bodhiupdate_bodhipush_remoterule"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: bodhi_update
|
||||
rules:
|
||||
- !RemoteRule {}
|
||||
|
||||
# This policy lists tests that are expected to pass for a Rawhide compose to
|
||||
# meet the basic release criteria.
|
||||
--- !Policy
|
||||
id: "compose_sync_requiredtests"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
decision_context: rawhide_compose_sync_to_mirrors
|
||||
|
@ -49,125 +125,3 @@ rules:
|
|||
- !PassingTestCaseRule {test_case_name: compose.server_role_deploy_database_server, scenario: "fedora.Server-dvd-iso.x86_64.64bit"}
|
||||
- !PassingTestCaseRule {test_case_name: compose.server_role_deploy_domain_controller, scenario: "fedora.Server-dvd-iso.x86_64.64bit"}
|
||||
|
||||
--- !Policy
|
||||
# _kojibuild_ policies are for koji_build subjects; Fedora CI tests run at
|
||||
# at the Koji build level and report results which will be found by these
|
||||
# policies. We must have at least one kojibuild policy for each Fedora
|
||||
# version Bodhi might operate on (because ignore_missing_policy is false
|
||||
# for the koji_build subject type, as config stands at 2020-11, so Bodhi
|
||||
# will fail if it queries Greenwave and no koji_build policy matches the
|
||||
# query terms).
|
||||
|
||||
# _update_ policies are for bodhi_update subjects; Fedora openQA tests run
|
||||
# at the Bodhi update level and report results which will be found by these
|
||||
# policies. ignore_missing_policy is true for the bodhi_update subject type
|
||||
# (in upstream Greenwave default config, as of 2020-11) so it is OK for
|
||||
# there not to be any matching policy of this type that matches when Bodhi
|
||||
# queries.
|
||||
|
||||
# note that policies are *additive*. If a query matches multiple of these
|
||||
# policies, all the rules in all the matched policies are applied.
|
||||
|
||||
id: "fedora_mainline_kojibuild_remoterule"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
# this means "apply gating configs in package repos"
|
||||
# see Greenwave docs/policies.rst for more details
|
||||
- !RemoteRule {}
|
||||
|
||||
--- !Policy
|
||||
id: "fedora_mainline_kojibuild_remoterule"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
# this means "apply gating configs in package repos"
|
||||
# see Greenwave docs/policies.rst for more details
|
||||
- !RemoteRule {}
|
||||
|
||||
--- !Policy
|
||||
id: "kojibuild_no_requirements_testing"
|
||||
# this is a null policy, it enforces no requirements. It is needed
|
||||
# because at least one policy must match for koji_build subjects.
|
||||
# if a query matches this policy and no other, no requirements will
|
||||
# be applied
|
||||
product_versions:
|
||||
- fedora-34-modular
|
||||
- fedora-34-containers
|
||||
- fedora-34-flatpaks
|
||||
- fedora-33-modular
|
||||
- fedora-33-containers
|
||||
- fedora-33-flatpaks
|
||||
- fedora-32-modular
|
||||
- fedora-32-containers
|
||||
- fedora-32-flatpaks
|
||||
- fedora-epel-8
|
||||
- fedora-epel-8-modular
|
||||
- fedora-epel-7
|
||||
- fedora-eln
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules: []
|
||||
|
||||
--- !Policy
|
||||
id: "kojibuild_no_requirements_stable"
|
||||
# this is a null policy, it enforces no requirements. It is needed
|
||||
# because at least one policy must match for koji_build subjects.
|
||||
# if a query matches this policy and no other, no requirements will
|
||||
# be applied
|
||||
product_versions:
|
||||
- fedora-34-modular
|
||||
- fedora-34-containers
|
||||
- fedora-34-flatpaks
|
||||
- fedora-33-modular
|
||||
- fedora-33-containers
|
||||
- fedora-33-flatpaks
|
||||
- fedora-32-modular
|
||||
- fedora-32-containers
|
||||
- fedora-32-flatpaks
|
||||
- fedora-epel-8
|
||||
- fedora-epel-8-modular
|
||||
- fedora-epel-7
|
||||
- fedora-epel-6
|
||||
- fedora-eln
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules: []
|
||||
|
||||
--- !Policy
|
||||
id: "fedora_mainline_update_rules_for_testing"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: bodhi_update
|
||||
rules:
|
||||
# this means "apply gating configs in package repos"
|
||||
# see Greenwave docs/policies.rst for more details
|
||||
- !RemoteRule {}
|
||||
|
||||
--- !Policy
|
||||
id: "fedora_mainline_update_rules_for_stable"
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
- fedora-34
|
||||
- fedora-33
|
||||
- fedora-32
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: bodhi_update
|
||||
rules:
|
||||
# this means "apply gating configs in package repos"
|
||||
# see Greenwave docs/policies.rst for more details
|
||||
- !RemoteRule {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue