T195 - Depcheck reports results per update
ClosedPublic

Authored by jskladan on Jun 5 2014, 1:53 PM.

Diff Detail

Repository
rDEPCK task-depcheck
Lint
Lint Skipped
Unit
Unit Tests Skipped
jskladan retitled this revision from to T195 - Depcheck reports results per update.Jun 5 2014, 1:53 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: tflink, kparal.
jskladan added subscribers: jdulaney, pschindl, mkrizek.
jskladan added inline comments.Jun 5 2014, 2:01 PM
depcheck/depcheck.py
45

According to my information, all RPMs in Fedora should be in the <NVRA>.rpm format, so this is fine for us. Should we ever want to run depcheck for systems with other standards, this would have to be changed. But it is no issue so far, IMHO.

150

This here is "just for safety" I do not suppose that there should even be a situation which leads to depcheck having two results for the same rpm file, but in case it happens, I think it's best to let us known.

Is there a situation that would yield depcheck running for (let's say) two "same" NVRs just with different Arch, when (on top of that) one of them could fail, and the other pass?

160

I am not sure why there is the json option, as we IMHO do not need it. Could you elaborate, @jdulaney?

162

Does the comment & code make sense? I tried my best to describe it, but I'm not sure that it is necessarily clear.
Thougts?

jskladan updated this revision to Diff 366.Jun 6 2014, 10:33 AM
  • Moar tests
  • Moar Comments

The code passes both unittests and functional tests, but I have not tried it in any other way.

@tflink could you try and run it via Taskotron?

jskladan updated this revision to Diff 377.Jun 10 2014, 10:59 AM
  • Changed as per @tflink's requests
jskladan updated this revision to Diff 378.Jun 10 2014, 11:01 AM
  • Minor fix
jskladan updated this revision to Diff 380.Jun 10 2014, 11:05 AM
  • fixed conf file

The code is now changed according to @tflink's request - squashing results from builds to updates is moved to another file, per-build results are returned in json, and per-uptade results in TAP. Per-build or per-update can be configured and handled via console parameter.

I also made some code refactoring. Please comment :)

The code is not tested outside of the unit/funcional-tests.

tflink requested changes to this revision.Jun 10 2014, 1:44 PM

Overall, looks pretty good to me - just a couple minor change requests. We'll have to test with actual runs once the other bits of depcheck are sorted out but I'm hoping that'll be relatively minor.

depcheck/__init__.py
88

Shouldn't this be for filename in rpms:?

run_depcheck.py
43

I'd prefer to see the args explicitly listed instead of just passing them through, especially since depcheck.run() wants a list for the rpms arg. I can't think of a situation where we wouldn't be passing a single directory in and would rather not require the extra list in the yaml file

This revision now requires changes to proceed.Jun 10 2014, 1:44 PM

Great catches, thanks! New patch will land shortly.

kparal added inline comments.Jun 10 2014, 2:43 PM
depcheck.yml
19–21 ↗(On Diff #380)

How can this work? We changed the variable format to ${foo} a long time ago.

jskladan added inline comments.Jun 10 2014, 2:47 PM
depcheck.yml
19–21 ↗(On Diff #380)

It does not ;) (not tested apart of unittests). There is more work needed in order for depocheck to be able to be run through runtask.py
But still, thx for the catch!

jskladan updated this revision to Diff 383.Jun 10 2014, 2:47 PM
  • tflink's catches
jskladan closed this revision.Jun 11 2014, 12:14 PM
jskladan updated this revision to Diff 391.

Closed by commit rDEPCK43921c10b920 (authored by @jskladan).