The old dashboard no longer exists. Currently, the platform version being served doesn't exist in manifest versions, but that was also a problem we had before sometimes.
···3#! nix-shell -i python
45import base64
06import json
7import re
8import shlex
9import subprocess
10from os.path import abspath, dirname, splitext
11-from lxml import etree
12-from lxml.etree import HTMLParser
13from urllib.request import urlopen
1415git_path = 'chromiumos/platform/crosvm'
···25# branch branches are used for fixes for specific devices. So for
26# Chromium OS they will always be 0. This is a best guess, and is not
27# documented.
28-with urlopen('https://cros-updates-serving.appspot.com/') as resp:
29- document = etree.parse(resp, HTMLParser())
30- # bgcolor="lightgreen" is set on the most up-to-date version for
31- # each channel, so find a lightgreen cell in the "Stable" column.
32- (platform_version, chrome_version) = document.xpath("""
33- (//table[@id="cros-updates"]/tr/td[1 + count(
34- //table[@id="cros-updates"]/thead/tr[1]/th[text() = "Stable"]
35- /preceding-sibling::*)
36- ][@bgcolor="lightgreen"])[1]/text()
37- """)
3839-chrome_major_version = re.match(r'\d+', chrome_version)[0]
40-chromeos_tip_build = re.match(r'\d+', platform_version)[0]
0000004142# Find the most recent buildspec for the stable Chrome version and
43# Chromium OS build number. Its branch build and branch branch build
···3#! nix-shell -i python
45import base64
6+import csv
7import json
8import re
9import shlex
10import subprocess
11from os.path import abspath, dirname, splitext
0012from urllib.request import urlopen
1314git_path = 'chromiumos/platform/crosvm'
···24# branch branches are used for fixes for specific devices. So for
25# Chromium OS they will always be 0. This is a best guess, and is not
26# documented.
27+with urlopen('https://chromiumdash.appspot.com/cros/download_serving_builds_csv?deviceCategory=ChromeOS') as resp:
28+ reader = csv.reader(map(bytes.decode, resp))
29+ header = reader.__next__()
30+ cr_stable_index = header.index('cr_stable')
31+ cros_stable_index = header.index('cros_stable')
32+ chrome_version = []
33+ platform_version = []
0003435+ for line in reader:
36+ this_chrome_version = list(map(int, line[cr_stable_index].split('.')))
37+ this_platform_version = list(map(int, line[cros_stable_index].split('.')))
38+ chrome_version = max(chrome_version, this_chrome_version)
39+ platform_version = max(platform_version, this_platform_version)
40+41+chrome_major_version = chrome_version[0]
42+chromeos_tip_build = str(platform_version[0])
4344# Find the most recent buildspec for the stable Chrome version and
45# Chromium OS build number. Its branch build and branch branch build