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

Test -Dmigration_path_for_coreos_toolbox on CentOS Stream 9 #1171

Merged
merged 7 commits into from Dec 14, 2022

Conversation

debarshiray
Copy link
Member

@debarshiray debarshiray commented Nov 18, 2022

The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9. Hence, it makes sense to use CentOS Stream 9
to run the 'unit tests' on the corresponding code path.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have ShellCheck and bats RPMs.

containers#1171
@debarshiray debarshiray marked this pull request as draft November 18, 2022 18:51
@debarshiray debarshiray changed the title Test -Dmigration_path_for_coreos_toolbox on CentOS Stream 9 [WIP] Test -Dmigration_path_for_coreos_toolbox on CentOS Stream 9 Nov 18, 2022
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 9m 05s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 8m 54s
✔️ system-test-fedora-rawhide SUCCESS in 37m 56s
✔️ system-test-fedora-36 SUCCESS in 11m 57s
✔️ system-test-fedora-35 SUCCESS in 12m 42s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have ShellCheck and bats RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 18, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
@softwarefactory-project-zuul
Copy link

Build failed.

✔️ unit-test SUCCESS in 8m 30s
unit-test-migration-path-for-coreos-toolbox RETRY_LIMIT in 50s
✔️ system-test-fedora-rawhide SUCCESS in 32m 52s
✔️ system-test-fedora-36 SUCCESS in 11m 11s
✔️ system-test-fedora-35 SUCCESS in 12m 21s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 19, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 19, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
@debarshiray
Copy link
Member Author

We are missing codespell in CentOS Stream 9. So, I filed a request to add it to Fedora EPEL 9.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 19, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 19, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
@softwarefactory-project-zuul
Copy link

Build failed.

✔️ unit-test SUCCESS in 8m 37s
unit-test-migration-path-for-coreos-toolbox RETRY_LIMIT in 1m 35s
✔️ system-test-fedora-rawhide SUCCESS in 35m 32s
✔️ system-test-fedora-36 SUCCESS in 11m 24s
✔️ system-test-fedora-35 SUCCESS in 12m 19s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 21, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 21, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
@debarshiray
Copy link
Member Author

TASK [Install RPM packages from CentOS Stream CodeReady Linux Builder]
centos-9-stream | ERROR
centos-9-stream | {
centos-9-stream |   "failures": [
centos-9-stream |     "No package golang-github-cpuguy83-md2man available."
centos-9-stream |   ],
centos-9-stream |   "msg": "Failed to install some of the specified packages",
centos-9-stream |   "rc": 1,
centos-9-stream |   "results": []
centos-9-stream | }

We are waiting for golang-github-cpuguy83-md2man to be added to CodeReady Linux Builder for CentOS Stream 9.

@softwarefactory-project-zuul
Copy link

Build failed.

✔️ unit-test SUCCESS in 8m 28s
unit-test-migration-path-for-coreos-toolbox RETRY_LIMIT in 2m 16s
✔️ system-test-fedora-rawhide SUCCESS in 29m 27s
✔️ system-test-fedora-36 SUCCESS in 11m 22s
✔️ system-test-fedora-35 SUCCESS in 12m 08s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 29, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 29, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the unit tests on the corresponding code path.

Note that, just like Fedora, Podman prefers crun(1) as its OCI runtime
on CentOS Stream 9 [1,2].

[1] Podman commit 060775901de09b27
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/060775901de09b27

[2] Podman commit f327e88a08ca224b
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/f327e88a08ca224b

containers#1171
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 8m 36s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 01s
✔️ system-test-fedora-rawhide SUCCESS in 25m 59s
✔️ system-test-fedora-36 SUCCESS in 13m 01s
✔️ system-test-fedora-35 SUCCESS in 13m 56s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the 'unit tests' on the corresponding code path.

Note that, just like Fedora, Podman prefers crun(1) as its OCI runtime
on CentOS Stream 9 [1,2].

[1] Podman commit 060775901de09b27
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/060775901de09b27

[2] Podman commit f327e88a08ca224b
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/f327e88a08ca224b

containers#1171
@debarshiray debarshiray force-pushed the wip/rishi/centos-9-tests branch 2 times, most recently from e8c8fa0 to 3093ff2 Compare December 14, 2022 19:16
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 8m 22s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 8m 20s
✔️ system-test-fedora-rawhide SUCCESS in 26m 16s
✔️ system-test-fedora-36 SUCCESS in 12m 17s
✔️ system-test-fedora-35 SUCCESS in 13m 35s

