coreos / coreos/coreos-assembler
kola.json is not used on external tests
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 393
- Forks
- 193
- Avg merge
- 17h 6m
- Merged PRs (30d)
- 5
Description
Bug Report
Environment
What operating system is being used to run coreos-assembler?
Fedora 43
What operating system is being assembled?
fedora coreos
Is coreos-assembler running in Podman or Docker?
podman
If Podman, is coreos-assembler running privileged or unprivileged?
rootless with --privileged
Expected Behavior
When defining external tests for kola, the file kola.json should be used as default metadata for all tests in the test folder.
Actual Behavior
Only in binary metadatas (json and yaml) are used and kola.json is parsed, but never used
Reproduction Steps
- Create an external test. Put metadata in the kola.json file
- Run kola list -E /path/to/project
- On the ext.* tests, the metadata are not used
This procedure is for quick check, running or listing the tests is the same. Using label is a quick way to check.
Other Information
After reading the code I found the issue. in mantle/kola/harness.go, the function registerExternalTest will check if the binary have metadata in the binary using the metadataFromTestBinary function. If the result is nil, then kola.json is used, if not, the in binary metadata are used.
The commit 119bc7f9aadc36dfa210bb665df10a41e413c544 that introduced the exclusive metadata, modified the function metadataFromTestBinary by initializing the meta variable with this expression :
meta := &externalTestMeta{Exclusive: true}
Causing the function to never return a nil value, and thus kola.json will never be used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in mantle/kola/harness.go, especially registerExternalTest and metadataFromTestBinary, then reproduce the report with an external test and kola list -E /path/to/project. Check how kola.json and binary metadata are selected. Done means metadata from kola.json is applied to external tests when binary metadata is absent, including labels shown by kola list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100