From 4db78a53e6bafd6591a2b8538dc6c4c5106f2da8 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Thu, 5 Mar 2020 22:10:41 +0000 Subject: [PATCH 1/4] Improved debug on Selenium failure --- check_boot.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/check_boot.py b/check_boot.py index 5e1c80f..5c36ab9 100644 --- a/check_boot.py +++ b/check_boot.py @@ -3,6 +3,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC +from selenium.common.exceptions import TimeoutException import sys import os from subprocess import Popen, PIPE, STDOUT, run, check_call, check_output, CalledProcessError @@ -52,6 +53,8 @@ def wait_for_one(self, locators): def failure(self): self.driver.get_screenshot_as_file("screenshot.png") + print(self.driver.page_source) + os.system("docker logs wharf.web.1") def get(self, url): self.log("Went to %s" % url) @@ -66,9 +69,13 @@ def click(self, strat, id): return self.find_element(strat, id).click() def wait_for_list(self, items): - return WebDriverWait(self.driver, 10).until( - lambda driver: self.wait_for_one(items) - ) + try: + return WebDriverWait(self.driver, 10).until( + lambda driver: self.wait_for_one(items) + ) + except TimeoutException: + self.failure() + raise def get_main_id(self): res = self.wait_for_list([(By.ID, "initial-setup-header"), (By.ID, "list_apps")]) From 3a52eda4381f7508964ccdc698ee06e889c7a407 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Thu, 5 Mar 2020 22:25:45 +0000 Subject: [PATCH 2/4] Lockdown Postgres plugin to 1.9.5 --- README.md | 2 +- test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9f16cf..3437262 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Setup 1. [Install Dokku](http://dokku.viewdocs.io/dokku/getting-started/installation) 2. Install the following plugins: * https://github.com/dokku/dokku-redis - * https://github.com/dokku/dokku-postgres + * https://github.com/dokku/dokku-postgres (versions up to 1.9.5, see #75) * https://github.com/dokku/dokku-letsencrypt 3. Setup the Let's Encrypt plugin to auto-renew (`dokku letsencrypt:cron-job --add`) 4. Create the app (`dokku apps:create wharf`) diff --git a/test.sh b/test.sh index a1ec135..63d44c8 100755 --- a/test.sh +++ b/test.sh @@ -12,7 +12,7 @@ echo dokku dokku/skip_key_file boolean true | sudo debconf-set-selections sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y dokku sudo dokku plugin:install-dependencies --core (dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis -(dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres +(dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 1.9.5 postgres (dokku plugin:list | grep letsencrypt) || sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git dokku letsencrypt:cron-job --add (dokku apps:list | grep wharf) || dokku apps:create wharf From 265e3e50b87eef529ba354b16b777dab0a64489a Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Thu, 5 Mar 2020 22:35:48 +0000 Subject: [PATCH 3/4] List installed plugins as part of testing --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 63d44c8..30cbb9e 100755 --- a/test.sh +++ b/test.sh @@ -14,6 +14,7 @@ sudo dokku plugin:install-dependencies --core (dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis (dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 1.9.5 postgres (dokku plugin:list | grep letsencrypt) || sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git +dokku plugin:list dokku letsencrypt:cron-job --add (dokku apps:list | grep wharf) || dokku apps:create wharf (dokku redis:list | grep wharf) || (dokku redis:create wharf && dokku redis:link wharf wharf) From 8259b2c97a4b7ea0989d12050e6bec8a6a2c8862 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Thu, 5 Mar 2020 22:39:12 +0000 Subject: [PATCH 4/4] Redis also broken similarly to Postgres --- README.md | 2 +- test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3437262..b0eab85 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Setup ----- 1. [Install Dokku](http://dokku.viewdocs.io/dokku/getting-started/installation) 2. Install the following plugins: - * https://github.com/dokku/dokku-redis + * https://github.com/dokku/dokku-redis (versions up to 1.10.4, see #75) * https://github.com/dokku/dokku-postgres (versions up to 1.9.5, see #75) * https://github.com/dokku/dokku-letsencrypt 3. Setup the Let's Encrypt plugin to auto-renew (`dokku letsencrypt:cron-job --add`) diff --git a/test.sh b/test.sh index 30cbb9e..564f8c8 100755 --- a/test.sh +++ b/test.sh @@ -11,7 +11,7 @@ fi echo dokku dokku/skip_key_file boolean true | sudo debconf-set-selections sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y dokku sudo dokku plugin:install-dependencies --core -(dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis +(dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git --committish 1.10.4 redis (dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 1.9.5 postgres (dokku plugin:list | grep letsencrypt) || sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git dokku plugin:list