1313 Commits

Author SHA1 Message Date
dcdb5408de De-duplicate docker-py testing
Previously there were two CI tasks that ended up both testing docker-py
compatibility.  Remove the duplicate from the `localapiv2-python` make
target, and symlink the identical requirements file.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-09 10:13:02 -04:00
bf091abdc5 Fix not testing registry.conf updates
Previously, if anyone touched these files no extra testing would
trigger.  However, basically all testing depends on them.  Update the
condition and test that verifies it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-08 10:40:22 -04:00
f041d059b5 Add passwd validate and generate steps
Add generate helper function.
Also, add a troubleshooting try/catch block in case we get more flakes
during Set-LocalUser step in Windows powershell.

Resolves: https://github.com/containers/podman/issues/23468

Signed-off-by: Nicola Sella <nsella@redhat.com>
2024-08-08 11:50:17 +02:00
7c38ee7565 Merge pull request #23509 from l0rd/fix-23502
Change Windows installer MajorUpgrade Schedule
2024-08-06 00:08:10 +00:00
01d739a65e Change Windows installer MajorUpgrade Schedule
Use Schedule "afterInstallExecute" (instead of the
default "afterInstallValidate") in the Windows
installer MajorUpgrade element. That avoid
overriding eventual users changes to the podman
machine configuration file created by the
installer.

Fixes #23502

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-08-05 21:52:58 +02:00
87dad1caef CI: podman-machine: do not use cache registry
It's too difficult to keep the podman-machine image up-to-date.
And, we can't use the cache on Mac/Windows, so if quay is down
we're hosed no matter what.

Add a "nocache" mechanism to install_test_configs() and use that
in machine test setup.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-05 05:12:36 -06:00
e429160e5b Temporarly disable failing Windows Installer CI test
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-08-05 11:51:46 +02:00
69a5b28e6e Merge pull request #23455 from lsm5/main-5.3-bump
Version: bump to v5.3.0-dev
2024-08-03 02:20:30 +00:00
029a9aa34e Add libkrun Mac task
Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-01 15:01:45 -04:00
fcf7cd7d5c Version: bump to v5.3.0-dev
We have v5.2 branch now.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-07-31 13:30:35 -04:00
7bb3b83c17 CI: enable root user namespaces
Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-27 23:23:29 +02:00
599c0d167c build: Update gvisor-tap-vsock to 0.7.4
This contains a fix for a gvproxy crash on macos on fast connections
with heavy network load.

This should fix https://github.com/containers/podman/issues/23114

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-07-24 16:21:00 +03:00
2015137eee Merge pull request #23367 from rhatdan/codespell
Run codespell on source
2024-07-23 23:11:32 +00:00
b005b13274 Merge pull request #23328 from l0rd/win-installer-update-bug
Fix windows installer deleting machine provider config file
2024-07-23 13:14:46 +00:00
7768cf235e Run codespell on source
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-07-23 07:28:23 -04:00
a05a9cae07 logformatter: tweaks to pass html tidy
Plus, I think my ampersand-quot change earlier this month
caused problems for firefox. We no longer need it (pull-option
does not need the funky double-quoted curly-brace string),
so, remove it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-22 07:58:32 -06:00
5a7199015a Bump bundled krunkit to 0.1.2
Bump the bundled krunkit version from 0.1.1 to 0.1.2.

Fixes: #23194

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-07-19 13:35:49 +02:00
2e4b640ad2 Fix windows installer deleting machine provider config file
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-07-18 16:56:39 +02:00
b1e535b911 contrib: use a distinct --pull-option= for each flag
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-12 12:51:39 +02:00
360c4f372d Merge pull request #23234 from Luap99/test-nftables
test netavark nftables driver
2024-07-11 22:19:32 +00:00
58c8803a1e Merge pull request #22726 from edsantiago/pull-from-local-registry
CI: Use local cache registry
2024-07-11 12:42:04 +00:00
43f6173cc6 CI: test nftables driver on fedora
Make sure this passes podman CI before we push out a default change.

ref: https://fedoraproject.org/wiki/Changes/NetavarkNftablesDefault

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-11 14:08:27 +02:00
e570aacc4e Merge pull request #23212 from l0rd/vs-buildtools
Using Visual Studio BuildTools as a MinGW alternative
2024-07-11 11:25:03 +00:00
07b69943a4 CI: use local registry, part 3 of 3: for developers
New tool, get-local-registry-script, intended for developers
to get a local registry running in their environment. This is
not necessary for any tests, but may be desirable for performance
reasons and/or to recreate the CI environment.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-11 04:39:45 -06:00
dd1bcabae9 CI: use local registry, part 2 of 3: fix tests
This commit gets tests working under the new local-registry system:

  * amend a few image names, mostly just sticking to a consistent
    list of those images in our registry cache. Mostly minor
    tag updates.

  * trickier: pull_test: change some error messages, and remove
    a test that's now a NOP. Basically, with a local (unprotected)
    registry we always get "404 manifest unknown"; with a real
    registry we'll get "403 I can't tell you".

  * trickiest: seccomp_test: build our own images at run time,
    with our desired labels. Until now we've been pulling
    prebuilt images, but those will not copy to the local
    cache registry. Something about v1? Anyhow, I gave up
    trying to cache them, and the workaround is straightforward.