@softwarefactory-project-zuul
Copy link

Build failed.

✔️ unit-test SUCCESS in 8m 19s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 8m 16s
system-test-fedora-rawhide RETRY_LIMIT in 1m 01s
✔️ system-test-fedora-36 SUCCESS in 12m 06s
✔️ system-test-fedora-35 SUCCESS in 13m 28s

@debarshiray
Copy link
Member Author

The Fedora Rawhide repositories are busted at the moment:

Failed to download packages: crun-1.7.2-1.fc38.x86_64: Cannot download, all mirrors were already tried without success

@debarshiray
Copy link
Member Author

recheck

@softwarefactory-project-zuul
Copy link

Build failed.

✔️ unit-test SUCCESS in 8m 28s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 8m 29s
system-test-fedora-rawhide RETRY_LIMIT in 54s
✔️ system-test-fedora-36 SUCCESS in 12m 10s
✔️ system-test-fedora-35 SUCCESS in 13m 37s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
The Fedora Rawhide repositories can be busted at times [1], and the
default behaviour of three attempts [2] doesn't seem to be enough to
tide over such situations.

Currently, one has to manually restart the tests by typing 'recheck'.
This is both inefficient because it requires manual intervention; and
wasteful because it doesn't just run the Fedora Rawhide job, but all the
other ones too.

[1] containers#1171
    containers#1200

[2] https://zuul-ci.org/docs/zuul/latest/config/job.html#attr-job.attempts
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
The Fedora Rawhide repositories can be busted at times [1], and the
default behaviour of three attempts [2] doesn't seem to be enough to
tide over such situations.

Currently, one has to manually restart the tests by typing 'recheck'.
This is both inefficient because it requires manual intervention; and
wasteful because it doesn't just run the Fedora Rawhide job, but all the
other ones too.

[1] containers#1171
    containers#1200

[2] https://zuul-ci.org/docs/zuul/latest/config/job.html#attr-job.attempts

containers#1201
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 14, 2022
Sometimes the RPM dependencies can't be installed because the DNF cache
refers to old packages that have been replaced by newer builds on the
RPM repositories.  This often happens on Fedora Rawhide because it sees
a lot more churn than stable Fedoras.

Currently, one has to keep restarting the tests manually by typing
'recheck' until the DNF caches eventually get updated.  This is both
very inefficient because it requires manual intervention; and wasteful
because it can take several attempts and it doesn't just run the failing
job, but all the other ones too.

[1] containers#1171
    containers#1200

[2] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-update_cache

containers#1201
debarshiray added a commit that referenced this pull request Dec 14, 2022
Sometimes the RPM dependencies can't be installed because the DNF cache
refers to old packages that have been replaced by newer builds on the
RPM repositories [1].  This often happens on Fedora Rawhide because it
sees a lot more churn than stable Fedoras.

Currently, one has to keep restarting the tests manually by typing
'recheck' until the DNF caches eventually get updated.  This is both
very inefficient because it requires manual intervention; and wasteful
because it can take several attempts and it doesn't just run the failing
Ansible job, but all the other ones too.

It will be good to force the DNF cache to be updated [2] when an Ansible
job is being attempted more than once [3].

[1] #1171
    #1200

[2] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-update_cache

[3] https://zuul-ci.org/docs/zuul/latest/job-content.html#var-zuul.attempts

#1201
Otherwise https://www.shellcheck.net/ would complain:
  Line 86:
  term_just_first_character="${TERM%$term_without_first_character}"
                                    ^-- SC2295 (info): Expansions inside
                                      ${..} need to be quoted
                                      separately, otherwise they match
                                      as patterns.

See: https://www.shellcheck.net/wiki/SC2295

CentOS Stream 9 has ShellCheck-0.8.0, while so far the 'unit tests' were
being run on Fedora 36, which only has ShellCheck-0.7.2.

This is a step towards testing on CentOS Stream 9.

containers#1200
Otherwise codespell would complain:
  :    {"/tmp", "/run/host/tmp", "rslave"},
  >    {"/var/lib/flatpak", "/run/host/var/lib/flatpak", "ro"},
  :    {"/var/lib/libvirt", "/run/host/var/lib/libvirt", ""},
./src/cmd/initContainer.go:61: ro ==> to, row, rob, rod, roe, rot

CentOS Stream 9 has codespell-2.2.1, while so far the 'unit tests' were
being run on Fedora 36, which only has codespell-2.1.0.

This is a step towards testing on CentOS Stream 9.

