feat(azldev): enable --from-spec to use fmf from local rendered spec (needs skip-file-filter) - #347
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new --from-spec flow needs follow-up fixes/updates (git prerequisite mismatch, missing unit tests, and CLI/docs regeneration) before it’s reliable and fully integrated.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new local-development mode for azldev component test to run TMT plans directly from a component’s locally rendered spec tree (fmf) via a new --from-spec flag, instead of cloning the catalog test metadata source.
Changes:
- Add
--from-specflag and plumb it through test execution settings. - Switch the TMT run directory to either the cloned repo (default) or the rendered spec directory (
--from-spec). - Add validation (
resolveSpecRunDir) to ensure the rendered spec directory contains an fmf root (.fmf/version).
File summaries
| File | Description |
|---|---|
| internal/app/azldev/cmds/component/test.go | Adds --from-spec support, routes TMT execution to rendered spec dirs, and validates presence of fmf metadata. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5671da0 to
a4866aa
Compare
a4866aa to
15c15a9
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new --from-spec help/comment text hard-codes an incorrect rendered-spec base path (“specs/...”) instead of referencing the configured rendered-specs-dir layout, which is user-facing and misleading.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
internal/app/azldev/cmds/component/test.go:537
- The comment for [resolveSpecRunDir] says it runs from 'specs///', but the rendered spec directory is derived from the project 'rendered-specs-dir' setting (e.g. 'SPECS/c/curl'). Updating this comment avoids baking in an incorrect directory name.
// resolveSpecRunDir validates that the component's rendered spec directory
// exists and carries an fmf root, returning it as the tmt run directory. It
// backs the --from-spec flow, which runs a plan straight from
// specs/<x>/<name>/ instead of cloning the catalog 'source'. tmt writes its run
// artifacts under a separate --workdir-root, so the rendered tree is only read.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
15c15a9 to
9d33ed3
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new --from-spec validation and flow can be made more correct and efficient with small fixes (FMF file-type validation and earlier failure before costly venv/pip work).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
9d33ed3 to
12246a1
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The updated help text has an internal inconsistency about git prerequisites when using --from-spec, and should be corrected to avoid misleading users.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
…ec dir Add a --from-spec flag to 'azldev component test' that runs the mapped tmt plan directly from the component's rendered spec directory (specs/<x>/<name>/) instead of cloning the catalog source@ref. Requires render.skip-file-filter = true and a prior 'azldev component render' so the loose fmf tree is preserved. Local inner-loop convenience; cloud/TEE runs still clone.
12246a1 to
0b70a10
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized, preserves the default behavior, adds explicit validation/error messaging for the new path, and includes targeted unit tests for the new functionality.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Attaching log files for util-linux tmt test runs using spec fmf/plans azldev component test util-linux |
No description provided.