Background
The prepare/artifact plugin supports a verify: true option that injects a verification phase (PrepareVerifyInstallation) to check that packages required by tests were actually installed from the configured artifact providers.
Currently, verification only covers the install phases injected by tmt itself (essential-requires, requires, recommends). User-defined prepare/install phases are excluded. This was a deliberate conservative choice to avoid imposing unexpected behavior on users who didn't ask for it.
The gap
A user can specify test dependencies either via require:/recommend: keys or via an explicit prepare/install phase — both achieve the same result. With the current implementation, the two approaches have diverging verification behavior: tmt-injected phases are verified, user-defined ones are not. This is a silent difference that may confuse users who expect consistent behavior.
Proposed approach
Extend verification to user-defined prepare/install phases, but gated on phase ordering: only include a phase if its order is less than the verify phase's order (PHASE_ORDER_PREPARE_VERIFY_INSTALLATION = 79).
This gives users a natural opt-out: set order: 80 (or higher) on a prepare/install phase to have it run after verification and be excluded from it. It also matches the general tmt convention that phase ordering controls execution semantics.
Phase order reference
| Phase |
Order |
essential-requires (tmt-injected) |
30 |
prepare/install default |
50 |
requires (tmt-injected) |
70 |
recommends (tmt-injected) |
75 |
| verify-installation |
79 |
With this change, a user-defined prepare/install at the default order of 50 would be included in verification automatically. To opt out, the user sets order: 80+.
Open question
Is the opt-out mechanism (order: 80+) discoverable enough, or do we need an explicit verify: false flag on prepare/install to let users opt out without changing ordering semantics?
Related
Background
The
prepare/artifactplugin supports averify: trueoption that injects a verification phase (PrepareVerifyInstallation) to check that packages required by tests were actually installed from the configured artifact providers.Currently, verification only covers the install phases injected by tmt itself (
essential-requires,requires,recommends). User-definedprepare/installphases are excluded. This was a deliberate conservative choice to avoid imposing unexpected behavior on users who didn't ask for it.The gap
A user can specify test dependencies either via
require:/recommend:keys or via an explicitprepare/installphase — both achieve the same result. With the current implementation, the two approaches have diverging verification behavior: tmt-injected phases are verified, user-defined ones are not. This is a silent difference that may confuse users who expect consistent behavior.Proposed approach
Extend verification to user-defined
prepare/installphases, but gated on phase ordering: only include a phase if itsorderis less than the verify phase's order (PHASE_ORDER_PREPARE_VERIFY_INSTALLATION = 79).This gives users a natural opt-out: set
order: 80(or higher) on aprepare/installphase to have it run after verification and be excluded from it. It also matches the general tmt convention that phase ordering controls execution semantics.Phase order reference
essential-requires(tmt-injected)prepare/installdefaultrequires(tmt-injected)recommends(tmt-injected)With this change, a user-defined
prepare/installat the default order of50would be included in verification automatically. To opt out, the user setsorder: 80+.Open question
Is the opt-out mechanism (
order: 80+) discoverable enough, or do we need an explicitverify: falseflag onprepare/installto let users opt out without changing ordering semantics?Related