Update JetpadClient.py to include print_e method
The client calls it but the method does not
actually exist in the file so it just fails to find the
method.
I also added some futher debugging information for future
users as to why such a command might fail.
Test: cd development/auto-version-updater && ./update_versions_for_release.py 1626886800000
Change-Id: Iaba6911f19f8070815cc22c029d50dad6e0d6678
diff --git a/development/JetpadClient.py b/development/JetpadClient.py
index cec146c..8417587 100644
--- a/development/JetpadClient.py
+++ b/development/JetpadClient.py
@@ -17,12 +17,19 @@
import subprocess
import datetime
+import sys
+
+
+def print_e(*args, **kwargs):
+ print(*args, file=sys.stderr, **kwargs)
+
def getJetpadReleaseInfo(date):
try:
rawJetpadReleaseOutput = subprocess.check_output('span sql /span/global/androidx-jetpad:prod_instance \"SELECT GroupId, ArtifactId, ReleaseVersion, PreviousReleaseSHA, ReleaseSHA, Path, RequireSameVersionGroupBuild, ReleaseBuildId, ReleaseBranch FROM LibraryReleases WHERE ReleaseDate = %s\"' % date, shell=True)
except subprocess.CalledProcessError:
- print_e('FAIL: Failed to get jetpad release info for %s' % date)
+ print_e("FAIL: Failed to get jetpad release info for %s. "
+ "This likely means you need to run gcert." % date)
return None
rawJetpadReleaseOutputLines = rawJetpadReleaseOutput.splitlines()
if len(rawJetpadReleaseOutputLines) <= 2: