rhinstaller / initial-setup

The Initial Setup utility takes care of post-installation configuration of an installed system.
GNU General Public License v2.0
27 stars 33 forks source link

Add Packit support with smoke test #112

Closed jkonecny12 closed 3 years ago

jkonecny12 commented 3 years ago

This will just make a simple smoke test for initial-setup with implementation for local execution. Latest Anaconda will always be installed before because initial-setup heavily depends on Anaconda.

It should be pretty easy to add pylint when the code is ready.

IDEA It could be interesting to avoid using mock and use packit copr-build instead. However, I will take longer (because of COPR queue) and also it does not work for me for some reason. I'll try to investigate why.

poncovka commented 3 years ago

It should be pretty easy to add pylint when the code is ready.

Please, open a separate pull request for pylint once this one is merged. Otherwise, the code will never be ready.

jkonecny12 commented 3 years ago

/packit build

pep8speaks commented 3 years ago

Hello @jkonecny12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2020-12-10 10:01:50 UTC
jkonecny12 commented 3 years ago

UPDATED:

jkonecny12 commented 3 years ago

@M4rtinK a few questions on you.

  • Could you please test if this correctly works? My testing went fine but still.

So I've applied the PR locally & tried running make test but I'm hitting some issues:

error: can't copy 'ChangeLog': doesn't exist or not a regular file
make: *** [Makefile:46: install] Error 1

RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.pCMzyt (%install)
    bad date in %changelog: Čt pro 03 2020 Martin Kolman <mkolman@redhat.com> - 0.3.84.1-1.20201203044730864579.master.test_packit_test_pr.7.g43b301b
    Bad exit status from /var/tmp/rpm-tmp.pCMzyt (%install)
  • Do you want to keep Makefile local command? I think it's not really useful anymore but I want your acknowledge first.

I think it would be good to keep it for now - IIRC I have used it in the past from time to time for various adhoc scratch builds.

  • Also the local test run is not really nice but it works correctly and it's fortunately not that long to run but it would be nice to have also not TMT solution for the quick tests run.
  • Don't you want to move initial-setup to stable phase? There is really no reason to keep this alpha stage.

You mean the PyPI stage metadata ? Sure, most likely it was just set to that value long ago when the metadata was first created and never changed.

jkonecny12 commented 3 years ago

Hello @thrix, I wonder, is the above test failure on rawhide because of bug in Cruncher or is the problem on my side? I'm able to run the test correctly locally.

Error message:

 No tests were defined in FMF metadata. 

However, in the log output:

[15:37:12] [+] [cruncher] Discovered testsets:
[ "/plans/smoke"]
[15:37:12] [+] [cruncher] [/plans/smoke] Summary 'Basic smoke test'
[15:37:12] [+] [cruncher] [/plans/smoke] Testset working directory '/opt/cruncher/artifacts/32debe17-d0b4-43fa-9ec8-4308311f7c96/plans-smoke'
[15:37:12] [+] [cruncher] [/plans/smoke] [discover] Discovered tests:
[ "/tests/smoke"]
jkonecny12 commented 3 years ago

UPDATED:

packit-as-a-service[bot] commented 3 years ago

Congratulations! One of the builds has completed. :champagne:

You can install the built RPMs by following these steps:

Please note that the RPMs should be used only in a testing environment.

jkonecny12 commented 3 years ago

UPDATED:

thrix commented 3 years ago

Hello @thrix, I wonder, is the above test failure on rawhide because of bug in Cruncher or is the problem on my side? I'm able to run the test correctly locally.

Error message:

 No tests were defined in FMF metadata. 

However, in the log output:

[15:37:12] [+] [cruncher] Discovered testsets:
[ "/plans/smoke"]
[15:37:12] [+] [cruncher] [/plans/smoke] Summary 'Basic smoke test'
[15:37:12] [+] [cruncher] [/plans/smoke] Testset working directory '/opt/cruncher/artifacts/32debe17-d0b4-43fa-9ec8-4308311f7c96/plans-smoke'
[15:37:12] [+] [cruncher] [/plans/smoke] [discover] Discovered tests:
[ "/tests/smoke"]

it is in cruncher, it will get resolved once we migrate to the new backend finally

jkonecny12 commented 3 years ago

UDPATED:

jkonecny12 commented 3 years ago

UPDATED:

jkonecny12 commented 3 years ago

UPDATED:

martinpitt commented 3 years ago

Thanks!