[Feature]: component test: discover-only JSON output and SSH mode
Los mantenedores suelen responder en 7 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- cli, testing-qa
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 18
- Forks
- 29
- Merge medio
- 6 d 19 h
- PR fusionados (30 d)
- 19
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/azure-linux-dev-tools
-
`patch-add` overlay appends `PatchN:` tag at end of preamble instead of grouping with existing Patch tagsPosiblemente ocupada @IzanVil la tomó hace 16 días. Abiertoarea: overlays enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/azure-linux-dev-tools#284 · 2 comentarios ·
Los mantenedores suelen responder en 7 días
-
[Bug]: no specification for TOML object modelQuizá libre de nuevo @ddstreet la tomó hace 42 días y no hay ningún pull request abierto. Abiertobug
microsoft/azure-linux-dev-tools#318 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 7 días
-
[Bug]: azldev comp render doesn't always add changelog entriesQuizá libre de nuevo @ddstreet la tomó hace 54 días y no hay ningún pull request abierto. Abiertobug GA blocker
microsoft/azure-linux-dev-tools#316 · 1 asignado ·
Los mantenedores suelen responder en 7 días
-
config dump omits per-file overlays and inherited default-component-configPosiblemente ocupada @liunan-ms la tomó hace 54 días. Abiertobug GA blocker
microsoft/azure-linux-dev-tools#264 · 1 asignado ·
Los mantenedores suelen responder en 7 días
-
[Bug]: Findings from first pass at mutation testingQuizá libre de nuevo @liunan-ms la tomó hace 42 días y no hay ningún pull request abierto. Abiertoarea: testing bug
microsoft/azure-linux-dev-tools#245 · 1 asignado ·
Los mantenedores suelen responder en 7 días
Todos los issues de microsoft/azure-linux-dev-tools
Issues similares
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substringAbiertotriage/pending-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
external-secrets/external-secrets#7117 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ENTERPILOT/GoModel#1183 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Edwin-metcalf/MetCode#16 ·
-
Action Required: Fix Renovate ConfigurationPosiblemente ocupada @thompson-tomo la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
open-telemetry/opentelemetry-collector#16170 ·
Los mantenedores suelen responder en 1 día
-
Buffer.writeRTX drops the RTCP returned by calc, so NACKs for other lost packets are never sentAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día