containers#1200
CentOS Stream 9 has codespell-2.2.1, while so far the 'unit tests' were
being run on Fedora 36, which only has codespell-2.1.0.

This is a step towards testing on CentOS Stream 9.

Fallout from ecd1ced

containers#1200
Otherwise codespell would complain:
  : @test "create: Try to create a container with invalid custom name...
  >   run $TOOLBOX -y create "ßpeci@l.Nam€"
  :
  ./test/system/101-create.bats:57: Nam ==> Name

CentOS Stream 9 has codespell-2.2.1, while so far the 'unit tests' were
being run on Fedora 36, which only has codespell-2.1.0.

This is a step towards testing on CentOS Stream 9.

containers#1200
Currently, the standard error and output streams of the child commands
invoked by 'meson test' are redirected to a separate log file.  When the
tests fail, it's difficult, or maybe even impossible, to access this
file from the Zuul CI, and all that can be seen is something like:
  1/7 shellcheck src/go-build-wrapper OK              0.04s
  2/7 shellcheck profile.d/toolbox.sh FAIL            0.06s   exit status 1
  >>> MALLOC_PERTURB_=241 /usr/bin/shellcheck
    --shell=sh
    /home/zuul-worker/src/github.com/containers/toolbox/builddir/../profile.d/toolbox.sh

  3/7 go fmt                          FAIL            0.05s   exit status 1
  >>> MALLOC_PERTURB_=209 /usr/bin/python3
    /home/zuul-worker/src/github.com/containers/toolbox/src/meson_go_fmt.py
    /home/zuul-worker/src/github.com/containers/toolbox/src

  4/7 codespell                       FAIL            0.31s   exit status 65
  >>> MALLOC_PERTURB_=180 /usr/bin/codespell
    --check-filenames
    --check-hidden
    --context 3
    --exclude-file /home/zuul-worker/src/github.com/containers/toolbox/.codespellexcludefile
    --skip /home/zuul-worker/src/github.com/containers/toolbox/builddir
    --skip /home/zuul-worker/src/github.com/containers/toolbox/.git
    --skip /home/zuul-worker/src/github.com/containers/toolbox/test/system/libs/bats-assert
    --skip /home/zuul-worker/src/github.com/containers/toolbox/test/system/libs/bats-support
    /home/zuul-worker/src/github.com/containers/toolbox

  5/7 shellcheck toolbox (deprecated) FAIL            1.09s   exit status 1
  >>> MALLOC_PERTURB_=233 /usr/bin/shellcheck
    /home/zuul-worker/src/github.com/containers/toolbox/builddir/../toolbox

  6/7 go test                         OK              1.89s
  7/7 go vet                          OK             17.60s

This doesn't have enough information to understand what caused the tests
to fail on non-interactive CI environments.

Not redirecting the standard error and output streams of the child
commands invoked by 'meson test' will readily reveal more details about
the test failures and remove the need to find the log file created by
Meson.

containers#1171
This will be used by the subsequent commit to have a separate set of
dependencies for CentOS Stream 9 builds.  eg., unlike Fedora, CentOS
Stream 9 doesn't have the ShellCheck, bats and fish RPMs.

containers#1171
The code behind -Dmigration_path_for_coreos_toolbox is meant for Red Hat
Enterprise Linux 8 and 9.  Hence, it makes sense to use CentOS Stream 9
to run the 'unit tests' on the corresponding code path.

Note that, just like Fedora, Podman prefers crun(1) as its OCI runtime
on CentOS Stream 9 [1,2].

[1] Podman commit 060775901de09b27
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/060775901de09b27

[2] Podman commit f327e88a08ca224b
    https://gitlab.com/redhat/centos-stream/rpms/podman/-/commit/f327e88a08ca224b

containers#1171
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 8m 29s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 8m 34s
✔️ system-test-fedora-rawhide SUCCESS in 25m 02s
✔️ system-test-fedora-36 SUCCESS in 12m 26s
✔️ system-test-fedora-35 SUCCESS in 13m 34s

@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 8m 33s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 55s
✔️ system-test-fedora-rawhide SUCCESS in 26m 43s
✔️ system-test-fedora-36 SUCCESS in 12m 21s
✔️ system-test-fedora-35 SUCCESS in 13m 46s

@debarshiray debarshiray merged commit 4cd1c79 into containers:main Dec 14, 2022
@debarshiray debarshiray deleted the wip/rishi/centos-9-tests branch December 14, 2022 23:12
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.

None yet

1 participant