refstack-client should help user to avoid test duplication

Bug #1498159 reported by Sergey Slipushenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
refstack
Invalid
Low
Unassigned

Bug Description

Now single test-result can be uploaded in RefStack API many times. refstack-client shouldn't allow that

Revision history for this message
David Liu (lzbj) wrote :

Hi Sergey,

Your bug description may need change to "Now single test-result can be uploaded in RefStack API many times. refstack-client should 'not' allow that", right?

Revision history for this message
Catherine Diep (cdiep) wrote :

Hi Sergey, How would refstack-client identify single test-result being uploaded multiple times? By design, refstack-client is stateless.

description: updated
Revision history for this message
Sergey Slipushenko (sslypushenko) wrote :

Hi, Catherine! Sure, refstack-client is stateless, for the time being.

IMO, simplest solution here is to generate test ID when client creates <test-result>.json, instead of generate test ID after uploading test result. For backward compatibility RefStack can generate test ID if it isn't present in uploading test result, otherwise test ID picks from uploaded data. In this way user will not be able to upload the same test result(including test ID) twice, because test ID should unique.

Revision history for this message
Catherine Diep (cdiep) wrote :

Hi Sergey, How about performing the checking at the server side.

 A set of test result is determined as duplicated if it has identical CPID, test duration and number of pass tests. I will add this topic to our weekly agenda so that we can continue our discussion there.

Changed in refstack:
status: New → Confirmed
importance: Undecided → Medium
David Liu (lzbj)
Changed in refstack:
assignee: nobody → David Liu (lzbj)
assignee: David Liu (lzbj) → nobody
assignee: nobody → David Liu (lzbj)
David Liu (lzbj)
Changed in refstack:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to refstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/284508

Revision history for this message
Andrey Pavlov (apavlov-e) wrote :

I think that current solution is not very good.
There is a rather high chance of recurrence.

subunit results have time of each test start.
refstack-client can pass these times to server with each test.
server can calculate hash of upload request and compare with hashes in DB.

Revision history for this message
Alexandre Levine (alexandrelevine) wrote :

I suggest to take creation time of the subunit results file and send it along with other info as a time of test. We need to know when the test run was made anyways.

Revision history for this message
David Liu (lzbj) wrote :

thanks for great proposals, we can further discuss it in our weekly meeting and decide the solution.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on refstack (master)

Change abandoned by David Liu (<email address hidden>) on branch: master
Review: https://review.openstack.org/284508
Reason: Abandon this patch, will try to submit another patch for better solution.

Revision history for this message
David Liu (lzbj) wrote :

I suggest we could compare the hashes of the test cases, if the CPID and test duration are identical, and test results hashes are also the same, they are duplicated.

Revision history for this message
Catherine Diep (cdiep) wrote :

David, Your suggestion on 2016-03-02 seems reasonable. I will add your suggestion into the action list below.

The RefStack team discussed this bug at the 2016-02-29 IRC meeting ( http://eavesdrop.openstack.org/meetings/refstack/2016/refstack.2016-02-29-19.00.txt ) . The actions to be taken are:

1) RefStack team looks into the possibility of implementing signing the results.
2) Request guidance from DefCore/Foundation on 1) test should be run from refstack-client. 2) out-bound connect from
    refstack-client server to RefStack server is required

Revision history for this message
David Liu (lzbj) wrote :

Thank you Catherine.

Revision history for this message
Catherine Diep (cdiep) wrote :

DefCore guidance as documented in https://etherpad.openstack.org/p/DefCoreSpring2016MidCycle is that " It is OK to have duplicate results (for now, until there is a good reason to stop them)."

Changed in refstack:
importance: Medium → Low
David Liu (lzbj)
Changed in refstack:
status: In Progress → New
assignee: David Liu (lzbj) → nobody
Catherine Diep (cdiep)
Changed in refstack:
status: New → Confirmed
Revision history for this message
Martin Kopec (mkopec) wrote :

This has been closed as Invalid (in the newer bug tracker):
https://storyboard.openstack.org/#!/story/1498159

Changed in refstack:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.