WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 201561
results.webkit.org: Configurations should be branch specific
https://bugs.webkit.org/show_bug.cgi?id=201561
Summary
results.webkit.org: Configurations should be branch specific
Jonathan Bedard
Reported
2019-09-06 14:31:49 PDT
The fact that configurations are global, rather than being applied per branch, has lead to a number of idiosyncrasies, most notably, the user being provided with more configurations to filter by than are actually available. To fix this, we need to bucket configurations by branch. Note that this will require a small database migration (only a handful of very small tables).
Attachments
Patch
(25.29 KB, patch)
2019-09-06 14:58 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(23.66 KB, patch)
2019-09-09 14:16 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(23.62 KB, patch)
2019-09-09 15:59 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(23.53 KB, patch)
2019-09-16 10:37 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jonathan Bedard
Comment 1
2019-09-06 14:58:54 PDT
Created
attachment 378240
[details]
Patch
Jonathan Bedard
Comment 2
2019-09-06 15:00:01 PDT
I'd like a sanity check on this before I push it to the dev instance, since even on the dev instance, it makes some database schema changes.
Jonathan Bedard
Comment 3
2019-09-09 14:16:45 PDT
Created
attachment 378409
[details]
Patch
Jonathan Bedard
Comment 4
2019-09-09 15:59:03 PDT
Created
attachment 378414
[details]
Patch
Jonathan Bedard
Comment 5
2019-09-12 08:39:23 PDT
I talked to Kocsen about this earlier in the week. We determined that using branch as a partitioning key made our life more difficult, so instead, I switched it to just a primary key. We still need to create new tables, but the code for extracting the configurations into the Redis cache is much smaller.
dewei_zhu
Comment 6
2019-09-16 09:18:33 PDT
Comment on
attachment 378414
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378414&action=review
> Tools/resultsdbpy/resultsdbpy/controller/upload_controller.py:170 > + branch=branch[0] if branch else None,
Is there some mechanism to ensure branch is aways a list of string rather than just a string?
> Tools/resultsdbpy/resultsdbpy/model/configuration_context.py:215 > + def search_for_recent_configuration(self, configuration=Configuration(), branch=None):
Just want to point out that the default argument `configuration` will only be initialized once at the function def time. All invocations to this function will ref to a single configuration object if default value is used.
> Tools/resultsdbpy/resultsdbpy/model/configuration_context_unittest.py:79 > + self.database.register_configuration(configuration, None, old)
Personally, I would prefer to use `timestamp=old` over passing a None argument.
> Tools/resultsdbpy/resultsdbpy/view/static/js/drawer.js:120 > +let configurationsDefinedCallbacks = [];
Where is this variable updated?
> Tools/resultsdbpy/resultsdbpy/view/static/js/drawer.js:134 > + configurations = []; > + json.forEach(pair => { > + const config = new Configuration(pair[0]); > + configurations.push(config); > + });
How about `configurations = json.map(pair => new Configuration(pair[0])`?
> Tools/resultsdbpy/resultsdbpy/view/static/js/drawer.js:135 > + configurationsDefinedCallbacks.forEach(callback => {callback();});
I think `configurationsDefinedCallbacks.forEach(callback => callback());` would work.
dewei_zhu
Comment 7
2019-09-16 09:18:50 PDT
r=me with comment.
Jonathan Bedard
Comment 8
2019-09-16 09:40:40 PDT
Comment on
attachment 378414
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378414&action=review
>> Tools/resultsdbpy/resultsdbpy/controller/upload_controller.py:170 >> + branch=branch[0] if branch else None, > > Is there some mechanism to ensure branch is aways a list of string rather than just a string?
Yes, @query_as_kwargs() turns the request's query into a kwarg dictionary, and always passes arguments as a list.
>> Tools/resultsdbpy/resultsdbpy/model/configuration_context.py:215 >> + def search_for_recent_configuration(self, configuration=Configuration(), branch=None): > > Just want to point out that the default argument `configuration` will only be initialized once at the function def time. All invocations to this function will ref to a single configuration object if default value is used.
That's totally fine, we convert the configuration to a string in self.redis.scan_iter(...) and don't make any edits to it. Sometimes I wish Python had a 'const' keyword....
>> Tools/resultsdbpy/resultsdbpy/view/static/js/drawer.js:120 >> +let configurationsDefinedCallbacks = []; > > Where is this variable updated?
It's updated in ConfigurationSelectors(...), it was originally a local variable within that function, we're just making it local to the whole file.
Jonathan Bedard
Comment 9
2019-09-16 10:37:35 PDT
Created
attachment 378871
[details]
Patch
WebKit Commit Bot
Comment 10
2019-09-16 15:40:56 PDT
Comment on
attachment 378871
[details]
Patch Clearing flags on attachment: 378871 Committed
r249924
: <
https://trac.webkit.org/changeset/249924
>
WebKit Commit Bot
Comment 11
2019-09-16 15:40:57 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2019-09-16 15:41:31 PDT
<
rdar://problem/55417843
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug