CI: don't fail on missing CL owner
The cl.owner can be missing if the account was deleted from
gerrit. This was causing a JS failure.
Test: manual (make -C infra/ci/frontend/ test) && open localhost:8080
Change-Id: I121c4ce46357442e40b60bba3d0214ea0e07b79b
diff --git a/infra/ci/controller/Makefile b/infra/ci/controller/Makefile
index f72394d..66a159b 100644
--- a/infra/ci/controller/Makefile
+++ b/infra/ci/controller/Makefile
@@ -13,11 +13,11 @@
# limitations under the License.
-include $(shell python ../config.py makefile)
+include $(shell python3 ../config.py makefile)
test: lib/.stamp config.py common_utils.py
GOOGLE_APPLICATION_CREDENTIALS=../test-credentials.json \
- dev_appserver.py app.yaml --dev_appserver_log_level ${LOGLEVEL}
+ python3 `which dev_appserver.py` app.yaml --dev_appserver_log_level ${LOGLEVEL}
deploy: lib/.stamp config.py common_utils.py
gcloud app deploy -q app.yaml queue.yaml cron.yaml \
diff --git a/infra/ci/frontend/Makefile b/infra/ci/frontend/Makefile
index 400b5eb..14a0000 100644
--- a/infra/ci/frontend/Makefile
+++ b/infra/ci/frontend/Makefile
@@ -13,13 +13,13 @@
# limitations under the License.
-include $(shell python ../config.py makefile)
+include $(shell python3 ../config.py makefile)
SHASUM=shasum
test: LOGLEVEL=info
test: static_3p config.py common_utils.py static/config.js
- dev_appserver.py app.yaml --dev_appserver_log_level ${LOGLEVEL}
+ python3 `which dev_appserver.py` app.yaml --dev_appserver_log_level ${LOGLEVEL}
deploy: static_3p config.py common_utils.py static/config.js
gcloud app deploy -q app.yaml \
diff --git a/infra/ci/frontend/static/script.js b/infra/ci/frontend/static/script.js
index 1520485..18c36bf 100644
--- a/infra/ci/frontend/static/script.js
+++ b/infra/ci/frontend/static/script.js
@@ -254,7 +254,7 @@
`${cl.subject}`, m('span.ps', `#${cl.psNum}`))
),
m('td', cl.status),
- m('td', stripEmail(cl.owner)),
+ m('td', stripEmail(cl.owner || '')),
m('td', getLastUpdate(cl.lastUpdate)),
JOB_TYPES.map(x => renderClJobCell(`cls/${cl.num}-${cl.psNum}`, x.id))
));