uyuni-project / uyuni

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

Use server API to create cobbler profile and distribution #8964

Open maximenoel8 opened 6 days ago

maximenoel8 commented 6 days ago

What does this PR change?

Use server api instead of cobbler API to create autoinstallation profile and distribution. Use the server API to clean distribution and profile.

I added two sleep steps during the cleanup. Adding a short sleep before cleaning the distributions avoid some delete duplication errors. It gives time for cobbler to finish the actions. Adding a short sleep before checking the log give the time to have the last log ( Errors were missed before, the log check was done before all the logs were written )

GUI diff

No difference.

Documentation

Test coverage

Links

https://github.com/SUSE/spacewalk/issues/24414 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 6 days 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/8964/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/8964/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:

maximenoel8 commented 6 days ago

Yes exact. I will remove them.

maximenoel8 commented 5 days ago

When trying to remove the cobbler api, I found out the api was also call for

Feature: Cobbler buildiso
  Builds several ISOs with Cobbler and checks the configuration files and ISOs afterwards.

In this feature we create distributions and profiles using directly the cobbler api. Do we need to also use kickstart api for this scenario ?

If yes, I don't really know how to change this step : When I create system "testsystem" for profile "orchid" $cobbler_test.system_create(system, profile)

maximenoel8 commented 4 days ago

Because we need to use cobbler api for the feature : Feature: Cobbler buildiso. I can't remove the cobbler api steps.