Also took the liberty of strengthening a few error-message checks

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-11 04:39:45 -06:00
2e8c074234 CI: use local registry, part 1 of 3: setup
As of https://github.com/containers/automation_images/pull/357
our CI VMs include a local registry preloaded with all(*)
images used in tests.

 * where "all" means "most".

This commit installs a new registries.conf that redirects docker
and quay to the new local registry. The hope is that this will
reduce CI flakes.

Since tests change over time, and new tests may require new
images, this commit also adds a mechanism for pulling in
remote images at test run time. Obviously this negates
the purpose of the cache, since it introduces a flake
pain point. The idea is: DO NOT DO THIS UNLESS ABSOLUTELY
NECESSARY, and then, if we have to do this, hurry up and
spin new CI VMs that include the new image(s).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-11 04:39:45 -06:00
d4c0e7ecbd CI: test composefs on rawhide
Run root e2e & system tests using composefs on rawhide.

Write magic settings to storage.conf. That part is easy.

e2e tests, however, ignore storage.conf. They require everything
to be specified on the command line. And "everything", in the
case of composefs, includes a long complicated --pull-options
string which in turn requires containers-storage PR 1966
which, as of this writing, is finally vendored into podman.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-10 14:51:58 -06:00
1dd8a35b2f Drop minikube CI test
This test flakes frequently and its status is completely ignored in CI.
At the time of this commit, nobody has stepped up to debug or fix it.
Drop the test.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-07-09 11:30:00 -04:00
4b7aaafb2d cirrus: check for header files in source code check
When we check if source code was changed also include header files.
There is only one header file currently but that can change and it may
be possible that changes in this file can break things so make sure it
is considered source code so that all tests are triggered.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-09 13:34:40 +02:00
5e9ab00063 pr-should-include-tests: no more CI:DOCS override
CI:DOCS is no more.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-08 15:46:56 -06:00
81250cc5a9 Visual Studio BuildTools as a MinGW alternative
Building the MSI hook on Windows
(`contrib/win-installer/podman-msihooks/check.c`)
currently requires MinGW. This commit updates the build
script so that, when MinGW is absent but the C compiler
included in Visual Studio BuildTools is installed, the
latter is used to build the MSI hook.

Other than that, `winmake.ps1` has a new `installertest`
target to run the Windows installer tests that are
currently verified by Cirrus CI.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-07-08 17:18:15 +02:00
049942db04 cirrus: add missing test/tools to danger files
This directory contains important tools such as ginkgo as such updates
there should run through all testing and not skip anything.

Technically we do not need to run system tests as it doesn't use any
tool from there but that
a) might change in the future and
b) would make the only_if rules much more complicated if we try to
   exclude it and
c) updates in test/tools are rare and/or automated so it does not cause
   inconveniences to run all anyway

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-08 10:58:19 +02:00
e2ff5d4e5d Windows Installer: switch to wix5
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at https://github.com/containers/automation_images/pull/354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

The GitHub Action to upload windows installer now builds the installer
using winmake.ps1.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: https://github.com/lsm5/podman/pull/3

- small fixes to windows installer theme
Ref: https://github.com/lsm5/podman/pull/4

- Better win-installer sidebar logo
Ref: https://github.com/lsm5/podman/pull/5

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-07-05 15:28:19 -04:00
0358325f9b Merge pull request #23174 from Luap99/cirrus-skips
cirrus.yml: automatic skips based on source
2024-07-04 17:26:00 +00:00
55ad0d6e0e cirrus.yml: automatic skips based on source
As we want to get rid of the special titles convert the existing skips
to the only_if condition, this makes it more readable as we do not need
to negate so much.

Then add similar conditions for all test tasks, this removes the need to
a special title such as CI:DOCS as the logic is smart enough to only
docs changes when no source code was changed.

Update the documentation for the new logic and no longer point
contributors to the CI:DOCS title as it is gone now.

There is a bunch of duplication in the rules as yaml doesn't allow us to
share only parts of a string. To prevent unwanted drift a test case in
contrib/cirrus/cirrus_yaml_test.py is added to ensure all conditions
follow the same base ruleset.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-04 11:32:36 +02:00
e810b340ef CI: mount tmpfs for container storage
Try to speed up the CI tests by using tmpfs as container storage.
This is important for system tests, other tests setup their own --root
already on tmpfs so it should not effect them.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 12:45:03 +02:00
c9e3458c99 CI: Build-Each-Commit test: run only on PRs
Followup to #23081, which broke this test on nightly cron.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-28 05:58:24 -06:00
fda0f8123b Merge pull request #23098 from Luap99/CI-bail
cirrus: remove redundant skip logic and lower int timeout
2024-06-26 18:38:06 +00:00
6c75a10875 Run linting in parallel with building
Linting code changes with golangci-lint is a very slow and resource
intensive process.  However, it does not depend on compiling anything.
This means it may run in parallel with the build tasks for
a modest perceived runtime duration improvement.

