Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (198502 => 198503)
--- trunk/Websites/perf.webkit.org/ChangeLog 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2016-03-21 22:27:34 UTC (rev 198503)
@@ -1,5 +1,25 @@
2016-03-21 Ryosuke Niwa <[email protected]>
+ Analysis task page is broken after r198479
+ https://bugs.webkit.org/show_bug.cgi?id=155735
+
+ Rubber-stamped by Chris Dumez.
+
+ * public/api/measurement-set.php:
+ (AnalysisResultsFetcher::fetch_commits): We need to emit the commit ID as done for regular data.
+ * public/include/build-requests-fetcher.php:
+ (BuildRequestsFetcher::fetch_roots_for_set_if_needed): Ditto. Don't use a fake ID after r198479.
+ * public/v3/models/commit-log.js:
+ (CommitLog): Assert that all commit log IDs are integers to catch regressions like this in future.
+ * public/v3/models/root-set.js:
+ (RootSet): Don't resolve Repository here as doing so would modify the shared "root" entry in the JSON
+ we fetched, and subsequent construction of RootSet would fail since this line would blow up trying to
+ find the repository with "[object]" as the ID.
+ * public/v3/models/test-group.js:
+ (TestGroup._createModelsFromFetchedTestGroups): Resolve Repository here.
+
+2016-03-21 Ryosuke Niwa <[email protected]>
+
v3 UI sometimes don't update the list of revisions on the commit log viewer
https://bugs.webkit.org/show_bug.cgi?id=155729
Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (198502 => 198503)
--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php 2016-03-21 22:27:34 UTC (rev 198503)
@@ -252,14 +252,14 @@
function fetch_commits()
{
- $query = $this->db->query('SELECT commit_build, commit_repository, commit_revision, commit_time
+ $query = $this->db->query('SELECT commit_id, commit_build, commit_repository, commit_revision, commit_time
FROM commits, build_commits, build_requests, analysis_test_groups
WHERE commit_id = build_commit AND commit_build = request_build
AND request_group = testgroup_id AND testgroup_task = $1', array($this->task_id));
while ($row = $this->db->fetch_next_row($query)) {
$commit_time = Database::to_js_time($row['commit_time']);
array_push(array_ensure_item_has_array($this->build_to_commits, $row['commit_build']),
- array($row['commit_repository'], $row['commit_revision'], $commit_time));
+ array($row['commit_id'], $row['commit_repository'], $row['commit_revision'], $commit_time));
}
}
Modified: trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php (198502 => 198503)
--- trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php 2016-03-21 22:27:34 UTC (rev 198503)
@@ -92,14 +92,12 @@
$root_ids = array();
foreach ($root_rows as $row) {
- $repository = $row['repository_id'];
+ $repository_id = $row['commit_repository'];
$revision = $row['commit_revision'];
$commit_time = $row['commit_time'];
- $root_id = $root_set_id . '-' . $repository;
- array_push($root_ids, $root_id);
- $repository_id = $resolve_ids ? $row['repository_name'] : $row['repository_id'];
+ array_push($root_ids, $row['commit_id']);
array_push($this->roots, array(
- 'id' => $root_id,
+ 'id' => $row['commit_id'],
'repository' => $repository_id,
'revision' => $revision,
'time' => Database::to_js_time($commit_time)));
Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js (198502 => 198503)
--- trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js 2016-03-21 22:27:34 UTC (rev 198503)
@@ -3,6 +3,7 @@
class CommitLog extends DataModelObject {
constructor(id, rawData)
{
+ console.assert(parseInt(id) == id);
super(id);
this._repository = rawData.repository;
console.assert(this._repository instanceof Repository);
Modified: trunk/Websites/perf.webkit.org/public/v3/models/root-set.js (198502 => 198503)
--- trunk/Websites/perf.webkit.org/public/v3/models/root-set.js 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/public/v3/models/root-set.js 2016-03-21 22:27:34 UTC (rev 198503)
@@ -13,9 +13,7 @@
return;
for (var row of object.roots) {
- var repositoryId = row.repository;
- row.repository = Repository.findById(repositoryId);
-
+ var repositoryId = row.repository.id();
console.assert(!this._repositoryToCommitMap[repositoryId]);
this._repositoryToCommitMap[repositoryId] = CommitLog.ensureSingleton(row.id, row);
this._repositories.push(row.repository);
Modified: trunk/Websites/perf.webkit.org/public/v3/models/test-group.js (198502 => 198503)
--- trunk/Websites/perf.webkit.org/public/v3/models/test-group.js 2016-03-21 22:25:08 UTC (rev 198502)
+++ trunk/Websites/perf.webkit.org/public/v3/models/test-group.js 2016-03-21 22:27:34 UTC (rev 198503)
@@ -222,8 +222,10 @@
});
var rootIdMap = {};
- for (var root of data['roots'])
+ for (var root of data['roots']) {
rootIdMap[root.id] = root;
+ root.repository = Repository.findById(root.repository);
+ }
var rootSets = data['rootSets'].map(function (row) {
row.roots = row.roots.map(function (rootId) { return rootIdMap[rootId]; });