[Feature]: component test: discover-only JSON output and SSH mode
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
This is design work, so start by reading docs/user/explanation/tmt-tests.md, especially the S1–S9 cases on where test files come from, and then the existing azldev component test implementation. Settle the open question about the source for components without a catalog entry, and agree on the --discover-only -O json schema and the --provision connect flags with maintainers. Done means a discussion decision, not a patch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Our internal test generation tooling (azurelinux-test) builds behavior and fmt tests for
Azure Linux 4.0 packages, then generates and runs new tests. It has its own tmt code in two places, which duplicates
what azldev component test now supports:
- Discovery. It clones a package's Fedora and CentOS Stream repositories, runs
tmt run --until discover discover, and maps every discovered test back to the repository and commit it came from.
azldev component testcannot report discovered tests without running them. - Execution. It runs generated tests through tmt on a guest provisioned separately and reached over SSH.
azldev component testsupports onlyvirtual, which needs QEMU and/dev/kvm, andlocal, which needs an
Azure Linux 4 host and changes that host. Neither works from Windows, macOS, a KVM-less CI runner, or a container.
Running in a container is also unfaithful for tests that rely on systemd or the kernel.
I would like to drop our implementations and call azldev instead (already a runtime dependency of the test gen code). I'm happy to implement this, but want to make sure it will fit well.
Describe the solution you'd like
- Discover-only mode with JSON output. Resolve a component's plans exactly as a run would, stop after
discover, and print each selected test pinned to the repository and commit its files actually came from. That is
often not the plan's repository; the S1–S9 cases indocs/user/explanation/tmt-tests.mdare what make it hard. --provision connect. Pass through tmt's own SSH provisioner (provision --how connect) to target any
reachable Azure Linux 4 guest. tmt runs on the controller, so the guest needssshdandrsync(which tmt
installs if it is missing) plus whatever the test uses, but not tmt itself.- Optional
--rpm. When omitted (or maybe with --host-rpms-only as a mutually exclusive flag?), uses the test environment's currently installed packages. - Per-test results with
-O json. Report name, result, exit code, duration, and log path.
If it involves a CLI change, suggest it here:
# 1. list the tests a run would execute, without provisioning anything
azldev component test openssl --discover-only -O json
# 2-4. run a generated tree on an existing guest, against its installed packages
azldev component test openssh --provision connect --guest 10.0.0.5 --user azureuser --key ~/.ssh/id_ed25519 \
--source-dir ./generated-tests --plan /plans/generated -O json
Proposed discovery output:
{
"component": "openssl",
"plans": [{ "name": "/plans/ci", "source": { "git-url": "...", "ref": "<sha>" } }],
"tests": [
{
"name": "/Sanity/basic",
"plans": ["/plans/ci", "/plans/tier1"],
"git-url": "https://gitlab.com/redhat/centos-stream/tests/openssl.git",
"ref": "<sha or null>",
"path": "Sanity/basic",
"sources": ["Sanity/basic/main.fmf"],
"test": "./runtest.sh",
"require": ["openssl"],
"duration": "5m"
}
],
"unreachable": [{ "git-url": "https://gitlab.com/redhat/rhel/tests/openssl", "reason": "clone failed" }]
}
Describe alternatives you've considered
- Keep our own tmt code. It works, but it duplicates azldev's pinning and will drift from the tests azldev
actually runs. We also guess the Fedora/CentOS locations and use the branch head, where azldev knows each component's
upstream and locked commit. - QEMU in a container. Requires
/dev/kvmpassthrough and nested virtualization; without them software emulation
is far too slow. It still excludes most Windows and macOS setups. --provision localin a container. The container is not an Azure Linux 4 system and has no systemd as PID 1,
so tests fail or skip for reasons unrelated to the package.- A hand-rolled SSH harness. This is what we do now: copy the tree to the guest and run tmt there with local
provisioning. It requires tmt and Python on the guest and reimplements result collection.
Use case / impact
- Gather and coverage mapping in azurelinux-test get the same test set azldev runs, pinned to the packaged
version. Once Azure Linux fills in its tmt catalog, they also get the plans Azure Linux itself declares. - Generated-test execution can target any Azure Linux 4 guest: Hyper-V, Azure, or bare metal. That covers Windows
and macOS developers and CI without KVM, and suits the headless container-host image because the guest needs little. - azldev users get a way to preview and audit what a plan selects, and where each test comes from, before
provisioning anything.
azldev version
v1.1.0 (c7c34596, the commit pinned by the Azure Linux 4.0 branch's .azldev-version).
Additional context
Open question: which source should discover-only use for a component with no catalog entry? We would suggest the
component's upstream dist-git at its locked commit, with additional locations such as the CentOS Stream tests
repository as an opt-in.
- Ngôn ngữ chính
- Go
- Star
- 18
- Fork
- 29
- Merge trung bình
- 5 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/azure-linux-dev-tools
-
`patch-add` overlay appends `PatchN:` tag at end of preamble instead of grouping with existing Patch tagsCó thể đã có người làm @IzanVil đã nhận 18 ngày trước. Đang mởarea: overlays enhancement priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/azure-linux-dev-tools#284 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Bug]: azldev image boot incorrectly treats --image-path and --format as mutually exclusiveCó thể đã có người làm @dmcilvaney đã nhận 2 ngày trước. Đang mởbug
microsoft/azure-linux-dev-tools#376 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Feature]: Add Customization for Compression performanceCó thể đã có người làm @Tonisal-byte đã nhận 2 ngày trước. Đang mởenhancement
microsoft/azure-linux-dev-tools#375 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Bug]: no specification for TOML object modelCó thể làm lại được @ddstreet đã nhận 44 ngày trước và không có pull request nào đang mở. Đang mởbug
microsoft/azure-linux-dev-tools#318 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 6 ngày
-
[Bug]: azldev comp render doesn't always add changelog entriesCó thể làm lại được @ddstreet đã nhận 56 ngày trước và không có pull request nào đang mở. Đang mởbug GA blocker
microsoft/azure-linux-dev-tools#316 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của microsoft/azure-linux-dev-tools
Issue tương tự
-
area: watch bug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mariadb-operator/mariadb-operator#1962 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eugenioenko/ttt#919 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
QuantumNous/new-api#7839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage service/costoptimizationhub
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hashicorp/terraform-provider-aws#50507 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày