skopeo icon indicating copy to clipboard operation
skopeo copied to clipboard

[skip-ci] Packit/TMT: Run gating tests

Open lsm5 opened this issue 2 years ago • 20 comments

This commit will run Skopeo's gating tests using Packit and TMT.

If all tests can be run via Packit + TMT, it should be a cheaper alternative to Cirrus (except the Debian part).

lsm5 avatar Apr 03 '23 14:04 lsm5

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar May 04 '23 00:05 github-actions[bot]

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Jun 04 '23 00:06 github-actions[bot]

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Jul 06 '23 00:07 github-actions[bot]

@lsm5 are you still working on this?

(If so, this is not urgent from my POV, no need to push it to the front of your queue — I’d just like to close the PR if there is absolutely no chance this work will continue.)

mtrmac avatar Jul 07 '23 02:07 mtrmac

@mtrmac I do plan to work on this. But may take a while. I have bookmarked it for myself so I don't lose track. So please feel free to close it.

lsm5 avatar Jul 07 '23 13:07 lsm5

Thanks, if it is still relevant, let’s keep it open. It might help, or inspire, other contributors.

mtrmac avatar Jul 07 '23 15:07 mtrmac

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Aug 07 '23 00:08 github-actions[bot]

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Sep 07 '23 00:09 github-actions[bot]

@mtrmac @vrothberg @cevich RE: system tests in CI, is it critical to run them in a container or would we be ok with running test-system-local ? Asking mainly RE: packit + tmt tests.

lsm5 avatar Oct 11 '23 14:10 lsm5

@edsantiago is authoritative for system tests (question above).

mtrmac avatar Oct 11 '23 14:10 mtrmac

Forgive me please, I don't understand the question. It's been a while since I've looked at skopeo gating tests, but my recollection is that they run on a plain system, via dnf install skopeo-tests. What's the context for "in a container"?

edsantiago avatar Oct 11 '23 14:10 edsantiago

@mtrmac @vrothberg @cevich RE: system tests in CI, is it critical to run them in a container or would we be ok with running test-system-local ?

IIRC the system tests run a registry server (container). So… running -local would be much simpler in that there would be no need for nested Podman; OTOH the tests would be much less isolated from the surrounding environment, which might be a difficulty.

I’m not immediately sure how much custom tooling exists in the CI container, and would need to be reproduced; https://github.com/containers/automation_images/blob/main/skopeo_cidev/setup.sh is relevant to that, but IIRC almost all of that exists for integration, not system, tests.

mtrmac avatar Oct 11 '23 14:10 mtrmac

/packit test

thrix avatar Oct 11 '23 15:10 thrix

So, unfortunately, the issue we are hitting is a bug in Packit:

https://github.com/packit/packit-service/issues/2028

It was not considered a bug before, as people were not hitting it and we did not know it had this consequence. They are working on a fix.

thrix avatar Oct 11 '23 15:10 thrix

So, unfortunately, the issue we are hitting is a bug in Packit:

packit/packit-service#2028

It was not considered a bug before, as people were not hitting it and we did not know it had this consequence. They are working on a fix.

Thanks @thrix . I'll disable the rhel tests for now.

lsm5 avatar Oct 11 '23 17:10 lsm5

@mtrmac @vrothberg @cevich RE: system tests in CI, is it critical to run them in a container or would we be ok with running test-system-local ?

IIRC the system tests run a registry server (container). So… running -local would be much simpler in that there would be no need for nested Podman; OTOH the tests would be much less isolated from the surrounding environment, which might be a difficulty.

I’m not immediately sure how much custom tooling exists in the CI container, and would need to be reproduced; https://github.com/containers/automation_images/blob/main/skopeo_cidev/setup.sh is relevant to that, but IIRC almost all of that exists for integration, not system, tests.

ack, the test-system target seems to spawn some container too. Anyway, I'll try to mimic the cirrus setup in tmt. Thanks

lsm5 avatar Oct 11 '23 17:10 lsm5

/packit retest

lsm5 avatar Aug 13 '24 18:08 lsm5

/packit retest

lsm5 avatar Aug 14 '24 14:08 lsm5

/packit retest

lsm5 avatar Aug 29 '24 11:08 lsm5

Tests failed. @containers/packit-build please check.

@mtrmac PTAL. Only added x86_64 integration, validate and unit tests for now.

lsm5 avatar Sep 25 '24 12:09 lsm5

@mtrmac PTAL. Only added x86_64 integration, validate and unit tests for now.

If -local targets in CI tests are acceptable, that'd save us the pain of quay.io/libpod/skopeo_cidev image maintenance. Else, I'll look at making that image multiarch.

lsm5 avatar Sep 25 '24 14:09 lsm5

Hmm, and I guess running the tests in the skopeo_cidev container renders the multiple testing-farm- distro tests pointless.

lsm5 avatar Sep 25 '24 14:09 lsm5

If -local targets in CI tests are acceptable, that'd save us the pain of quay.io/libpod/skopeo_cidev image maintenance. Else, I'll look at making that image multiarch.

From an extremely brief look at the Packit / TMT documentation, the tests seem to run in an isolated VM (chroot? container?) and install RPM test subjects into that. Running an extra level of isolation in a container seems unnecessary in that case. (Also, to my knowledge no-one has been using the $CONTAINER_RUN targets for some time, they might have been broken for months without anyone noticing.) So, using the -local targets does seem better to me.

Also, testing the binary, if it comes from a RPM, in its expected distribution, seems clearly more valuable than running it in some other frozen / differently-built container.

OTOH, at least one reason why the container exists, and is regularly rebuilt, is so that individual Skopeo CI runs don’t need to install and compile all of those tools, which rarely change, on every single CI RUN. Hence, in Cirrus, runner.sh uses the -local targets but fetches pre-built binaries from that container.

If the Packit tests are ever intended to be merge-blocking, something like that to shorten the CI time would be very valuable.

And, also, I’d prefer not to maintain the test tool setup code ( https://github.com/containers/automation_images/blob/main/skopeo_cidev/setup.sh and make tools ) in two duplicated copies, if that could be helped.

mtrmac avatar Sep 25 '24 18:09 mtrmac

@mtrmac thanks a lot for all the comments. Setting back to draft while I work through them.

lsm5 avatar Sep 26 '24 10:09 lsm5