task-rpmdeplint
ClosedPublic

Authored by mkrizek on Sep 21 2016, 12:28 PM.

Details

Summary

This runs rpmdeplint check-sat and should replace the current depcheck task. It would be good to have someone who understands depcheck to look at it. :)

I am not saying that the current state is production ready but should be good enough to have it running on dev to see how it compares to depcheck.

One potential blocker for running it in prod though is that the rpmdeplint package is not in Fedora. The package is available in copr, so we can add that repo to minion repos in libtaskotron for the time being.

Code for scenarios, squashing results and unittests is reused from the original depcheck.

Test Plan

Info on how to set up dev env, run the task via libtaskotron and how to run functional tests is in README. It passes the original depcheck scenarios.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
mkrizek retitled this revision from to task-rpmdeplint.Sep 21 2016, 12:28 PM
mkrizek updated this object.
mkrizek edited the test plan for this revision. (Show Details)
mkrizek added reviewers: tflink, jskladan, kparal.
mkrizek updated this object.
mkrizek updated this revision to Diff 2577.Sep 21 2016, 1:15 PM

I didn't realise that Fedora QA were already working on rpmdeplint integration into taskotron, this is great to see! :-)

I am definitely planning to post a Fedora package review for rpmdeplint eventually, so that you don't need to keep using my random COPR repo. We were just waiting for rpmdeplint 1.0 to stabilise a bit first.

In the meantime we have also released 1.1 which added a bunch more checks, which you would probably be interested in adding here too? But just check-sat on its own is a good starting point.

Is there anything we can do on the rpmdeplint side to make it easier to use, like better Python APIs? Suggestions are totally welcome.

FYI I have filed a package review for rpmdeplint: https://bugzilla.redhat.com/show_bug.cgi?id=1385441

Hi! Just wanted to check in and ask if you need a helping hand or have any questions with this item. The filed package review is finished and rpmdeplint is now available as a Fedora package as well.
Cheers!

jskladan accepted this revision.Dec 12 2016, 5:50 AM

Looks good apart of the nitpicks. But it is depcheck, so who am I to understand what's going on :D

tests/functest_scenarios.py
25

I'd rather see for root, dirs, files in dircontents instead.

28–29

Why are the known_broken tests skipped? It's been a long time, and I don't really remember what those meant, but looking at the scenarios, these seem to be usefull...

This revision is now accepted and ready to land.Dec 12 2016, 5:50 AM
kparal accepted this revision.Jan 12 2017, 3:04 PM

This looks awesome (except for the undocumented API, sigh). It almost renewed my willingness to work on "depcheck" (since all the heavy lifting will be done by rpmdeplint) :-) I'd like to have it deployed on dev asap, probably as dist.rpmdeplint, in parallel to the existing depcheck, so that we can compare the results.

.arcconfig
3

Needs to change now, obviously :-)

README.rst
4

Not needed anymore.

5

python2-rpmdeplint

runtask.yml
8

This needs to be (probably changed to) python2-rpmdeplint.

tests/functest_scenarios.py
28–29

The directory is basically a wishlist "we'd like to cover these cases but don't at the moment". So those scenarios were never run, if you wonder about that. However, by looking at rpmdeplint documentation, it seems it should be able to detect those cases (if we use check-repoclosure command). So hopefully we can enable these in the future.

34

Please change this to

return sorted(yamlfiles, key=lambda yamlfile: yamlfile[1])

That will make the test suite run in a deterministic order. Thanks.

tests/scenarios/scenarios/fail/01_version.yaml
6–16

I found out this is actually slightly incorrect, it should be:

current_repo:
  -
    envra: foo-0.1-1.fc19.noarch
  -
    envra: bar-0.1-1.fc19.noarch
    requires: foo == 0.1-1.fc19

update_repo:
  -
    envra: bar-0.2-1.fc19.noarch
    requires: foo == 0.2-1.fc19