Gating
Distro-wide Required Gating
The Fedora greenwave configuration enforces some distribution-wide gating policies. Updates in most critical path groups (not the ones for non-release-blocking desktops) are gated on subsets of the Fedora openQA update test suite depending on which group(s) they are in. This gating is not optional and cannot be disabled.
Optional Gating
Additional gating requirements can be enabled on demand on a package-by-package basis. If you want to turn the gating on for your package, create a new file gating.yaml in the root of the package dist git directory with the following content:
Abilita il gate al repository di test:
--- !Policy
versione_prodotto:
- fedora-*
contesto_decisioni: [bodhi_update_push_testing] tipo_oggetto: koji_build regole:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
Enable gate to the stable repository:
--- !Policy
versione_prodotto:
- fedora-*
decision_contexts: [bodhi_update_push_stable] subject_type: koji_build rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
| Per abilitare entrambi i gate, è sufficiente concatenare i due esempi precedenti. |
Per aggiungere un altro test, è sufficiente estendere la lista rules con un ulteriore !PassingTestCaseRule.
|
This will enable gating for all Fedora releases based on the result of the CI Jenkins pipeline that runs the package’s TMT tests. A decision context identifies set of policies used for a specific gating. For example, bodhi_update_push_stable decision context is used for gating RPM builds in Bodhi updates before getting to the stable repository. Note that Bodhi’s handling of these two decision contexts is buggy. Updates are never in fact prevented from push to testing even if there is a bodhi_update_push_testing policy and it fails. But it is best to include both contexts in your policy with identical requirements, or else the reported "gating status" of your update in the Bodhi web UI may change in confusing ways with strange effects, as described in the bug report.
The decision_contexts should match in both remote rules file and the policy in the Greenwave configuration (at least one decision context). Rules define resultsdb test cases that should be considered for the gating decision, in this case fedora-ci.koji-build.tier0.functional which are tests that were run in the CI based on the tmt configuration in package’s dist-git. If no tests are required for the particular decision context(s) rules should be set to an empty list, i. e. rules: [], otherwise Greenwave will return, that it could not find any applicable policies.
I seguenti test Fedora CI possono essere abilitati per la gating:
-
fedora-ci.koji-build.tier0.functional - component-specific tests enabled using tmt in dist-git
-
fedora-ci.koji-build.rpmdeplint.functional - to validate the update’s dependencies and ensure it has no unrecorded file conflicts with other packages
-
fedora-ci.koji-build.rmdepcheck.functional - to check the update does not break dependencies of other packages
-
fedora-ci.koji-build.rpminspect.static-analysis - per verificare la correttezza del pacchetto, inclusa la stabilità ABI
-
fedora-ci.koji-build.installability.functional - per assicurarsi che l’installazione / aggiornamento del pacchetto funzioni correttamente
Vedi le Politiche specifiche per pacchetto di Greenwave per ulteriori dettagli tecnici sull’impostazione delle politicy.
Utilizzando Piani Multipli
Se stai utilizzando più piani tmt è possibile abilitare la gating solo per i piani selezionati. Invece del tipo generico tier0 usa il nome del piano desiderato nel nome del testcase resultsdb:
!PassingTestCaseRule {test_case_name: fedora-ci.koji-build.<plan-name>.functional}
Ad esempio, la regola utilizzata per abilitare la gating per il piano /plans/basic sarebbe simile a questa:
!PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/basic.functional}
Prima che le regole sopra menzionate possano essere utilizzate, è necessario abilitare la segnalazione separata del piano. Vedi la sezione Piani Multipli per i dettagli.
Waive
If the failed test result is irrelevant you can waive it using the Bodhi web interface or directly from the command line. However, please do not waive Fedora openQA failures - test cases whose name starts with update. If you waive an openQA failure, the same failure will likely be "inherited" in every subsequent test of any other update, and cause all other updates to be gated. Please contact the Fedora Quality team for help resolving failed openQA tests instead. Command line waive examples:
# Elenca i risultati dei test che bloccano bodhi updates waive <id> --show
# Specifica quali test ignorare tramite: bodhi updates waive <id> --test="dist.rpmlint" --test="atomic-ci" "Commento che spiega la deroga"
# Ignora tutti i test: bodhi updates waive <id> --test=all "Commento che spiega la deroga"
Mentre l’interfaccia web consente solo di ignorare tutti i test, la riga di comando fornisce un modo per selezionare i test da ignorare.
Link
-
Greenwave … service to evaluate gating policies based on test results
-
ResultsDB … results store engine
-
WaiverDB … service for recording waivers against test results
-
Greenwave’s Package-specific policies
-
Implementa la possibilità di derogare ai requisiti mancanti tramite bodhi-cli
Want to help? Learn how to contribute to Fedora Docs ›