RESOLVED FIXED 190863
Customizable test group form should not reset manually edited commit value sometimes.
https://bugs.webkit.org/show_bug.cgi?id=190863
Summary Customizable test group form should not reset manually edited commit value so...
dewei_zhu
Reported 2018-10-23 22:32:15 PDT
Customizable test group form should not reset manually edited commit value sometimes.
Attachments
Patch (11.18 KB, patch)
2018-10-23 22:56 PDT, dewei_zhu
no flags
Patch (11.56 KB, patch)
2018-11-06 17:37 PST, dewei_zhu
rniwa: review+
dewei_zhu
Comment 1 2018-10-23 22:56:42 PDT
dewei_zhu
Comment 2 2018-10-23 22:57:37 PDT
dewei_zhu
Comment 3 2018-10-23 23:03:37 PDT
Comment on attachment 353022 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353022&action=review > Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:255 > + if (ownerRepository) The correct logic should be avoid updating commit for repositories with owner. > Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:270 > + const originalCommit = originalCommitSetMap[labelToChoose].commitForRepository(repository) || commit; If this repository exists in originalCommitSetMap, we the radio button should set the value from original commit.
Ryosuke Niwa
Comment 4 2018-11-05 19:58:18 PST
Comment on attachment 353022 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353022&action=review > Websites/perf.webkit.org/ChangeLog:7 > + After changing the radio button and manually editing the commit value, commit value should not be reset > + while changing the name of the test group. Why don't we add a test for this? And let's split this patch into two since these two changes are pretty complex. > Websites/perf.webkit.org/ChangeLog:10 > + Reviewed by NOBODY (OOPS!). This line should appear before the long description bug after the bug link. > Websites/perf.webkit.org/ChangeLog:22 > + (CustomizableTestGroupForm.prototype._constructRevisionRadioButtons): Let's add a comment saying that this code change is the one which fixes the toggling A/B would not update the commit set. > Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:20 > + this._originalCommitSetMap = map; How about uncustomizedCommitSetMap to match the terminology? > Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:258 > + commitSetMap.get(columnLabel).updateRevisionForOwnerRepository(repository, revisionEditor.value).catch( > () => revisionEditor.value = ''); This needs to be updated to revert to the old value. We should probably warn the user that the specified revision doesn't exist with a nice error message.
dewei_zhu
Comment 5 2018-11-06 17:37:45 PST
Ryosuke Niwa
Comment 6 2018-11-06 18:04:01 PST
Comment on attachment 354038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354038&action=review > Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js:78 > + let revisionEditors = customizableTestGroupForm.content('custom-table').querySelectorAll('input:not([type="radio"])'); > + expect(revisionEditors.length).to.be(2); > + let revisionEditor = revisionEditors[0]; Use const? > Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:259 > + alert(`Commit "${revisionEditor.value}" from "${repository.name()}" does not exits.`); I think a better error message would be `"${revisionEditor.value}" doesn't exist in "${repository.name()}"`. Saying that it's a commit is both redundant for regular repositories and erroneous for OS versions.
dewei_zhu
Comment 7 2018-11-06 18:23:48 PST
Comment on attachment 354038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354038&action=review >> Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js:78 >> + let revisionEditor = revisionEditors[0]; > > Use const? We need to querySelect another revision editor after form gets re-rendered. Line 89 re-assigned it. >> Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js:259 >> + alert(`Commit "${revisionEditor.value}" from "${repository.name()}" does not exits.`); > > I think a better error message would be `"${revisionEditor.value}" doesn't exist in "${repository.name()}"`. > Saying that it's a commit is both redundant for regular repositories and erroneous for OS versions. Sure.
dewei_zhu
Comment 8 2018-11-06 21:58:48 PST
Landed in r237915.
dewei_zhu
Comment 9 2018-11-06 22:34:04 PST
Note You need to log in before you can comment on or make changes to this bug.