Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mantle/kola: copy basic tests into formal kola workflow #3652

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

prestist
Copy link
Contributor

@prestist prestist commented Nov 7, 2023

cmd-kola has non-conformed basic kola tests. These tests do not benefit from the supporting functionality around kola test's such as denylisting or other functionality. reduce cmd-kola and conform the basic kola tests.

fixes #3418

This is a small rework on an already existing; but stale pr. Cherry-picked and made a few touches.

@prestist
Copy link
Contributor Author

prestist commented Nov 7, 2023

hmm, I might have missed it but I did not see what triggers the CI to run kola -p qemu --build latest run --rerun --allow-rerun-success=tags=needs-internet --on-warn-failure-exit-77 --arch=x86_64 --basic-qemu-scenarios

If someone could point me to it I can make a pr and remove it.

@travier travier requested a review from marmijo November 8, 2023 15:20
@ravanelli
Copy link
Member

hmm, I might have missed it but I did not see what triggers the CI to run kola -p qemu --build latest run --rerun --allow-rerun-success=tags=needs-internet --on-warn-failure-exit-77 --arch=x86_64 --basic-qemu-scenarios

If someone could point me to it I can make a pr and remove it.

We also need to touch coreos-ci-lib

Copy link
Member

@ravanelli ravanelli left a comment

Choose a reason for hiding this comment

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

Only a small comment, overall LGTM

prestist added a commit to prestist/coreos-ci-lib that referenced this pull request Nov 8, 2023
The argument for --basic-qemu-scenarios has been removed. The tests
invoked by it are now formal kola tests.

See coreos/coreos-assembler#3652
@prestist
Copy link
Contributor Author

prestist commented Nov 8, 2023

hmm, I might have missed it but I did not see what triggers the CI to run kola -p qemu --build latest run --rerun --allow-rerun-success=tags=needs-internet --on-warn-failure-exit-77 --arch=x86_64 --basic-qemu-scenarios
If someone could point me to it I can make a pr and remove it.

We also need to touch coreos-ci-lib

awesome; made a pr. thank you

Copy link
Member

@marmijo marmijo left a comment

Choose a reason for hiding this comment

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

This LGTM generally. I'm curious if we need 6 kola tests though. I believe the original logic produced only 4 basic tests:

  • x86_64
    • basic (nvme)
    • uefi
    • uefi-secure
  • multi-arch
    • basic (not-nvme)

src/cmd-kola Show resolved Hide resolved
@travier
Copy link
Member

travier commented Nov 9, 2023

Trying to summarize what we'll run:

x86_64 aarch64 ppc64le s390x
boot type bios/uefi/uefi-secure bios bios bios
nvme yes no no no
Number of combination 6 1 1 1

So the question is: Should we really run all 6 combination for the test matrix on x86_64 or just a subset of those for nvme? For now we were only running basic (nvme), uefi, uefi-secure as Michael said.

Shouldn't we run uefi & uefi-secure boot on aarch64 as well? Feels like that should be working.

EDIT: Re-reading the PR, this runs all 6 ones for x86_64 so should be OK.

@marmijo
Copy link
Member

marmijo commented Nov 9, 2023

Re-reading the PR, this runs all 6 ones for x86_64 so should be OK

I'm good with that. It makes sense that we would test bios, uefi, and uefi-secure with both nvme and non-nvme conditions on x86_64.

So we just need to make sure that the nvme and uefi/uefi-secure tests dont run on other arches.

Shouldn't we run uefi & uefi-secure boot on aarch64 as well? Feels like that should be working.

Unless we want these ones to run on aarch64.

@prestist
Copy link
Contributor Author

prestist commented Nov 9, 2023

So we just need to make sure that the nvme and uefi/uefi-secure tests dont run on other arches.

If thats the case It sounds like I need to update the field Architectures to only run x86 on all but bios?

@marmijo
Copy link
Member

marmijo commented Nov 9, 2023

If thats the case It sounds like I need to update the field Architectures to only run x86 on all but bios?

Yes, I believe that should do it!

prestist added a commit to prestist/coreos-ci-lib that referenced this pull request Nov 9, 2023
The argument for --basic-qemu-scenarios has been removed. The tests
invoked by it are now formal kola tests.

See coreos/coreos-assembler#3652
prestist added a commit to prestist/coreos-ci-lib that referenced this pull request Nov 9, 2023
The argument for --basic-qemu-scenarios has been removed. The tests
invoked by it are now formal kola tests.

See coreos/coreos-assembler#3652
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

So overall I think there are at least two main ways I see we can approach this:

  1. Have knobs as part of register.Test to say e.g. which firmware to use for the test.
  2. Use ClusterSize: 0 and manually bring up the VMs ourselves. This is done in a bunch of QEMU tests already where we need more control over the VM settings. (Do a git grep 'ClusterSize: \+0' to see them.)

Leaning towards the latter to avoid having to add a bunch more knobs in register.Test. You can have a single function that sets up the tests and takes arguments for the variable knobs and each test calls that one function with the different combinations we want (see the luks.* tests for an example of this pattern).

Re. the combinations, my vote is to match the current coverage and then we can extend it in the future. But not strongly against either!

mantle/kola/tests/coretest/core.go Outdated Show resolved Hide resolved
mantle/kola/harness.go Outdated Show resolved Hide resolved
mantle/kola/harness.go Outdated Show resolved Hide resolved
mantle/kola/tests/coretest/core.go Outdated Show resolved Hide resolved
mantle/kola/tests/coretest/core.go Show resolved Hide resolved
prestist added a commit to prestist/coreos-ci-lib that referenced this pull request Nov 14, 2023
The argument for --basic-qemu-scenarios has been removed. The tests
invoked by it are now formal kola tests.

