Skip to content

feat(azldev): enable --from-spec to use fmf from local rendered spec (needs skip-file-filter) - #347

Open
bhagyapathak wants to merge 1 commit into
microsoft:mainfrom
bhagyapathak:bhagya/enable-skip-file-filter
Open

feat(azldev): enable --from-spec to use fmf from local rendered spec (needs skip-file-filter)#347
bhagyapathak wants to merge 1 commit into
microsoft:mainfrom
bhagyapathak:bhagya/enable-skip-file-filter

Conversation

@bhagyapathak

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 9, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-spec flag 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.

Comment thread internal/app/azldev/cmds/component/test.go
Comment thread internal/app/azldev/cmds/component/test.go
Comment thread internal/app/azldev/cmds/component/test.go
@bhagyapathak
bhagyapathak force-pushed the bhagya/enable-skip-file-filter branch from 5671da0 to a4866aa Compare September 9, 2026 08:42
Copilot AI review requested due to automatic review settings September 9, 2026 10:02
@bhagyapathak
bhagyapathak force-pushed the bhagya/enable-skip-file-filter branch from a4866aa to 15c15a9 Compare September 9, 2026 10:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread internal/app/azldev/cmds/component/test.go
Copilot AI review requested due to automatic review settings September 9, 2026 10:12
@bhagyapathak
bhagyapathak force-pushed the bhagya/enable-skip-file-filter branch from 15c15a9 to 9d33ed3 Compare September 9, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread internal/app/azldev/cmds/component/test.go
Comment thread internal/app/azldev/cmds/component/test.go
Copilot AI review requested due to automatic review settings September 9, 2026 10:23
@bhagyapathak
bhagyapathak force-pushed the bhagya/enable-skip-file-filter branch from 9d33ed3 to 12246a1 Compare September 9, 2026 10:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread internal/app/azldev/cmds/component/test.go
…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.
Copilot AI review requested due to automatic review settings September 9, 2026 10:34
@bhagyapathak
bhagyapathak force-pushed the bhagya/enable-skip-file-filter branch from 12246a1 to 0b70a10 Compare September 9, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@bhagyapathak

Copy link
Copy Markdown
Contributor Author

Attaching log files for util-linux tmt test runs using spec fmf/plans

azldev component test util-linux
--from-spec
--image-path base/out/images/vm-base/azl4-vm-base.x86_64-0.1.qcow2
--rpm base/out/rpms/rpm-base/util-linux-2.41.3-14.azl4.x86_64.rpm
--rpm base/out/rpms/rpm-base/util-linux-core-2.41.3-14.azl4.x86_64.rpm

tmt-util-linux-spec-fmf.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants