Closed Bug 1254673 Opened 8 years ago Closed 8 years ago

return created resultset information when new resultsets are submitted via API

Categories

(Tree Management :: Treeherder: API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: camd, Assigned: camd)

References

Details

Attachments

(1 file)

When resultsets are submitted via the API, we should return the generated revision_hash that was stored and perhaps a few other fields, like resultset id.
These values should be returned whether the resultset already existed, or was newly created as a result of the submission.

Currently, Task Cluster will use an algorithm that exactly matches our own algorithm for generating the revision_hash.  This means that algorithm can never change, or we will stop matching.

We want to change the revision_hash value stored to just be the top revision.  But we can't if Task Cluster relies on it matching their algorithm.

With this change, regardless of what revision_hash they submit, we will return what we actually stored.  Then they can use that value to go forward with the tasks (jobs) they schedule and things will match up.
Assignee: nobody → cdawson
Blocks: 1254679
Comment on attachment 8728180 [details] [review]
[treeherder] mozilla:resultset-post-response-data > mozilla:master

Hey Ed: you already reviewed the commit removing the task cluster pulse stuff.  The rest of this PR contains a change so that Task Cluster can submit resultsets to us with one revision_hash, but then it returns the values we ACTUALLY used.  In this case, it'll be exactly what they submitted.  But with the next PR it will change to the top revision.

After I make this change, then garndt can modify TC to use the values, and then when my NEXT PR comes in, they'll start doing the right thing and giving our new revision_hash to the tasks (jobs) they create.  This, in turn, means they'll be submitting the right data to us so we can FINALLY be rid of revision_hashes..  

Whew!  If this sounds convoluted, I'd be happy to chat about it and explain further.  :)  Thanks for all your patience and awesome reviews.  :)
Attachment #8728180 - Flags: review?(emorley)
Comment on attachment 8728180 [details] [review]
[treeherder] mozilla:resultset-post-response-data > mozilla:master

Ah good spot! :-)
Attachment #8728180 - Flags: review?(emorley) → review+
Commits pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/26b156af5ac9fc6a50ee9341cec478799d9b8910
Bug 1254673 - Stop posting new resultset info to pulse

https://github.com/mozilla/treeherder/commit/5d3399e9accbec759ab370e9b46627e9f4834c37
Bug 1254673 - return resultset info when on API submission

This returns some basic info about the resultsets that were submitted via a POST to the API.
This is needed for Task Cluster as we transition away from ``revision_hash`` so that they
take it from us, instead of using what they submit.  This way, we can return them the
``revision_hash`` that we WANT to be moving to (PR 1322).  They also need this so they can
then send that new ``revision_hash`` to the tasks (jobs) that belong to it.
An example of the result of posting a new resultset (or even if it already exists) will be: 
{u'message': u'well-formed JSON stored', 
 u'resultsets': [
    {
        u'revision_hash': u'45f8637cb9f78f19cb8463ff174e81756805d8cf', 
        u'long_revision': u'cdfe03e77e66', 
        u'push_timestamp': 1384353511, 
        u'id': 20
    }
 ]
}
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: