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.
···33#! nix-shell -i python
4455import base64
66+import csv
67import json
78import re
89import shlex
910import subprocess
1011from os.path import abspath, dirname, splitext
1111-from lxml import etree
1212-from lxml.etree import HTMLParser
1312from urllib.request import urlopen
14131514git_path = 'chromiumos/platform/crosvm'
···2524# branch branches are used for fixes for specific devices. So for
2625# Chromium OS they will always be 0. This is a best guess, and is not
2726# documented.
2828-with urlopen('https://cros-updates-serving.appspot.com/') as resp:
2929- document = etree.parse(resp, HTMLParser())
3030- # bgcolor="lightgreen" is set on the most up-to-date version for
3131- # each channel, so find a lightgreen cell in the "Stable" column.
3232- (platform_version, chrome_version) = document.xpath("""
3333- (//table[@id="cros-updates"]/tr/td[1 + count(
3434- //table[@id="cros-updates"]/thead/tr[1]/th[text() = "Stable"]
3535- /preceding-sibling::*)
3636- ][@bgcolor="lightgreen"])[1]/text()
3737- """)
2727+with urlopen('https://chromiumdash.appspot.com/cros/download_serving_builds_csv?deviceCategory=ChromeOS') as resp:
2828+ reader = csv.reader(map(bytes.decode, resp))
2929+ header = reader.__next__()
3030+ cr_stable_index = header.index('cr_stable')
3131+ cros_stable_index = header.index('cros_stable')
3232+ chrome_version = []
3333+ platform_version = []
38343939-chrome_major_version = re.match(r'\d+', chrome_version)[0]
4040-chromeos_tip_build = re.match(r'\d+', platform_version)[0]
3535+ for line in reader:
3636+ this_chrome_version = list(map(int, line[cr_stable_index].split('.')))
3737+ this_platform_version = list(map(int, line[cros_stable_index].split('.')))
3838+ chrome_version = max(chrome_version, this_chrome_version)
3939+ platform_version = max(platform_version, this_platform_version)
4040+4141+chrome_major_version = chrome_version[0]
4242+chromeos_tip_build = str(platform_version[0])
41434244# Find the most recent buildspec for the stable Chrome version and
4345# Chromium OS build number. Its branch build and branch branch build