add SKIPPED outcome
AbandonedPublic

Authored by kparal on Mon, Jul 10, 6:09 AM.

Details

Reviewers
jskladan
dcallagh
Summary

RPMDiff is a comparison tool which can analyse differences between two packages to find problems. We are currently importing the results from RPMDiff comparison into ResultsDB. However in some cases, the RPMDiff tests have to be skipped because there is no baseline package to compare against. In that case, our tools consuming the results need to be able to distinguish between two possibilities: the result is missing because it hasn't finished running yet, or the result will *never* appear because the tool has decided it cannot run the test. Thus SKIPPED.

Test Plan
  1. create an empty Postgres database
  2. initialise it with init_db using current develop branch (Alembic revision 4dbe714897fe)
  3. run upgrade_db with this patch, use \dT+ resultoutcome to verify enum type now permits SKIPPED
  4. insert a result with the new SKIPPED outcome
  5. run alembic downgrade 4dbe714897fe, use \dT+ resultoutcome to verify SKIPPED is no longer a value in the enum, also verify that the result in step 4 is mapped to INFO outcome

Diff Detail

Repository
rRSDB resultsdb
Lint
Lint Skipped
Unit
Unit Tests Skipped
dcallagh created this revision.Mon, Jul 10, 6:09 AM
kparal added a subscriber: kparal.Mon, Jul 10, 11:47 AM

Out of curiosity, why not use PASSED for them? I'm not saying SKIPPED is a bad idea (I encountered this myself lately and would use it if it was present), but in my case the two outcomes had the same meaning in the end (in terms of gating, both skipped and passed means thumbs up). What is your scenario where you need to distinguish the two?

Also, any reason for skipping the test suite and lint when creating this diff? I don't see any unit test failures, but some lint warnings are present.

Ohh no, skipping the test suite/linter was accidental... due to me not understand Phabricator UI I guess. :-) I didn't see any button to skip them or run them so not sure what I did wrong.

PASSED would work I guess. The distinction is really just for the humans who might be auditing the results. It would be surprising if the tooling claims that the RPMDiff comparison passed, but when you click through to look at it you see it actually didn't test anything at all.

Ohh no, skipping the test suite/linter was accidental... due to me not understand Phabricator UI I guess. :-) I didn't see any button to skip them or run them so not sure what I did wrong.

If you used arc diff develop when creating this diff, it should be run automatically. If you created this diff manually through the web ui, it's not run. Either way, never mind, just a mental note to check this before committing.

PASSED would work I guess. The distinction is really just for the humans who might be auditing the results. It would be surprising if the tooling claims that the RPMDiff comparison passed, but when you click through to look at it you see it actually didn't test anything at all.

I see. I'll let @jskladan decide here. I don't object to adding SKIPPED outcome. I believe more people will be asking for it in the future as well.

Ah sorry, I was too lazy to set up the arc diff stuff so I just pasted the diff in by hand. I guess that is why.

I can try and run the linting steps by hand and fix up whatever the issue is...

jskladan added a comment.EditedTue, Jul 11, 11:26 AM

@dcallagh Well, I'm not fundamentally absolutely against it, but I'd be happier with you using INFO (which is already present) with "test was skipped" in note - especially if you say that it's supposed to be a pass anyway.
The intended semantics of the result values is
PASSED - everything ok, no questions asked
INFO - the same as PASSED for automation purposes, but a yellow flag for human consumers
NEEDS_INSPECTION - treated as FAILED in automation, red flag for human consumers
FAILED - something really went sideways

As described in the docs.
Given the intent, I believe this is the right, and elegant solution.

The result values are also semantically ordered. Meaning that when you aggregate results, the "worse" value overrides the "better" value (aka if there are PASSED, INFO and FAILED results, the aggregate would be FAILED). Where do you think SKIPPED goes in this use case?

Once again - I could be persuaded to include SKIPPED but from my PoW it is somewhere between redundant and pointless.

INFO with a note makes sense to me -- assuming that we actually display that note to humans when we are presenting the results to them.

For example in Bodhi right now I think the note does *not* appear anywhere... so that might be something we should add?

kparal added a comment.EditedWed, Jul 12, 10:43 AM

For example in Bodhi right now I think the note does *not* appear anywhere... so that might be something we should add?

Sure it does. Look at e.g. https://bodhi.fedoraproject.org/updates/FEDORA-2017-364f4be949 .

dist.rpmgrill.build-log   418 issues found	
dist.rpmgrill.man-pages  20 issues found

Those are notes already being used for rpmgrill.

Please note that note is considered to be a mainly free-form text useful for human consumption. If you want to process this automatically, it might be much better if you add e.g. skipped=true extra arg to the result and then the tool can have a look whether such extra arg exists (if needed). Or you can combine both together, of course.

I'd personally keep the main outcome as PASSED, add just add the "skipped" note, because INFO is supposed to draw more attention (next version of Bodhi will display those as blue 'i' symbols), and that's something you probably don't want to do for skipped tests (boring!). But that's just my idea how things can be done.

kparal added a comment.Wed, Aug 2, 2:09 PM

@dcallagh , do you still need SKIPPED outcome or is the proposed solution good enough for you?

The reasons against SKIPPED make sense to me. I haven't heard any feedback (either negative or positive) from the other teams who are producing the results which will be skipped. So let's just assume that they are fine with it too. We can drop this.

I can't figure out which button to press to reject a change in Phab so I'll let you do that. :-)

kparal commandeered this revision.Thu, Aug 3, 7:31 AM
kparal added a reviewer: dcallagh.

There should be "abandon revision" action in the Action drop down menu. I'll do it.

kparal abandoned this revision.Thu, Aug 3, 7:31 AM