Bug 224435

Summary: [results.webkit.org] Document ref API argument
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=224289
https://bugs.webkit.org/show_bug.cgi?id=224434
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Aakash Jain 2021-04-12 08:35:09 PDT
results.webkit.org API should allow commit-identifier as a parameter. For e.g.: https://results.webkit.org/api/results/api-tests/TestWebKitAPI.IndexedDB.DatabaseProcessKill?platform=ios&style=release&identifier=﷒0﷓ should be a valid api. Currently it says: "'identifier' not supported in queries by this endpoint".

This would help in EWS querying for results for specific commit identifier on specific configuration.
Comment 1 Jonathan Bedard 2021-04-12 08:52:09 PDT
It already accepts commit identifier under the "ref" parameter. Documentation doesn't yet reflect this, though, so that needs to be updated.

https://results.webkit.org/api/commits?ref=﷒0﷓ for an example of this.
Comment 2 Radar WebKit Bug Importer 2021-04-13 10:47:50 PDT
<rdar://problem/76599481>
Comment 3 Jonathan Bedard 2021-04-13 10:53:15 PDT
Created attachment 425884 [details]
Patch
Comment 4 Aakash Jain 2021-04-13 11:04:14 PDT
Comment on attachment 425884 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425884&action=review

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:2
> + Copyright (C) 2019-2020 Apple Inc. All rights reserved.

Nit: 2021

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:542
> +            `Although ${localLink(['Query Parameters', 'UUID'], 'UUIDs')} are the primary mechanism by which commits are identified in the results database, many APIs allow callers to specify a more generic commit ref instead. A commit ref is a string representation of a commit that will be converted to, this ref will be different depending on the underlying repository, but should be the revision, identifier or commit hash. Some examples of commit refs follow`,

This line isn't clear: "A commit ref is a string representation of a commit that will be converted to," also the command should be changed to a full stop here.

Nit: "commit refs follow" -> "commit refs are:"

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:545
> +            codeBlock('ref=236452@main&repository=webkit'),

should have another line for just identifier "codeBlock('ref=236452@main')". otherwise it might seem that identifier is a special case which needs a repository. Also, is this documentation for results.webkit.org or a generic results database service?

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:546
> +            `For both revision and identifier representations, it may be necessary to specify a repository if your instance has multiple repositories, because an identifier or revision may exist in both repositories. Much like ${localLink(['Query Parameters', 'UUID'], 'UUIDs')}, commit references can be prefixed by 'before_' and 'after_' to provide a range:`,

Would be good to specify explicitly if results.webkit.org has single or multiple repository.

'commit references' => 'commit ref' (let's not introduce too many new terms).
Comment 5 Aakash Jain 2021-04-13 11:05:00 PDT
Comment on attachment 425884 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425884&action=review

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:89
> +                ['Branch', 'Limit', 'Repository', 'Ref', 'UUID'],

Should it be 'Ref' or 'ref'?
Comment 6 Jonathan Bedard 2021-04-13 13:26:17 PDT
(In reply to Aakash Jain from comment #4)
> Comment on attachment 425884 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=425884&action=review
> 
> > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:2
> > + Copyright (C) 2019-2020 Apple Inc. All rights reserved.
> 
> Nit: 2021
> 
> > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:542
> > +            `Although ${localLink(['Query Parameters', 'UUID'], 'UUIDs')} are the primary mechanism by which commits are identified in the results database, many APIs allow callers to specify a more generic commit ref instead. A commit ref is a string representation of a commit that will be converted to, this ref will be different depending on the underlying repository, but should be the revision, identifier or commit hash. Some examples of commit refs follow`,
> 
> This line isn't clear: "A commit ref is a string representation of a commit
> that will be converted to," also the command should be changed to a full
> stop here.
> 
> Nit: "commit refs follow" -> "commit refs are:"
> 
> > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:545
> > +            codeBlock('ref=236452@main&repository=webkit'),
> 
> should have another line for just identifier "codeBlock('ref=236452@main')".
> otherwise it might seem that identifier is a special case which needs a
> repository. Also, is this documentation for results.webkit.org or a generic
> results database service?

Generic results database service.

> 
> > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:546
> > +            `For both revision and identifier representations, it may be necessary to specify a repository if your instance has multiple repositories, because an identifier or revision may exist in both repositories. Much like ${localLink(['Query Parameters', 'UUID'], 'UUIDs')}, commit references can be prefixed by 'before_' and 'after_' to provide a range:`,
> 
> Would be good to specify explicitly if results.webkit.org has single or
> multiple repository.
> 
> 'commit references' => 'commit ref' (let's not introduce too many new terms).
Comment 7 Jonathan Bedard 2021-04-13 13:28:28 PDT
Created attachment 425907 [details]
Patch
Comment 8 Aakash Jain 2021-04-13 16:33:13 PDT
Comment on attachment 425907 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425907&action=review

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:542
> +            `Although ${localLink(['Query Parameters', 'UUID'], 'UUIDs')} are the primary mechanism by which commits are identified in the results database, many APIs allow callers to specify a more generic commit ref instead. A commit ref is a string representation of a commit that will be converted to a ${localLink(['Query Parameters', 'UUID'], 'UUID')}. This ref will be different depending on the underlying repository, but should be a commit revision, identifier or hash. Some examples of commit refs in queires are:`,

Typo: queires

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:546
> +            `For both revision and identifier representations, it may be necessary to specify a repository if your instance has multiple repositories, because an identifier or revision may exist in both repositories.`,

"if your instance " => "if the results database instance"
Comment 9 Jonathan Bedard 2021-04-14 10:33:36 PDT
Created attachment 426003 [details]
Patch
Comment 10 EWS 2021-04-14 11:25:14 PDT
Committed r275953 (236513@main): <https://commits.webkit.org/236513@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426003 [details].