skipSecureBoot now translates to  --denylist-test
*.uefi-secure

See coreos/coreos-assembler#3652
@prestist
Copy link
Contributor Author

So overall I think there are at least two main ways I see we can approach this:

1. Have knobs as part of `register.Test` to say e.g. which firmware to use for the test.

2. Use `ClusterSize: 0` and manually bring up the VMs ourselves. This is done in a bunch of QEMU tests already where we need more control over the VM settings. (Do a `git grep 'ClusterSize: \+0'` to see them.)

Leaning towards the latter to avoid having to add a bunch more knobs in register.Test. You can have a single function that sets up the tests and takes arguments for the variable knobs and each test calls that one function with the different combinations we want (see the luks.* tests for an example of this pattern).

Re. the combinations, my vote is to match the current coverage and then we can extend it in the future. But not strongly against either!

Ok thank you for the pointer. I am looking into doing this.

src/cmd-kola Show resolved Hide resolved
mantle/kola/tests/coretest/core.go Outdated Show resolved Hide resolved
mantle/platform/platform.go Outdated Show resolved Hide resolved
mantle/kola/tests/coretest/core.go Outdated Show resolved Hide resolved
mantle/kola/tests/coretest/core.go Outdated Show resolved Hide resolved
@jlebon jlebon changed the title mantle/kola: copy basic tests into formal kola workflow [review] mantle/kola: copy basic tests into formal kola workflow Feb 12, 2024
@jlebon jlebon changed the title [review] mantle/kola: copy basic tests into formal kola workflow mantle/kola: copy basic tests into formal kola workflow Feb 12, 2024
@prestist
Copy link
Contributor Author

/retest

@jlebon
Copy link
Member

jlebon commented Apr 12, 2024

+ cosa kola --basic-qemu-scenarios --skip-secure-boot --output-dir /logs/artifacts/kola-basic
kola -p qemu run --basic-qemu-scenarios --skip-secure-boot --output-dir /logs/artifacts/kola-basic
Error: unknown flag: --basic-qemu-scenarios

Hmm, the conditional at https://github.com/openshift/os/blob/59526550b3a4a466c6354cbf2455eeabe1122d1c/ci/prow-entrypoint.sh#L129 is failing for some reason. I wonder if somehow this isn't running with the changes from this PR.

I guess we can easily test that.
Added a test commit.

@jlebon jlebon force-pushed the add-denylist-support branch 5 times, most recently from cfe251f to 9905a54 Compare April 13, 2024 23:32
`cmd-kola` has non-conformed basic kola tests. These tests do not
benefit from the supporting functionality around kola test's such as
denylisting or other functionality. reduce `cmd-kola` and conform
the basic kola tests.

fixes coreos#3418

co-authored-by: AdamOBrien <aobrien@redhat.com>
@jlebon
Copy link
Member

jlebon commented Apr 15, 2024

OK, finally got to the bottom of the CI issue. Should be fixed by openshift/os#1485.

@prestist
Copy link
Contributor Author

✅ 👀! I see green!

@prestist
Copy link
Contributor Author

Thank you, holy crap. Talk about entangled.

@prestist
Copy link
Contributor Author

Also, I noticed that you changed it from uefi.secure to uefi-secure in the latest push https://github.com/coreos/coreos-assembler/compare/9905a54445f384b124a8e83fe4f12e0dff2f8bb1..a6ad56783a796f4baa698e8d4c842532765b6482

Thank you for catching that.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

OK, finally green CI here! 🎉

I think we can merge this now, but to be safe let's wait until coreos/fedora-coreos-streams#886 is past the build and test stages.

@dustymabe
Copy link
Member

I think we can merge this now, but to be safe let's wait until coreos/fedora-coreos-streams#886 is past the build and test stages.

we're past that point now! merging

@jlebon jlebon merged commit 6775ab1 into coreos:main Apr 16, 2024
5 checks passed
@jlebon
Copy link
Member

jlebon commented Apr 16, 2024

Next steps on this:

dustymabe added a commit to coreos/fedora-coreos-pipeline that referenced this pull request Apr 17, 2024
jlebon pushed a commit to coreos/fedora-coreos-pipeline that referenced this pull request Apr 17, 2024
@travier
Copy link
Member

travier commented Apr 17, 2024

Thanks Steven and Jonathan for persisting with this PR!

travier added a commit to travier/os that referenced this pull request Apr 17, 2024
Update kola denylist with the new tests names.

See: openshift#1237
See: coreos/coreos-assembler#3652
@travier
Copy link
Member

travier commented Apr 17, 2024

openshift/os: openshift/os#1489

jbtrystram pushed a commit to jbtrystram/openshift-os that referenced this pull request Apr 22, 2024
Commit 81e5134 relies on logic in the Prow scripts to skip the Secure
Boot basic test, but that logic does not exist in the prod pipelines. So
we still need to snooze the basic test for now.

Once coreos/coreos-assembler#3652 is in, we
should be able to clean this up.

Fixes 81e5134 ("kola-denylist: Do not snooze basic tests anymore").
aaradhak pushed a commit to aaradhak/fedora-coreos-pipeline that referenced this pull request May 14, 2024
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.

Convert basic tests (cosa kola --basic-qemu-scenarios) to a denylist-able one
6 participants