uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
411 stars 171 forks source link

Create function to slow down some scenarios #8962

Open maximenoel8 opened 1 week ago

maximenoel8 commented 1 week ago

What does this PR change?

For the feature : Cobbler and distribution autoinstallation, the cleanup is too fast and create errors in the logs like : Exception value: [Errno 2] No such file or directory: '/srv/tftpboot/images/isedistro_ui:1:SUSETest/vmlinuz' I can have sometime more than one file missing but almost always at least one file missing. When doing it manually or running it scenario by scenario, I'm not able to reproduce this bug. I also splinted this scenario in sub scenarios to isolate the issue ( scenario with only testdistro, only API call, only sledistro test), and when run in isolation, I don't have this error. Also this error happens only in NUE setup and not PRV setup. The cleaning takes less then 8 seconds and seems to create a confusion during the cleanup. The file missing is not always the same and not always for the same distro deletion. When I create the distro, I can correctly see the file that will be missing during the cleanup. I also checked that we were trying to delete the file only once during the test. I tried to use wait without success.

In this PR, I create a new tag to slow down feature or scenario and use this tag during the delete scenarios and also before the first delete scenario.

GUI diff

No difference.

Documentation

Test coverage

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/24572

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

Before you merge

Check How to branch and merge properly!

github-actions[bot] commented 1 week ago

:wave: Hello! Thanks for contributing to our project. Acceptance tests will take some time (aprox. 1h), please be patient :coffee: You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/8962/checks Once tests finish, if they fail, you can check :eyes: the cucumber report. See the link at the output of the action. You can also check the artifacts section, which contains the logs at https://github.com/uyuni-project/uyuni/pull/8962/checks.

If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code.

Reference tests:

KNOWN ISSUES

Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience.

For more tips on troubleshooting, see the troubleshooting guide.

Happy hacking! :warning: You should not merge if acceptance tests fail to pass. :warning: