Repository navigation
refactor: rename preflight role to validate_environment - #110
Conversation
Pair symmetry with validate_migration (companion PR redhat-cop#108, post-only). Clean break: v2 is unreleased and nothing in-repo consumed the old names. Role dirs, playbooks (vmf_validate_environment.yml), variable prefixes, test targets, docs, and the changelog fragment all use the new name. Assisted-by: opencode:enmaas/rits/zai-org/glm-5-3
ffc2b37 to
ad00eee
Compare
tech2734
left a comment
There was a problem hiding this comment.
Looks good — clean mechanical rename with no leftover preflight references in the new code. Variable naming, file structure, changelog, architecture diagram, and test target are all consistent. The new GLOSSARY.md is a nice touch for domain vocabulary.
One minor observation (non-blocking): validate_environment_* is verbose (e.g. validate_environment_aap_validate_certs), but the symmetry with validate_migration_* justifies it.
Tested the original preflight role against the homelab in PR #107 review — the logic here is identical, just renamed.
Drop the task-level tags (always/openshift/validate/cnv/mtv/aap/ vcenter/vddk) from validate_environment — no other role in the collection uses task tags, and all checks already run on every invocation regardless. Add the empty galaxy_tags key to meta/main.yml to match the existing roles' metadata shape. Assisted-by: opencode:enmaas/rits/zai-org/glm-5-3
The tag-convention commit removed the task-level tags, but the role's docs still advertised per-check tags and --tags debug runs — update the README, argument_specs, and task comments to describe the one-off CLI run (-e validate_environment_secure_logging=false) instead. Rename the remaining "pre-flight" prose in docs/architecture-v2.md to the "Environment validation" glossary term. Assisted-by: opencode:enmaas/rits/zai-org/glm-5-3
The task-level tags are removed; the regression test comment still described an 'isolated tagged run' summary path. Rename it to 'isolated partial run'. Assisted-by: opencode:enmaas/rits/zai-org/glm-5-3
- Document the actual /api/controller/v2/ default in argument_specs.yml (defaults/main.yml already served it; the spec docs claimed /api/v2/) and align the defaults comment, which disagreed with the spec about AWX. - Add ignore_errors to the CNV and AAP probe tasks: a module crash bypasses failed_when and would abort the run, contradicting the documented "checks do not crash the play" claim. Mirrors the existing vCenter/OpenShift probe pattern. - Drop the leftover "check alone" wording from the vCenter failure detail: task tags no longer exist, so a per-check run is not possible. Validated: integration target ok=18/rescued=3 (unchanged), full pre-commit green. Assisted-by: opencode:publishers/prelude-maas/models/glm-53-flash
Replace the fixed six-check include sequence with a loop over the new validate_environment_checks variable (defaults to all six). A one-off run can now limit the pass, e.g. -e validate_environment_checks=[vcenter] to debug a single check — the summary report still runs on every invocation via the always block. Assisted-by: opencode:publishers/prelude-maas/models/glm-53-flash
vvaldez
left a comment
There was a problem hiding this comment.
@sabre1041 Property-based check selection is in as of 0e485b6. The six includes are replaced by a loop over the new validate_environment_checks variable, defaulting to all six (openshift, cnv, mtv, aap, vcenter, vddk). A one-off run limits the pass with -e validate_environment_checks=[vcenter], now the documented path for debugging a single check. The summary report still runs on every invocation via the always block.
CLI -e passes a string (-e validate_environment_checks=[vddk]) where an inventory var is a real list; loop requires a list and rejected the string. Normalize the loop input to accept a list, a bare check name, or a bracketed comma-separated string. Assisted-by: opencode:publishers/prelude-maas/models/glm-53-flash
vvaldez
left a comment
There was a problem hiding this comment.
@sabre1041 Follow-up on eb1f01c: live validation caught that the CLI form -e validate_environment_checks=[vddk] passes a string where loop requires a list. The loop now normalizes both forms, so the bracketed CLI form, a bare check name, and a real list all work. Validated on pool1: default run (all six, ok=28), [vddk] and [vcenter, vddk] limited runs, and the JSON form.
Issue redhat-cop#121 requires community-module use to document which module, why it is required over a command, and why the pin range is safe. The existing justification covered the first two; add the pin-range note: community.vmware is pinned >=5.5.0 and the task uses only core connection options, unchanged across 5.x. Also note the pyVmomi requirement. Assisted-by: opencode:publishers/prelude-maas/models/glm-53-flash
Summary
Renames the preflight role to
validate_environment, pairing withvalidate_migration(companion PR #108, post-migration validation). Plain descriptive names replace the aviation metaphor; the pair stays symmetric.Compatibility
Clean break: v2 is unreleased and nothing in-repo consumed the old names. Renamed surfaces:
roles/preflight→roles/validate_environmentvmf_preflight.yml→vmf_validate_environment.ymlpreflight_*→validate_environment_*(including internal__preflight_*facts)preflight_report→validate_environment_reportNOTE: preflight is days old (merged via #107, unreleased), so no external consumers are known. If you have automation referencing the old names, update it when pulling v2.
Validation
Attribution: created using opencode (session: ses_ed904e798ffeTYJVsSCQP9sbvM)