Additionally, the former validation make targets that **do** require a
build execute faster than CI is able to provision a VM, simply tack them
onto the end of all build operations.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-25 14:27:56 -04:00
4220ee02f7 Merge pull request #23081 from edsantiago/logformatter-base-sha
CI: logformatter: link to correct PR base
2024-06-25 17:55:01 +00:00
8f2d403cd1 cirrus: remove redundant skip logic
As of commit d9183f0587 we use the cirrus.yml skip logic to skip based
on source changes. As such the add hoc logic inside our test setup can
be removed. However as I did not yet implement the skip logic for all
tests task in cirrus.yml it must remain for the other tasks for now.
I plan to migrate the other in a week or two once we are confident that
the cirrus.yml logic works well for us.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-25 16:44:54 +02:00
1a6a200403 CI: logformatter: link to correct PR base
Two enormous misunderstandings:

  1) $CIRRUS_BASE_SHA is worthless. I thought it was, you know,
     the BASE SHA of the current commit, but (as best I can tell)
     it seems to be the SHA of the most recent commit on the
     destination branch. Cirrus docs are unhelpful. Anyhow,
     it's clearly not anything useful. Stop using it.

  2) $EPOCH_TEST_COMMIT is closer to what we want. It is
     defined in Makefile as the git merge-base. But for unknown
     reasons it was being clobbered in CI scripts, and it
     doesn't seem to work in all contexts, so, eliminate it
     from CI setup scripts. Leave it only in Makefile.

This leaves us with no option other than defining our own
merge-base variable, PR_BASE_SHA. Do so and pass it along
to rootless jobs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-25 06:53:59 -06:00
0563fb4217 Merge pull request #22920 from cgwalters/virtiofsd-machine
machine/linux: Switch to virtiofs by default
2024-06-24 17:58:08 +00:00
5815195528 macos-installer: bundle krunkit
Extend Makefile and package.sh to download, sign and bundle krunkit and
its dependencies into the package.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-06-24 14:42:04 +02:00
d53fee511f CI Cleanup: Remove cgroups v1 support
With (esp. Debian) CI VM images built by
https://github.com/containers/automation_images/ pull/338 CI no-longer
tests with runc nor cgroups v1.  Add logic to fail under these
conditions.  Prune back high-level YAML/script envars and logic formerly
required to support these things.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-21 10:08:39 -04:00
f134ab77bc cirrus.yml: add CI:ALL mode to force all tests
Now that we have source based skips there might be a case where we have
to run all tests. One option is to simply change a line in one of the
danger files but having something that can be set as title might be
easier for users.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-20 19:10:02 +02:00
d9183f0587 cirrus.yml: implement skips based on source changes
We do not have to test everything for each PR, we can know based on the
source if we changed (i.e. machine code) and only run the tests then.

This implements it as skip conditions, due to the nature of yaml files
we unfortunately cannot deduplicate everything, i.e. the is PR check and
danger files apply to everything but as skip is only a single yaml
string we cannot deduplicate parts of that string. If anyone knows a way
to achieve this I like to hear it.

For now I implemented this for int, system, bud and machine tests. Once
we are more comfortable with this I plan on adding it to other tests as
well.

This will replace the current _bail_if_test_can_be_skipped logic as it
covers more, marks tasks actually skipped in the github UI and works
even for the windows/macos machine tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-20 19:10:02 +02:00
0eaec1a2e9 cirrus: check for system test leaks in nightly
The leak check is slower (over 5mins) so we do not wnat them on PR runs
to speed system tests up. However that opens the door for someone to add
a test which forgets to do the correct cleanup themselves. This might
not cause a fatal error right away and only later when new tests would
be added. To prevent this happening the nighlty run will check leaks so
that we can fix them quickly and not notice them months/years later when
a new test is added that might trip over it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-18 11:06:52 +02:00
c20767120f CI: do not install python packages at runtime
No idea why we need them, it passes without them so I just remove them.
Currently CI is broken as this install is failing on rawhide for some
reason. I don't know what changed there but this is working and unblocks
CI so I like to get this in.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-17 13:03:25 +02:00
bf541c6740 machine/linux: Support virtiofs mounts (retain 9p default)
I'm hitting a bug with 9p when trying to transfer large files.
In RHEL at least 9p isn't supported because it's known to have a
lot of design flaws; virtiofsd is the supported and recommended
way to share files between a host and guest.

Add a new hidden `PODMAN_MACHINE_VIRTFS` environment
variable  that can be set to `virtiofs` to switch to virtiofsd.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-07 10:03:06 -04:00